2
$\begingroup$

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?

$\endgroup$
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.