X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/book_gpu.git/blobdiff_plain/88ce161b6f410c4d12b011560d4be74f23c4c471..30d1d29de747eecaa732000749e6aaf46ed2a5a3:/BookGPU/Chapters/chapter11/code3.cu?ds=inline diff --git a/BookGPU/Chapters/chapter11/code3.cu b/BookGPU/Chapters/chapter11/code3.cu index de460f6..5da77e6 100644 --- a/BookGPU/Chapters/chapter11/code3.cu +++ b/BookGPU/Chapters/chapter11/code3.cu @@ -1,5 +1,5 @@ template -__device__ void Bisection_device(T z, T* t, int mi, int ma, int* l) +__device__ void Bisection_device(T z, T* t, int mi,int ma,int* l) { int i; ma--; while(1) { @@ -11,8 +11,9 @@ __device__ void Bisection_device(T z, T* t, int mi, int ma, int* l) *l = mi-1; } -/* Kernel to evaluates monotone spline for a sequence of query points residing in the array z of size m -*/ +// Kernel to evaluate monotone spline for a sequence of query points +// residing in the array z of size m + template __global__ void d_MonSplineValue(Tx* z, int K, double* t, double * alpha, double * beta, double * gamma, int T, Ty *value) { @@ -31,10 +32,9 @@ __global__ void d_MonSplineValue(Tx* z, int K, double* t, double * alpha, double } template -void MonotoneSplineValue(Tx *z, int K, double* t, - double * alpha, double * beta, double * gamma, int T, Ty* result) +void MonotoneSplineValue(Tx *z, int K, double* t, double * alpha, double * beta, double * gamma, int T, Ty* result) { int blocks,threads=256; blocks=(K-1)/threads+1; d_MonSplineValue<<>>(z,K,t,alpha,beta,gamma,T,result); -} \ No newline at end of file +}