On Mon, Mar 15, 2010 at 10:16 AM, Andreas Klöckner <li...@informa.tiker.net> wrote: > On Sonntag 14 März 2010, Faisal Moledina wrote: >> Hello PyCUDA list, >> >> I'm just starting out with PyCUDA and have not used much more than >> gpuarray and cumath. In fact, I have yet to program my own CUDA >> kernel. I'm wondering if there is a built-in erfc method for a >> gpuarray. If PyCUDA doesn't have one built-in, how would I implement a >> CUDA kernel for erfc? Prior to PyCUDA, I was using scipy.special.erfc >> on NumPy arrays. > > You could use to pycuda.elementwise to shield you from any actual CUDA > programming--and use [1] as a (high-quality) implementation guideline. > Maybe you could even tweak that header directly (add a few __device__ > specs). > > [1] > https://svn.boost.org/trac/boost/browser/trunk/boost/math/special_functions/erf.hpp > > Andreas >
Hello Andreas, I just discovered elementwise late last night. Very cool stuff! I ended up using the erfcf() function (found in the CUDA Toolkit Programming Guide) for single precision. Thanks. Faisal _______________________________________________ PyCUDA mailing list pyc...@host304.hostmonster.com http://host304.hostmonster.com/mailman/listinfo/pycuda_tiker.net