diff options
Diffstat (limited to 'macros/CFiles')
29 files changed, 1229 insertions, 0 deletions
diff --git a/macros/CFiles/sci2ccode/ConvertPrecision.c b/macros/CFiles/sci2ccode/ConvertPrecision.c new file mode 100644 index 0000000..ee3ecc3 --- /dev/null +++ b/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]; + } +} diff --git a/macros/CFiles/sci2ccode/FileManagement.c b/macros/CFiles/sci2ccode/FileManagement.c new file mode 100644 index 0000000..427b355 --- /dev/null +++ b/macros/CFiles/sci2ccode/FileManagement.c @@ -0,0 +1,12 @@ +/* +** -*- C -*- +** +** FileManagement.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Rubby Nutricato 2007 +*/ + +#include "FileManagement.h" + diff --git a/macros/CFiles/sci2ccode/OpEqual.c b/macros/CFiles/sci2ccode/OpEqual.c new file mode 100644 index 0000000..70f3d50 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpEqual.c @@ -0,0 +1,90 @@ +/* +** -*- C -*- +** +** OpEqual.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpEqual.h" + +float sOpEquals1(float x) +{ + return (x); +} + +double dOpEquals1(double x) +{ + return x; +} + +floatComplex c0OpEqualc0(floatComplex x) +{ + return x; +} + +doubleComplex z0OpEqualz0(doubleComplex x) +{ + return x; +} + +char g0OpEqualg0(char x) +{ + return x; +} + +void sOpEquala1(float* x, int size, float* y) +{ + int i = 0; + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void dOpEquala1(double* x, int size, double* y) +{ + int i = 0; + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void c2OpEqualc2(floatComplex* x, int* xSize, floatComplex* y) +{ + int i = 0; + int size; + size = xSize[0]*xSize[1]; + + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void z2OpEqualz2(doubleComplex* x, int* xSize, doubleComplex* y) +{ + int i = 0; + int size; + size = xSize[0]*xSize[1]; + + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void g2OpEqualg2(char* x, int* xSize, char* y) +{ + int i = 0; + int size; + size = xSize[0]*xSize[1]; + + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} diff --git a/macros/CFiles/sci2ccode/OpExt.c b/macros/CFiles/sci2ccode/OpExt.c new file mode 100644 index 0000000..0b137b1 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpExt.c @@ -0,0 +1,11 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#include "OpExt.h" + diff --git a/macros/CFiles/sci2ccode/OpIns.c b/macros/CFiles/sci2ccode/OpIns.c new file mode 100644 index 0000000..df38689 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpIns.c @@ -0,0 +1,11 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#include "OpIns.h" + diff --git a/macros/CFiles/sci2ccode/OpLogAnd.c b/macros/CFiles/sci2ccode/OpLogAnd.c new file mode 100644 index 0000000..86deee7 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpLogAnd.c @@ -0,0 +1,38 @@ +/* +** -*- C -*- +** +** OpLogAnd.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogAnd.h" + +void s2s0OpLogAnds2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] && in2); + } + } +} + +void d2d0OpLogAndd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] && in2); + } + } +} + diff --git a/macros/CFiles/sci2ccode/OpLogGe.c b/macros/CFiles/sci2ccode/OpLogGe.c new file mode 100644 index 0000000..3664f2e --- /dev/null +++ b/macros/CFiles/sci2ccode/OpLogGe.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogGe.h" + +void s2s0OpLogGes2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] >= in2); + } + } +} + +void d2d0OpLogGed2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] >= in2); + } + } +} diff --git a/macros/CFiles/sci2ccode/OpLogGt.c b/macros/CFiles/sci2ccode/OpLogGt.c new file mode 100644 index 0000000..25e4bd9 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpLogGt.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogGt.h" + +void s2s0OpLogGts2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] > in2); + } + } +} + +void d2d0OpLogGtd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] > in2); + } + } +} diff --git a/macros/CFiles/sci2ccode/OpLogLe.c b/macros/CFiles/sci2ccode/OpLogLe.c new file mode 100644 index 0000000..a154448 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpLogLe.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogLe.h" + +void s2s0OpLogLes2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] <= in2); + } + } +} + +void d2d0OpLogLed2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] <= in2); + } + } +} diff --git a/macros/CFiles/sci2ccode/OpLogLt.c b/macros/CFiles/sci2ccode/OpLogLt.c new file mode 100644 index 0000000..a7e6d77 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpLogLt.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogLt.h" + +void s2s0OpLogLts2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] < in2); + } + } +} + +void d2d0OpLogLtd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] < in2); + } + } +} diff --git a/macros/CFiles/sci2ccode/OpLogOr.c b/macros/CFiles/sci2ccode/OpLogOr.c new file mode 100644 index 0000000..eb553b3 --- /dev/null +++ b/macros/CFiles/sci2ccode/OpLogOr.c @@ -0,0 +1,38 @@ +/* +** -*- C -*- +** +** OpLogOr.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogOr.h" + +void s2s0OpLogOrs2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] || in2); + } + } +} + +void d2d0OpLogOrd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] || in2); + } + } +} + diff --git a/macros/CFiles/sci2ccode/RealToComplex.c b/macros/CFiles/sci2ccode/RealToComplex.c new file mode 100644 index 0000000..dd7b5ec --- /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<inSize[0]*inSize[1];i++) + { + out[i] = s0floatcomplexc0(in[i]); + } +} + +void d2floatcomplexc2(double* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = d0floatcomplexc0(in[i]); + } +} + +void c2floatcomplexc2(floatComplex* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = c0floatcomplexc0(in[i]); + } +} + +void z2floatcomplexc2(doubleComplex* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = z0floatcomplexc0(in[i]); + } +} + +doubleComplex s0doublecomplexz0(float in) +{ + doubleComplex out; + out = DoubleComplex((double)(in),0); + return out; +} + +doubleComplex d0doublecomplexz0(double in) +{ + doubleComplex out; + out = DoubleComplex(in,0); + return out; +} + +doubleComplex c0doublecomplexz0(floatComplex in) +{ + doubleComplex out; + out = DoubleComplex((double) creals(in),(double) cimags(in)); + return out; +} + +doubleComplex z0doublecomplexz0(doubleComplex in) +{ + return in; +} + +void s2doublecomplexz2(float* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = s0doublecomplexz0(in[i]); + } +} + +void d2doublecomplexz2(double* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = d0doublecomplexz0(in[i]); + } +} + +void c2doublecomplexz2(floatComplex* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = c0doublecomplexz0(in[i]); + } +} + +void z2doublecomplexz2(doubleComplex* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = z0doublecomplexz0(in[i]); + } +} diff --git a/macros/CFiles/sci2ccode/SCI2Cconvol.c b/macros/CFiles/sci2ccode/SCI2Cconvol.c new file mode 100644 index 0000000..989cb9d --- /dev/null +++ b/macros/CFiles/sci2ccode/SCI2Cconvol.c @@ -0,0 +1,2 @@ +#include "SCI2Cconvol.h" +
diff --git a/macros/CFiles/sci2ccode/SCI2Cfft.c b/macros/CFiles/sci2ccode/SCI2Cfft.c new file mode 100644 index 0000000..9cced2e --- /dev/null +++ b/macros/CFiles/sci2ccode/SCI2Cfft.c @@ -0,0 +1,13 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "SCI2Cfft.h" + + diff --git a/macros/CFiles/sci2cincludes/ConvertPrecision.h b/macros/CFiles/sci2cincludes/ConvertPrecision.h new file mode 100644 index 0000000..0546432 --- /dev/null +++ b/macros/CFiles/sci2cincludes/ConvertPrecision.h @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** ConvertPrecision.h +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** Copyright Raffaele Nutricato 2008 +*/ + +#ifndef __ConvertPrecision_H__ +#define __ConvertPrecision_H__ + + +double s0doubled0(float in); +void s2doubled2(float* in, int* inSize, double* out); +float d0floats0(double in); +void d2floats2(double* in, int* inSize, float* out); +#endif /* !__ConvertPrecision_H__ */ diff --git a/macros/CFiles/sci2cincludes/FileManagement.h b/macros/CFiles/sci2cincludes/FileManagement.h new file mode 100644 index 0000000..937a66e --- /dev/null +++ b/macros/CFiles/sci2cincludes/FileManagement.h @@ -0,0 +1,13 @@ +/* +** -*- C -*- +** +** FileManagement.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Rubby Nutricato 2007 +** 31-dec-2007 +*/ + +#include <stdio.h> +#include <stdlib.h> diff --git a/macros/CFiles/sci2cincludes/OpEqual.h b/macros/CFiles/sci2cincludes/OpEqual.h new file mode 100644 index 0000000..da36059 --- /dev/null +++ b/macros/CFiles/sci2cincludes/OpEqual.h @@ -0,0 +1,33 @@ +/* +** -*- C -*- +** +** OpEqual.h +** Made by Raffaele Nutricato +** +** +*/ + +#ifndef __OPEQUAL_H__ +#define __OPEQUAL_H__ + +#include <string.h> +#include "floatComplex.h" +#include "doubleComplex.h" + +/* +** Compute Opequal for different types . +*/ + +float sOpEquals1(float x); +double dOpEquals1(double x); +floatComplex c0OpEqualc0(floatComplex x); +doubleComplex z0OpEqualz0(doubleComplex x); +char g0OpEqualg0(char x); + +void sOpEquala1(float* x, int size, float* y); +void dOpEquala1(double* x, int size, double* y); +void c2OpEqualc2(floatComplex* x, int* xSize, floatComplex* y); +void z2OpEqualz2(doubleComplex* x, int* xSize, doubleComplex* y); +void g2OpEqualg2(char* x, int* xSize, char* y); + +#endif /* !__OPEQUAL_H__ */ diff --git a/macros/CFiles/sci2cincludes/OpExt.h b/macros/CFiles/sci2cincludes/OpExt.h new file mode 100644 index 0000000..7d8a77f --- /dev/null +++ b/macros/CFiles/sci2cincludes/OpExt.h @@ -0,0 +1,108 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +/* + Modify by Arnaud Torset : 20/02/09 +*/ + +#ifndef __OPEXT_H__ +#define __OPEXT_H__ + +#define s2s0OpExts0(in1,size,in2) in1[in2-1]; +#define d2d0OpExtd0(in1,size,in2) in1[in2-1]; +#define c2s0OpExtc0(in1,size,in2) in1[in2-1]; +#define z2d0OpExtz0(in1,size,in2) in1[in2-1]; + + +#define s2s0s0OpExts0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; +#define d2d0d0OpExtd0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; +#define c2s0s0OpExtc0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; +#define z2d0d0OpExtz0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; + + +#define s2s2OpExts2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];\ + } + +#define d2d2OpExtd2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];\ + } + +#define c2s2OpExtc2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1;i++]) out[i]=in1[(int)in2[i]-1];\ + } + +#define z2d2OpExtz2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];\ + } + + + +#define s2s2s0OpExts2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=s2s0s0OpExts0(in1,size1,(int)rows[i],col);\ + } + +#define d2d2d0OpExtd2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=d2d0d0OpExtd0(in1,size1,(int)rows[i],col);\ + } + +#define c2s2s0OpExtc2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=c2s0s0OpExtc0(in1,size1,(int)rows[i],col);\ + } + +#define z2d2d0OpExtz2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=z2d0d0OpExtz0(in1,size1,(int)rows[i],col);\ + } + +#define s2s0s2OpExts2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=s2s0s0OpExts0(in1,size1,row,(int)cols[i]);\ + } + +#define d2d0d2OpExtd2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=d2d0d0OpExtd0(in1,size1,row,(int)cols[i]);\ + } + +#define c2s0s2OpExtc2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=c2s0s0OpExtc0(in1,size1,row,(int)cols[i]);\ + } + +#define z2d0d2OpExtz2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=z2d0d0OpExtz0(in1,size1,row,(int)cols[i]);\ + } + + +#define s2s2s2OpExts2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + +#define d2d2d2OpExtd2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + +#define c2s2s2OpExtc2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + +#define z2d2d2OpExtz2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + + + + + +#endif /* !__OPEXT_H__ */ diff --git a/macros/CFiles/sci2cincludes/OpLogAnd.h b/macros/CFiles/sci2cincludes/OpLogAnd.h new file mode 100644 index 0000000..8d61a59 --- /dev/null +++ b/macros/CFiles/sci2cincludes/OpLogAnd.h @@ -0,0 +1,23 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#ifndef __OPLOGAND_H__ +#define __OPLOGAND_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +#define s0s0OpLogAnds0(in1,in2) \
+ (float) (in1 && in2) +void s2s0OpLogAnds2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogAndd0(in1,in2) \
+ (double) (in1 && in2) +void d2d0OpLogAndd2(double* in1, int* in1Size, double in2, double* out); +#endif /* !__OPLOGAND_H__ */ diff --git a/macros/CFiles/sci2cincludes/OpLogGe.h b/macros/CFiles/sci2cincludes/OpLogGe.h new file mode 100644 index 0000000..ddc9631 --- /dev/null +++ b/macros/CFiles/sci2cincludes/OpLogGe.h @@ -0,0 +1,36 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Started on Tue Dec 5 15:49:18 2006 jofret +** Last update Mon Oct 22 10:01:54 2007 bruno +** +** Copyright INRIA 2006 +*/ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ +#ifndef __OPLOGGE_H__ +#define __OPLOGGE_H__ + + +#define s0s0OpLogGes0(in1,in2) \
+ (float) (in1 >= in2) +void s2s0OpLogGes2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogGed0(in1,in2) \
+ (double) (in1 >= in2) +void d2d0OpLogGed2(double* in1, int* in1Size, double in2, double* out); + +/* we must have size1=size2 */ + +#define s2s2OpLogGes2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = s0s0OpLogGes0(in1[i],in2[i]);\ + } +#define d2d2OpLogGed2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = d0d0OpLogGed0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLE_H__ */ diff --git a/macros/CFiles/sci2cincludes/OpLogLe.h b/macros/CFiles/sci2cincludes/OpLogLe.h new file mode 100644 index 0000000..7bc0c3a --- /dev/null +++ b/macros/CFiles/sci2cincludes/OpLogLe.h @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Started on Tue Dec 5 15:49:18 2006 jofret +** Last update Mon Oct 22 10:01:54 2007 bruno +** +** Copyright INRIA 2006 +*/ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ + +#ifndef __OPLOGLE_H__ +#define __OPLOGLE_H__ + + +#define s0s0OpLogLes0(in1,in2) \
+ (float) (in1 <= in2) +void s2s0OpLogLes2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogLed0(in1,in2) \
+ (double) (in1 <= in2) +void d2d0OpLogLed2(double* in1, int* in1Size, double in2, double* out); + +/* we must have size1=size2 */ + +#define s2s2OpLogLes2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = s0s0OpLogLes0(in1[i],in2[i]);\ + } +#define d2d2OpLogLed2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = d0d0OpLogLed0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLE_H__ */ diff --git a/macros/CFiles/sci2cincludes/OpLogLt.h b/macros/CFiles/sci2cincludes/OpLogLt.h new file mode 100644 index 0000000..2962f15 --- /dev/null +++ b/macros/CFiles/sci2cincludes/OpLogLt.h @@ -0,0 +1,35 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Started on Tue Dec 5 15:49:18 2006 jofret +** Last update Mon Oct 22 10:01:54 2007 bruno +** +** Copyright INRIA 2006 +*/ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ +#ifndef __OPLOGLT_H__ +#define __OPLOGLT_H__ + +#define s0s0OpLogLts0(in1,in2) \
+ (float) (in1 < in2) +void s2s0OpLogLts2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogLtd0(in1,in2) \
+ (double) (in1 < in2) +void d2d0OpLogLtd2(double* in1, int* in1Size, double in2, double* out); + +/* we must have size1=size2 */ + +#define s2s2OpLogLts2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = s0s0OpLogLts0(in1[i],in2[i]);\ + } +#define d2d2OpLogLtd2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = d0d0OpLogLtd0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLT_H__ */ diff --git a/macros/CFiles/sci2cincludes/OpLogOr.h b/macros/CFiles/sci2cincludes/OpLogOr.h new file mode 100644 index 0000000..331cae7 --- /dev/null +++ b/macros/CFiles/sci2cincludes/OpLogOr.h @@ -0,0 +1,23 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#ifndef __OPLOGOR_H__ +#define __OPLOGOR_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +#define s0s0OpLogOrs0(in1,in2) \
+ (float) (in1 || in2) +void s2s0OpLogOrs2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogOrd0(in1,in2) \
+ (double) (in1 || in2) +void d2d0OpLogOrd2(double* in1, int* in1Size, double in2, double* out); +#endif /* !__OPLOGOR_H__ */ diff --git a/macros/CFiles/sci2cincludes/RealToComplex.h b/macros/CFiles/sci2cincludes/RealToComplex.h new file mode 100644 index 0000000..6de98be --- /dev/null +++ b/macros/CFiles/sci2cincludes/RealToComplex.h @@ -0,0 +1,33 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#ifndef __REALTOCOMPLEX_H__ +#define __REALTOCOMPLEX_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +floatComplex s0floatcomplexc0(float in); +floatComplex d0floatcomplexc0(double in); +floatComplex c0floatcomplexc0(floatComplex in); +floatComplex z0floatcomplexc0(doubleComplex in); +void s2floatcomplexc2(float* in, int* inSize, floatComplex* out); +void d2floatcomplexc2(double* in, int* inSize, floatComplex* out); +void c2floatcomplexc2(floatComplex* in, int* inSize, floatComplex* out); +void z2floatcomplexc2(doubleComplex* in, int* inSize, floatComplex* out); + +doubleComplex s0doublecomplexz0(float in); +doubleComplex d0doublecomplexz0(double in); +doubleComplex c0doublecomplexz0(floatComplex in); +doubleComplex z0doublecomplexz0(doubleComplex in); +void s2doublecomplexz2(float* in, int* inSize, doubleComplex* out); +void d2doublecomplexz2(double* in, int* inSize, doubleComplex* out); +void c2doublecomplexz2(floatComplex* in, int* inSize, doubleComplex* out); +void z2doublecomplexz2(doubleComplex* in, int* inSize, doubleComplex* out); +#endif /* !__REALTOCOMPLEX_H__ */ diff --git a/macros/CFiles/sci2cincludes/SCI2CMacroInterface.h b/macros/CFiles/sci2cincludes/SCI2CMacroInterface.h new file mode 100644 index 0000000..4e129a7 --- /dev/null +++ b/macros/CFiles/sci2cincludes/SCI2CMacroInterface.h @@ -0,0 +1,281 @@ +/*
+** ----------------------
+** --- Class OPEQUAL. ---
+** ----------------------
+*/
+/* --- Equal. --- */
+#define s0OpEquals0(in) \
+sOpEquals1(in); +
+#define s2OpEquals2(inptr,insizeptr,outptr) \
+sOpEquala1(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d0OpEquald0(in) \
+dOpEquals1(in); +
+#define d2OpEquald2(inptr,insizeptr,outptr) \
+dOpEquala1(inptr, insizeptr[0]*insizeptr[1], outptr); +
+/*
+// ---------------------
+// --- Class OPSTAR. ---
+// ---------------------
+*/
+/* --- OpStar. ---
+#define s0s0OpStars0(in1,in2) \
+ssOpStarss1(in1,in2);
+ +#define s0s2OpStars2(in1,inptr2,insizeptr2,outptr) \
+ssOpStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +
+#define s2s0OpStars2(inptr2,insizeptr2,in1,outptr) \
+ssOpStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr);*/ +/*questa su e' una macro
+
+#define s2s2OpStars2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ssOpStaraa1(inptr1,insizeptr1[0],insizeptr1[1], inptr2, insizeptr2[1], outptr);
+
+#define d0d0OpStard0(in1,in2) \
+ddOpStarss1(in1,in2);
+
+#define d0d2OpStard2(in1,inptr2,insizeptr2,outptr) \
+ddOpStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +
+#define d2d0OpStard2(inptr2,insizeptr2,in1,outptr) \
+ddOpStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr)*/ +/*questa su e' una macro
+
+#define d2d2OpStard2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ddOpStaraa1(inptr1,insizeptr1[0],insizeptr1[1], inptr2, insizeptr2[1], outptr);*/
+
+/*
+// ---------------------
+// --- Class OPPLUS. ---
+// ---------------------
+*/
+/* --- OpPlus. ---*/
+/*RN volendo puoi fare una sola macro del tipo sa1() che serve per tutte le operazioni
+#define s0s0OpPluss0(in1,in2) \
+ssOpPlusss1(in1,in2);
+ +#define s0s2OpPluss2(in1,inptr2,insizeptr2,outptr) \
+ssOpPlussa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +
+#define s2s2OpPluss2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ssOpPlusaa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr) + +#define s2s0OpPluss2(inptr2,insizeptr2,in1,outptr) \
+ssOpPlussa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr);*/ +/*questa su e' una macro
+
+#define d0d0OpPlusd0(in1,in2) \
+ddOpPlusss1(in1,in2);
+
+#define d2d2OpPlusd2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ddOpPlusaa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr); +
+#define d0d2OpPlusd2(in1,inptr2,insizeptr2,outptr) \
+ddOpPlussa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +
+#define d2d0OpPlusd2(inptr2,insizeptr2,in1,outptr) \
+ddOpPlussa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr)*/ +/*questa su e' una macro */
+
+
+/* --- OpDotStar. ---*/
+/*#define s0s0OpDotStars0(in1,in2) \
+ssOpDotStarss1(in1,in2);
+ +#define s0s2OpDotStars2(in1,inptr2,insizeptr2,outptr) \
+ssOpDotStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +
+#define s2s2OpDotStars2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ssOpDotStaraa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr) + +#define s2s0OpDotStars2(inptr2,insizeptr2,in1,outptr) \
+ssOpDotStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +questa su e' una macro */
+
+/*#define d0d0OpDotStard0(in1,in2) \
+ddOpDotStarss1(in1,in2);
+
+#define d2d2OpDotStard2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ddOpDotStaraa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr); +
+#define d0d2OpDotStard2(in1,inptr2,insizeptr2,outptr) \
+ddOpDotStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +
+#define d2d0OpDotStard2(inptr2,insizeptr2,in1,outptr) \
+ddOpDotStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +questa su e' una macro */
+
+/*
+// ---------------------
+// --- Class ^. ---
+// ---------------------
+*/
+/*RN DA FARE ANCORA forse la si puo' integrare dentro le operazioni OPPLUS*/
+
+/*
+// ---------------------
+// --- Class OPAPEX. ---
+// ---------------------
+*/
+/* --- OpApex. ---
+#define s0OpApexs0(in) \
+sOpApexs(in);
+
+#define d0OpApexd0(in) \
+dOpApexs(in);
+
+#define s2OpApexs2(inptr,insizeptr,outptr) \
+sOpApexa(inptr, insizeptr[0],insizeptr[1], outptr); + +#define d2OpApexd2(inptr,insizeptr,outptr) \
+dOpApexa(inptr, insizeptr[0],insizeptr[1], outptr); +*/
+/*
+// ---------------------
+// --- Class SIN. ---
+// ---------------------
+*/
+/* --- sin. ---*/
/* +#define s0sins0(inptr) \
+ssins(inptr); +
+#define d0sind0(inptr) \
+dsins(inptr); +
+#define c0sinc0(inptr) \
+csins(inptr); +
+#define z0sinz0(inptr) \
+zsins(inptr); +
+#define s2sins2(inptr,insizeptr,outptr) \
+ssina(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d2sind2(inptr,insizeptr,outptr) \
+dsina(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define c2sinc2(inptr,insizeptr,outptr) \
+csina(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define z2sinz2(inptr,insizeptr,outptr) \
+zsina(inptr, insizeptr[0]*insizeptr[1], outptr);
+
*/ +/* --- cos. ---*/
/* +#define s0coss0(inptr) \
+scoss(inptr); +
+#define d0cosd0(inptr) \
+dcoss(inptr); +
+#define c0cosc0(inptr) \
+ccoss(inptr); +
+#define z0cosz0(inptr) \
+zcoss(inptr); +
+#define s2coss2(inptr,insizeptr,outptr) \
+scosa(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d2cosd2(inptr,insizeptr,outptr) \
+dcosa(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define c2cosc2(inptr,insizeptr,outptr) \
+ccosa(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define z2cosz2(inptr,insizeptr,outptr) \
+zcosa(inptr, insizeptr[0]*insizeptr[1], outptr); +
*/ +/* --- sinh. ---*/
/* +#define s0sinhs0(inptr) \
+ssinhs(inptr); +
+#define d0sinhd0(inptr) \
+dsinhs(inptr); +
+#define c0sinhc0(inptr) \
+csinhs(inptr); +
+#define z0sinhz0(inptr) \
+zsins(inptr); +
+#define s2sinhs2(inptr,insizeptr,outptr) \
+ssinha(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d2sinhd2(inptr,insizeptr,outptr) \
+dsinha(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define c2sinhc2(inptr,insizeptr,outptr) \
+csinha(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define z2sinhz2(inptr,insizeptr,outptr) \
+zsinha(inptr, insizeptr[0]*insizeptr[1], outptr);
+
+*/ +/*
+// ---------------------
+// --- Class DISP. ---
+// ---------------------
+*//*
+#define s0dispd0(invar) \
+sdisps2 (invar, #invar );
+
+#define d0dispd0(invar) \
+ddisps2 (invar, #invar );
+
+#define c0dispd0(invar) \
+cdisps2 (invar, #invar );
+
+#define z0dispd0(invar) \
+zdisps2 (invar, #invar );
+
+#define s2dispd0(invar,insize) \
+sdispa2 (invar, insize, #invar );
+
+#define d2dispd0(invar,insize) \
+ddispa2 (invar, insize, #invar );
+
+#define c2dispd0(invar,insize) \
+cdispa2 (invar, insize, #invar );
+
+#define z2dispd0(invar,insize) \
+zdispa2 (invar, insize, #invar );
+
+#define i2dispd0(invar,insize) \
+idispa2 (invar, insize, #invar );*/
+/*
+// --------------------
+// --- Class ZEROS. ---
+// --------------------
+*/
+/* --- ones. ---*/
/* +#define d0d0onesd2(inptr1,inptr2,outptr) \
+ddonesss1(inptr1, inptr2, outptr);
+ +#define onesd0() \
+1
+
+#define d0onesd0(in1) \
+1
+
+#define d2onesd2(inptr,insizeptr,outptr) \
+ddonesss1(insizeptr[0], insizeptr[1], outptr);
+
+#define d0d0onesd2(inptr1,inptr2,outptr) \
+ddonesss1(inptr1, inptr2, outptr);
+
+#define s0s0oness2(inptr1,inptr2,outptr) \
+ssonesss1(inptr1, inptr2, outptr);
+ +#define oness0() \
+1
+
+#define s0oness0(in1) \
+1
+
+#define s2oness2(inptr,insizeptr,outptr) \
+ssonesss1(insizeptr[0], insizeptr[1], outptr); +*/ diff --git a/macros/CFiles/sci2cincludes/SCI2Cconvol.h b/macros/CFiles/sci2cincludes/SCI2Cconvol.h new file mode 100644 index 0000000..3fb3b9e --- /dev/null +++ b/macros/CFiles/sci2cincludes/SCI2Cconvol.h @@ -0,0 +1,15 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ +
+#ifndef __CONVOL_H__ +#define __CONVOL_H__ + +#include "SCI2CMacroInterface.h"
+#endif /* !__CONVOL_H__ */ diff --git a/macros/CFiles/sci2cincludes/SCI2Cfft.h b/macros/CFiles/sci2cincludes/SCI2Cfft.h new file mode 100644 index 0000000..f82b74b --- /dev/null +++ b/macros/CFiles/sci2cincludes/SCI2Cfft.h @@ -0,0 +1,16 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#ifndef __SCI2CFFT_H__ +#define __SCI2CFFT_H__ + +#include "SCI2CMacroInterface.h"
+ +#endif /* !__SCI2CFFT_H__ */ diff --git a/macros/CFiles/sci2cincludes/notFound.h b/macros/CFiles/sci2cincludes/notFound.h new file mode 100644 index 0000000..59d8c2f --- /dev/null +++ b/macros/CFiles/sci2cincludes/notFound.h @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** notFound.h +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Thu Feb 8 10:12:17 2007 jofret +** Last update Tue Feb 13 17:16:47 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#ifndef __NOT_FOUND_H__ +#define __NOT_FOUND_H__ + +#define NOT_FOUND -1 + +#endif /* !__NOT_FOUND_H__ */ diff --git a/macros/CFiles/sci2cobj/readme.txt b/macros/CFiles/sci2cobj/readme.txt new file mode 100644 index 0000000..54f467f --- /dev/null +++ b/macros/CFiles/sci2cobj/readme.txt @@ -0,0 +1,2 @@ +for the moment the makefile generates the obj files in
+the source directory where .c files are stored.
\ No newline at end of file |