From db464f35f5a10b58d9ed1085e0b462689adee583 Mon Sep 17 00:00:00 2001 From: Siddhesh Wani Date: Mon, 25 May 2015 14:46:31 +0530 Subject: Original Version --- macros/CFiles/sci2ccode/RealToComplex.c | 134 ++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 macros/CFiles/sci2ccode/RealToComplex.c (limited to 'macros/CFiles/sci2ccode/RealToComplex.c') diff --git a/macros/CFiles/sci2ccode/RealToComplex.c b/macros/CFiles/sci2ccode/RealToComplex.c new file mode 100644 index 00000000..dd7b5ecf --- /dev/null +++ b/macros/CFiles/sci2ccode/RealToComplex.c @@ -0,0 +1,134 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#include "RealToComplex.h" + +floatComplex s0floatcomplexc0(float in) +{ + floatComplex out; + out = FloatComplex(in,0); + return out; +} + +floatComplex d0floatcomplexc0(double in) +{ + floatComplex out; + out = FloatComplex(in,0); + return out; +} + +floatComplex c0floatcomplexc0(floatComplex in) +{ + return in; +} + +floatComplex z0floatcomplexc0(doubleComplex in) +{ + floatComplex out; + out = FloatComplex((float)zreals(in),(float)zimags(in)); + return out; +} + +void s2floatcomplexc2(float* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i