Hi Lev,
Basically I'm testing, part by part, my CUDA C code and porting my kernel
functions as PyCUDA source modules. The one I'm verifying right now is this
part:
projection_module = """
__global__ void projection( char *List , int *l, int N, int L ) {
int tid = blockIdx.x * 512 + threadIdx.x;
int idx1 = ceilf( tid / ( N - L + 1 ) );
int idx2 = tid % ( N - L + 1 );
for ( int lcnt = 0; lcnt < L; lcnt++){
l[ (tid * L ) + lcnt ] = List[ (idx1 * N + idx2) + lcnt ];
}
}
"""
This works in CUDA C but surprisingly I get different values in PyCUDA.
Best regards,
./francis
2011/8/4 Lev Givon <[email protected]>
> Received from Francis on Thu, Aug 04, 2011 at 06:07:40AM EDT:
> > Hi everyone,
> >
> > I'm wondering how I can use CUDA C math functions (compiled by adding
> > -use_fast_math to nvcc) in PyCUDA if I have a source module with a
> function
> > such as ceilf( )? I think this could be the source of my program's
> errors.
> >
> > Best regards,
> > ./francis
>
> What errors are you observing? You should be able to call ceilf() and
> friends directly in your kernels without any unusual settings.
>
> L.G.
>
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda