New in Wolfram
Mathematica
8: CUDA and OpenCL Support
◄
previous
|
next
►
Software Development
Symbolically Generate CUDA and OpenCL Programs
Use
Mathematica
's SymbolicC capabilities to easily generate CUDA or OpenCL code.
In[1]:=
X
SymbolicCUDAFunction[ "symbolic_" <> ToString[#], {{CPointerType[#], x}, {int, i}}, CBlock[{ SymbolicCUDADeclareIndexBlock[1], CAssign[AddTo, CArray[x, index], CCast[#, 2]] }]] & /@ {char, uchar, int, short, float, double} // ToCCodeString
Out[1]=