4.1.7.1 : Le header
Écrivons le fichier gray_scott_cuda.h :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#ifndef __GRAY_SCOTT_CUDA_H__ #define __GRAY_SCOTT_CUDA_H__ #include <cuda.h> #include <cuda_runtime.h> #include "phoenix_cuda_check.h" void gray_scott_cuda(float * matOutV, const float * matInU, const float * matInV, size_t nbImage, size_t nbExtraStep, size_t nbRow, size_t nbCol, size_t paddedNbRow, size_t paddedNbCol, const float * matDeltaSquare, long nbStencilRow, long nbStencilCol, float diffusionRateU, float diffusionRateV, float feedRate, float killRate, float dt, int maxNbThreadPerBlockX, int maxNbBlockX, size_t totalGpuMemory); void gray_scott_cuda_stupid(float * matOutV, const float * matInU, const float * matInV, size_t nbImage, size_t nbExtraStep, size_t nbRow, size_t nbCol, size_t paddedNbRow, size_t paddedNbCol, const float * matDeltaSquare, long nbStencilRow, long nbStencilCol, float diffusionRateU, float diffusionRateV, float feedRate, float killRate, float dt, int maxNbThreadPerBlockX, int maxNbBlockX, size_t totalGpuMemory); #endif |
Le fichier gray_scott_cuda.h complet :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
/*************************************** Auteur : Pierre Aubert Mail : pierre.aubert@lapp.in2p3.fr Licence : CeCILL-C ****************************************/ #ifndef __GRAY_SCOTT_CUDA_H__ #define __GRAY_SCOTT_CUDA_H__ #include <cuda.h> #include <cuda_runtime.h> #include "phoenix_cuda_check.h" void gray_scott_cuda(float * matOutV, const float * matInU, const float * matInV, size_t nbImage, size_t nbExtraStep, size_t nbRow, size_t nbCol, size_t paddedNbRow, size_t paddedNbCol, const float * matDeltaSquare, long nbStencilRow, long nbStencilCol, float diffusionRateU, float diffusionRateV, float feedRate, float killRate, float dt, int maxNbThreadPerBlockX, int maxNbBlockX, size_t totalGpuMemory); void gray_scott_cuda_stupid(float * matOutV, const float * matInU, const float * matInV, size_t nbImage, size_t nbExtraStep, size_t nbRow, size_t nbCol, size_t paddedNbRow, size_t paddedNbCol, const float * matDeltaSquare, long nbStencilRow, long nbStencilCol, float diffusionRateU, float diffusionRateV, float feedRate, float killRate, float dt, int maxNbThreadPerBlockX, int maxNbBlockX, size_t totalGpuMemory); #endif |
Vous pouvez le télécharger ici.