elodw <[email protected]> writes: > On 11.07.2014 22:14, Andreas Kloeckner wrote: >> elodw <[email protected]> writes: >> The issue is that you're passing integers. Cast to floating point >> before you call the function. >>> And another question: >>> >>> Is there a sqrt-Function? >> http://documen.tician.de/pycuda/array.html#pycuda.cumath.sqrt >> > Andreas > > > Thank You very much, Andreas. > > The next question I had, is > > should I prefer an ElementwiseKernel > or a ReductionKernel for the following Problem: > > tab[m,n] > for i in range(m-1): > for j in range(i+1,m): > calculate euclidean difference between tab[i] and tab[j]
Probably neither, since it's a two-index loop. I.e. you should probably write that one from scratch to be able to map both i and j to CUDA axes. Hope that helps, Andreas
pgp4HXrXqVvyi.pgp
Description: PGP signature
_______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
