diff options
author | jofret | 2009-04-28 07:11:01 +0000 |
---|---|---|
committer | jofret | 2009-04-28 07:11:01 +0000 |
commit | b22f596ce449869bffd8e0f63baee1c53e20fa06 (patch) | |
tree | 24e5c3ca47f535b5340a969edf31b774b356848b /macros/CFiles/sci2ccode/OpLogLe.c | |
parent | f96b66fe2423831bcad2f141469de6805364d019 (diff) | |
download | scilab2c-b22f596ce449869bffd8e0f63baee1c53e20fa06.tar.gz scilab2c-b22f596ce449869bffd8e0f63baee1c53e20fa06.tar.bz2 scilab2c-b22f596ce449869bffd8e0f63baee1c53e20fa06.zip |
Moving macros here
Diffstat (limited to 'macros/CFiles/sci2ccode/OpLogLe.c')
-rw-r--r-- | macros/CFiles/sci2ccode/OpLogLe.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/macros/CFiles/sci2ccode/OpLogLe.c b/macros/CFiles/sci2ccode/OpLogLe.c new file mode 100644 index 00000000..a1544489 --- /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); + } + } +} |