CUBLAS Library
CUBLAS Library
CUBLAS Library
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
CHAPTER 1The <strong>CUBLAS</strong> <strong>Library</strong>creates an object in GPU memory space capable of holding an array ofn elements, where each element requires elemSize bytes of storage. Ifthe function call is successful, a pointer to the object in GPU memoryspace is placed in devicePtr. Note that this is a device pointer thatcannot be dereferenced in host code. Function cublasAlloc() is awrapper around cudaMalloc(). Device pointers returned bycublasAlloc() can therefore be passed to any CUDA device kernels,not just <strong>CUBLAS</strong> functions.Return Values<strong>CUBLAS</strong>_STATUS_NOT_INITIALIZED if <strong>CUBLAS</strong> library was not initialized<strong>CUBLAS</strong>_STATUS_INVALID_VALUE if n