Skip to content

pmontalb/CudaLightKernels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CudaLightKernels

This API is a collection of common CUDA kernels calls that I use in my programs. This is by no means a fully-fledged library. It simplifies the code and it reduces the overhead in calling native CUDA code.

This library should be changed not too often, so that once the binary is compiled, it can be paired with a manager for being used in different programming languages.

Types

  • MemorySpace: defines whether a buffer will be allocated: host or device
  • MathDomain: defines the buffer's type: integer, single or double precision
  • MatrixOperation: defines the matrix operation type: transpose or no-op

Buffer classes

  • MemoryBuffer: a buffer is identified by its memory space, math domain and size. The combination of this 3 gives you a pointer that points to the allocated memory

  • MemoryTile: helper class that represents two dimensional buffers, and introduces the concept of rows and columns

  • MemoryCube: helper class that represents three dimensional buffers

Sparse buffer classes

  • SparseMemoryBuffer: helper class that represents sparse buffers, for being used by cuSparse

  • SparseMemoryTile: helper class that represents Compressed Sparse Row (CSR) matrices

Kernels structure

Since there's no name mangling, I decided to use the convention of having every function starting with a leading underscore. This way you can have a helper manager that defines the same function with no underscores that just wraps the kernel call and checks the return value.

About

Collection of CUDA wrappers for a simplified kernel call

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published