cuLite v0.3.1
A lite CUDA C++ Interface
Loading...
Searching...
No Matches
utils.hpp File Reference

Functions

void culite::syncDevice ()
 Synchronizes the CUDA device.
void culite::memCopyX2X (std::size_t count, const void *src, void *dest, cudaMemcpyKind kind)
 Copies memory between different memory spaces.
template<typename T_Scalar>
void culite::memCopyD2D (std::size_t n, const T_Scalar *src, T_Scalar *dest)
 Copies a vector from device memory to device memory.
template<typename T_Scalar>
void culite::memCopyH2D (std::size_t n, const T_Scalar *src, T_Scalar *dest)
 Copies a vector from host memory to device memory.
template<typename T_Scalar>
void culite::memCopyD2H (std::size_t n, const T_Scalar *src, T_Scalar *dest)
 Copies a vector from device memory to host memory.
template<typename T_Scalar>
void culite::memCopyH2H (std::size_t n, const T_Scalar *src, T_Scalar *dest)
 Copies a vector from host memory to host memory.
template<typename T_Scalar>
void culite::memCopyH2D (std::size_t n, const typename TypeTraits< T_Scalar >::cla3p_type *src, T_Scalar *dest)
 Copies a vector from host memory (cla3p type) to device memory.
template<typename T_Scalar>
void culite::memCopyD2H (std::size_t n, const T_Scalar *src, typename TypeTraits< T_Scalar >::cla3p_type *dest)
 Copies a vector from device memory to host memory (cla3p type).
void culite::memCopyX2X (std::size_t elemSize, std::size_t m, std::size_t n, const void *src, std::size_t lds, void *dest, std::size_t ldd, cudaMemcpyKind kind)
 Copies a 2D matrix between different memory spaces.
template<typename T_Scalar>
void culite::memCopyD2D (std::size_t m, std::size_t n, const T_Scalar *src, std::size_t lds, T_Scalar *dest, std::size_t ldd)
 Copies a 2D matrix from device memory to device memory.
template<typename T_Scalar>
void culite::memCopyH2D (std::size_t m, std::size_t n, const T_Scalar *src, std::size_t lds, T_Scalar *dest, std::size_t ldd)
 Copies a 2D matrix from host memory to device memory.
template<typename T_Scalar>
void culite::memCopyD2H (std::size_t m, std::size_t n, const T_Scalar *src, std::size_t lds, T_Scalar *dest, std::size_t ldd)
 Copies a 2D matrix from device memory to host memory.
template<typename T_Scalar>
void culite::memCopyH2H (std::size_t m, std::size_t n, const T_Scalar *src, std::size_t lds, T_Scalar *dest, std::size_t ldd)
 Copies a 2D matrix from host memory to host memory.
template<typename T_Scalar>
void culite::memCopyH2D (std::size_t m, std::size_t n, const typename TypeTraits< T_Scalar >::cla3p_type *src, std::size_t lds, T_Scalar *dest, std::size_t ldd)
 Copies a 2D matrix from host memory (cla3p type) to device memory.
template<typename T_Scalar>
void culite::memCopyD2H (std::size_t m, std::size_t n, const T_Scalar *src, std::size_t lds, typename TypeTraits< T_Scalar >::cla3p_type *dest, std::size_t ldd)
 Copies a 2D matrix from device memory to host memory (cla3p type).
void culite::memSetZeroX (std::size_t n, void *x, std::size_t elemSize)
 Sets a vector in device memory to zero.
template<typename T_Scalar>
void culite::memSetZero (std::size_t n, T_Scalar *x)
 Sets a vector in device memory to zero.
void culite::memSetZeroX (std::size_t m, std::size_t n, void *a, std::size_t lda, std::size_t elemSize)
 Sets a 2D matrix in device memory to zero.
template<typename T_Scalar>
void culite::memSetZero (std::size_t m, std::size_t n, T_Scalar *a, std::size_t lda)
 Sets a 2D matrix in device memory to zero.

Function Documentation

◆ syncDevice()

void culite::syncDevice ( )

Synchronizes the CUDA device.

Blocks until the device has completed all preceding requested tasks.