Auto generated PTX files for various CUDA Math functions.
This is an alternative to using libdeivce when using NVVM IR. The PTX files can be converted to strings and used as required in your repository.
-
src/arith.cu: Basic arithmetic operations (+,-,*,/).- Function handles:
add,sub,div,mul - Includes operations on complex numbers
- Function handles:
-
src/logic.cu: Basic logical operations (>, <, >=, <=, ==, !=).- Function handles:
gt,lt,ge,le,eq,neq - Includes operations on complex numbers
- For complex numbers,
eqandneqcheck for both real and imaginary values. - For complex numbers, everything else checks for absolute values
- Function handles:
-
src/numeric.cu: Numerical operations on numbers- Functions included:
min,max,ceil,floor,round,rem,mod,tgamma,lgamma - Complex numbers supported for
min, andmax. Both functions compare absolute values.
- Functions included:
-
src/exp.cu: Exponential and logarithmic functions- Functions included:
exp,expm1,erf,erfc,log,log10,log1p,sqrt,cbrt,pow - Complex numbers not supported
- Functions included:
-
src/trig.cu: Trigonometric functions- Functions included:
sin,cos,tan,asin,acos,atan - Complex numbers not supported
- Functions included:
-
src/hyper.cu: Hyperbolic functions- Functions included:
sinh,cosh,tanh,asinh,acosh,atanh - Complex numbers not supported
- Functions included:
-
PTX64/sm_xx/*.ptx: PTX files for 64 bit systems for computesm_xx -
PTX32/sm_xx/*.ptx: PTX files for 32 bit systems for computesm_xx
The native name mangling from the auto-generated PTX is changed to something friendlier for string manipulation.
The naming scheme consists of three parts.
- three underscores (common everywhere)
- function name
- a letter denoting each of the input types.
floatissdoubleisdcuFloatComplexisc(a.k.afloat2)cuDoubleComplexisz(a.k.adouble2)intisiunsigned intisu(a.k.auint)charisjunsigned charisv(a.k.auchar)
Sample names:
addon two floating point complex numbers would be:___addcc.sinon a double precision number would be___sindmaxof two unsigned integers would be___maxuu