projects
/
GPU.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ajout du TP HeatTransfert.
[GPU.git]
/
WCudaMSE
/
Student_Cuda_Image
/
src
/
cpp
/
core
/
01_Rippling
/
moo
/
device
/
math
/
RipplingMath.h
diff --git
a/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/device/math/RipplingMath.h
b/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/device/math/RipplingMath.h
index
655fa09
..
af60ac2
100755
(executable)
--- a/
WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/device/math/RipplingMath.h
+++ b/
WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/device/math/RipplingMath.h
@@
-1,7
+1,7
@@
#ifndef RIPPLING_MATH_H_
\r
#define RIPPLING_MATH_H_
\r
\r
#ifndef RIPPLING_MATH_H_
\r
#define RIPPLING_MATH_H_
\r
\r
-#include <
math.
h>
\r
+#include <
cmat
h>
\r
\r
/*----------------------------------------------------------------------*\
\r
|* Declaration *|
\r
\r
/*----------------------------------------------------------------------*\
\r
|* Declaration *|
\r
@@
-40,7
+40,7
@@
class RipplingMath
void color(int i, int j, float t, uchar4& color)
\r
{
\r
const double dxy10 = dxy(j, i) / 10.0;
\r
void color(int i, int j, float t, uchar4& color)
\r
{
\r
const double dxy10 = dxy(j, i) / 10.0;
\r
- const double grayLevelFloat = 128.0 + 127.0 * cos(dxy10 - t / 7.0
/ 10.0
) / (dxy10 + 1);
\r
+ const double grayLevelFloat = 128.0 + 127.0 * cos(dxy10 - t / 7.0) / (dxy10 + 1);
\r
const uchar grayLevel = (uchar)(long(grayLevelFloat) % 256);
\r
\r
color.x = grayLevel;
\r
const uchar grayLevel = (uchar)(long(grayLevelFloat) % 256);
\r
\r
color.x = grayLevel;
\r