2

I found an interesting files there

$CUDALinkPath -> ../GPUTools

here

Wolfram/WolframEngine/13.0/SystemFiles/Links/GPUTools/SymbolicGPU.m

the content looks like if it was a part of complied code of Mathematica to CUDA/OpenCL translator

iGPUExpression[Power[x_, Rational[1, 2]], opts:OptionsPattern[]] := CStandardMathOperator[Sqrt, {iGPUExpression[x, opts]}]
iGPUExpression[Power[x_, Rational[-1, 2]], opts:OptionsPattern[]] := COperator[Divide, {1.0, CStandardMathOperator[Sqrt, {iGPUExpression[x, opts]}]}]
iGPUExpression[Power[x_, r:Rational[_, _]], opts:OptionsPattern[]] := CStandardMathOperator[Power, {iGPUExpression[x, opts], iGPUExpression[r, opts]}]
iGPUExpression[Power[x_, 2], opts:OptionsPattern[]] := COperator[Times, {iGPUExpression[x, opts], iGPUExpression[x, opts]}]
iGPUExpression[Power[x_, y_], opts:OptionsPattern[]] := CStandardMathOperator[Power, {iGPUExpression[x, opts], iGPUExpression[y, opts]}]
...

Reminds me SymbolicC package. Has anyone tried to use this library for something? Is there a documentation for it?

Kirill Vasin
  • 1,235
  • 12
  • 14

0 Answers0