SWE
/import/home/rettenbs/src/SWE/src/blocks/cuda/SWE_WavePropagationBlockCuda_kernels.hh
Go to the documentation of this file.
00001 
00028 #ifndef SWEWAVEPROPAGATIONBLOCKCUDAKERNELS_HH_
00029 #define SWEWAVEPROPAGATIONBLOCKCUDAKERNELS_HH_
00030 
00031 // CUDA-kernel which computes the net-updates
00032 __global__
00033 void computeNetUpdatesKernel(
00034     const float* i_h, const float* i_hu, const float* i_hv, const float* i_b,
00035     float* o_hNetUpdatesLeftD,   float* o_hNetUpdatesRightD,
00036     float* o_huNetUpdatesLeftD,  float* o_huNetUpdatesRightD,
00037     float* o_hNetUpdatesBelowD,  float* o_hNetUpdatesAboveD,
00038     float* o_hvNetUpdatesBelowD, float* o_hvNetUpdatesAboveD,
00039     float* o_maximumWaveSpeeds,
00040     const int i_nx, const int i_ny,
00041     const int i_offsetX = 0, const int i_offsetY = 0,
00042     const int i_blockOffSetX = 0, const int i_blockOffSetY = 0
00043 );
00044 
00045 // CUDA-kernel which updates the unknowns
00046 __global__
00047 void updateUnknownsKernel(
00048     const float* i_hNetUpdatesLeftD,   const float* i_hNetUpdatesRightD,
00049     const float* i_huNetUpdatesLeftD,  const float* i_huNetUpdatesRightD,
00050     const float* i_hNetUpdatesBelowD,  const float* i_hNetUpdatesAboveD,
00051     const float* i_hvNetUpdatesBelowD, const float* i_hvNetUpdatesAboveD,
00052     float* io_h, float* io_hu, float* io_hv,
00053     const float i_updateWidthX, const float i_updateWidthY,
00054     const int i_nx, const int i_ny
00055 );
00056 
00057 // CUDA-kernel which computes the 1D position in an array from a given 2D index
00058 __device__
00059 inline int computeOneDPositionKernel(const int i_i, const int i_j, const int i_nx);
00060 
00061 #endif /* SWEWAVEPROPAGATIONBLOCKCUDAKERNELS_HH_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends