[sac-user] Need more help on pass by reference
salemreyen at yahoo.com
Sun Aug 22 05:35:58 CEST 2010
I have a C function which adds two double precision vectors, ie,
add(double* X, double *Y, double* Z) where vectors X and Y are
the input vectors and Z is the output vector. In SaC, I declare
A, B, C to be double precision vectors.
Based on Bodo's example, I can declare
external double[.] add(double[.] X, double[.] Y, double[.] Z);
And then I can call the function add for C = A + B by
C = add(A, B, C);
Now my question is how can SaC compiler handle the cases such as
A = A + B and A = A + A?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sac-user