Say I have a couple functions like so:
Would that be treated the same as:
The main thing I'm worried about is if it is pushing 3 temporary float variables on to the stack for the array, rather than passing the array's pointer.
Code:
typedef float vector[3]; void foo(vector t){ /* Do whatever */ } void bar(void){ vector v; foo(v); /* Rest of program */ }
Code:
typedef float vector[3]; void foo(float * t){ /* Do whatever */ } void bar(void){ vector v; foo(v); /* Rest of program */ }
Comment