(* Mathematica LibraryLink test script for demo.c *) (* Hint: libPath is initialized in test init code *) demoII=LibraryFunctionLoad[libPath, "demo_I_I", {Integer}, Integer] demoRR=LibraryFunctionLoad[libPath, "demo_R_R", {Real}, Real] demoIRR=LibraryFunctionLoad[libPath, "demo_IR_R", {Integer, Real}, Real] demoTIR=LibraryFunctionLoad[libPath, "demo_TI_R", {{Real, 1}, Integer}, Real] demo1TIR=LibraryFunctionLoad[libPath, "demo1_TI_R", {{Real, 1, "Manual"}, Integer}, Real] demo2TIR=LibraryFunctionLoad[libPath, "demo2_TI_R", {{Real, 1, "Shared"}, Integer}, Real] demoIT=LibraryFunctionLoad[libPath, "demo_I_T", {Integer}, {Integer, 1}] demoTTT=LibraryFunctionLoad[libPath, "demo_TT_T", {{Real, 1}, {Integer, 1}}, {Real, _}] demoTTTT=LibraryFunctionLoad[libPath, "demo_TTT_T", {{Real, 1}, {Integer, _}, {Real, _}}, {Integer, _}] demoTT=LibraryFunctionLoad[libPath, "demo_T_T", {{_, _}}, {_, _}] demoBoolean1=LibraryFunctionLoad[libPath, "demoBoolean1", {"Boolean"}, "Boolean"] demoComplex1=LibraryFunctionLoad[libPath, "demoComplex1", {Complex}, Complex] demoVoid=LibraryFunctionLoad[libPath, "demoVoid", {}, "Void"] array = Range[1., 10] Print[demoII[10]] Print[demoRR[10.]] Print[demoIRR[3,13.]] Print[demoTIR[array,1]] Print[demo1TIR[array,2]] Print[demo2TIR[array,3]] Print[demoIT[5]] Print[demoTTT[array,{1}]] Print[demoTTTT[array,1,10.0]] Print[demoTT[{{1,2},{3,4}}]] Print[demoBoolean1[True]] Print[demoComplex1[1. + 2. I]] Print[demoVoid[]]