diff options
Diffstat (limited to '2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c')
-rw-r--r-- | 2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c b/2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c new file mode 100644 index 00000000..ee3ecc3a --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c @@ -0,0 +1,41 @@ +/* +** -*- C -*- +** +** ConvertPrecision.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** Copyright Raffaele Nutricato 2008 +*/ + + +double s0doubled0(float in) +{ + double out; + out = (double) in; + return (out); +} + +void s2doubled2(float* in, int* inSize, double* out) +{ + int i; + for (i=0; i<inSize[0]*inSize[1]; i++) + { + out[i] = (double) in[i]; + } +} + +float d0floats0(double in) +{ + float out; + out = (float) in; + return (out); +} + +void d2floats2(double* in, int* inSize, float* out) +{ + int i; + for (i=0; i<inSize[0]*inSize[1]; i++) + { + out[i] = (float) in[i]; + } +} |