Skip to content

int128-libraries/curtint128

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A 128 bit unsigned integer class for CUDA

This library seeks to provide a convenient uint128_t type for use in CUDA code, as well as in C++. At this point, nearly all operators have been overloaded for the uint128_t class, all common arithmetic and bit arithmetic functions (including several roots) are defined. Additionally, more functions have been defined to increase the usability of this class, including typecasts to and from float and double, ostream insert (on the host), and std::string -> uint128_t conversion.

Usage

The cuda_uint128.h header can be seamlessly included into both .cu and .cpp source files. Due to inefficiencies in linking device code with nvcc, this is a header-only library.

Testing

C++ and CUDA test cases are provided in src and could be built with CMake:

mkdir build
cd build
cmake ..
make
./cudauint128_test_cuda
./cudauint128_test_cpu

About

A 128 bit unsigned integer operations header-only class for CUDA and C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.9%
  • Cuda 3.3%
  • CMake 2.8%