cIterReal =
Compile[{{vecPosAct, _Real}, {boxWidth, _Real}, {boxWidth2, _Real},
{c, _Integer}},
(Module[{vecPosActNew,check},)
vecPosActNew = vecPosAct;
Do[
vecPosActNew[[check]] -=
Round[(vecPosAct[[check]] - boxWidth2)/boxWidth]*
boxWidth2*1., {check, 1, c, 1}], CompilationTarget → “C”,
CompilationOptions → {“InlineExternalDefinitions” → True}];
cIterReal[{{3.2, 4., 9.}, {2.3, 4., 9.}, {9.2, 3.2, 5.0}}, 2.2, 1.1,
3];
Then I get this: CompiledFunction::cfsa: Argument {{3.2,4.,9.},{2.3,4.,9.},{9.2,3.2,5.}} at position 1 should be a machine-size real number.
If anyone could give me some advice, I also tried {_Real,2 } and then it continuous with the uncompiled code.