summaryrefslogtreecommitdiff
path: root/src/auxiliaryFunctions
diff options
context:
space:
mode:
authortorset2009-01-09 15:48:43 +0000
committertorset2009-01-09 15:48:43 +0000
commit10a522e53ef2e60ea67fd32e8db4febbccfad9e2 (patch)
tree10c71302a8b88479fb88d688693482602869eb47 /src/auxiliaryFunctions
parentd0e7c64c1dfd1e2f2243355650436c5ebde0fdbf (diff)
downloadscilab2c-10a522e53ef2e60ea67fd32e8db4febbccfad9e2.tar.gz
scilab2c-10a522e53ef2e60ea67fd32e8db4febbccfad9e2.tar.bz2
scilab2c-10a522e53ef2e60ea67fd32e8db4febbccfad9e2.zip
Updates Interfaces
Diffstat (limited to 'src/auxiliaryFunctions')
-rw-r--r--src/auxiliaryFunctions/interfaces/int_abs.h4
-rw-r--r--src/auxiliaryFunctions/interfaces/int_conj.h10
-rw-r--r--src/auxiliaryFunctions/interfaces/int_find.h16
-rw-r--r--src/auxiliaryFunctions/interfaces/int_isempty.h34
-rw-r--r--src/auxiliaryFunctions/interfaces/int_isnan.h34
-rw-r--r--src/auxiliaryFunctions/interfaces/int_sqrt.h71
6 files changed, 84 insertions, 85 deletions
diff --git a/src/auxiliaryFunctions/interfaces/int_abs.h b/src/auxiliaryFunctions/interfaces/int_abs.h
index 5df43aee..4c353fee 100644
--- a/src/auxiliaryFunctions/interfaces/int_abs.h
+++ b/src/auxiliaryFunctions/interfaces/int_abs.h
@@ -27,8 +27,8 @@
#define d2absd2(in,size,out) dabsa(in, size[0]*size[1], out)
-#define c2absc2(in,size,out) cabsa(in, size[0]*size[1], out)
+#define c2abss2(in,size,out) cabsa(in, size[0]*size[1], out)
-#define z2absz2(in,size,out) zabsa(in, size[0]*size[1], out)
+#define z2absd2(in,size,out) zabsa(in, size[0]*size[1], out)
#endif /* !__INT_ABS_H__ */
diff --git a/src/auxiliaryFunctions/interfaces/int_conj.h b/src/auxiliaryFunctions/interfaces/int_conj.h
index d1cfa23f..66f81b88 100644
--- a/src/auxiliaryFunctions/interfaces/int_conj.h
+++ b/src/auxiliaryFunctions/interfaces/int_conj.h
@@ -15,17 +15,19 @@
#ifndef __INT_CONJ_H__
#define __INT_CONJ_H__
-#define s0conjs0(in) sconjs(in)
+#define copy(in, size, out) for (int i=0; i<size;i++) out[i]=in[i];
-#define d0conjd0(in) dconjs(in)
+#define s0conjs0(in) in
+
+#define d0conjd0(in) in
#define c0conjc0(in) cconjs(in)
#define z0conjz0(in) zconjs(in)
-#define s2conjs2(in,size,out) sconja(in, size[0]*size[1], out)
+#define s2conjs2(in,size,out) copy(in,size,out)
-#define d2conjd2(in,size,out) dconja(in, size[0]*size[1], out)
+#define d2conjd2(in,size,out) copy(in,size,out)
#define c2conjc2(in,size,out) cconja(in, size[0]*size[1], out)
diff --git a/src/auxiliaryFunctions/interfaces/int_find.h b/src/auxiliaryFunctions/interfaces/int_find.h
index 0a6b4a51..742ddc06 100644
--- a/src/auxiliaryFunctions/interfaces/int_find.h
+++ b/src/auxiliaryFunctions/interfaces/int_find.h
@@ -15,20 +15,20 @@
#ifndef __INT_FIND_H__
#define __INT_FIND_H__
-#define s0finds0(in) sfinds(in)
+#define s0finds0(in) (in == 0) ? -1 : in
-#define d0findd0(in) dfinds(in)
+#define d0findd0(in) (in == 0) ? -1 : in
-#define c0findc0(in) cfinds(in)
+#define c0findc0(in) ((creals(in) == 0) && (cimags(in) == 0)) ? -1 : in
-#define z0findz0(in) zfinds(in)
+#define z0findz0(in) ((zreals(in) == 0) && (zimags(in) == 0)) ? -1 : in
-#define s2finds2(in,size,out) sfinda(in, size[0]*size[1], out)
+#define s2finds2(in,size,out) sfinda(in, size[0]*size[1])
-#define d2findd2(in,size,out) dfinda(in, size[0]*size[1], out)
+#define d2findd2(in,size,out) dfinda(in, size[0]*size[1])
-#define c2findc2(in,size,out) cfinda(in, size[0]*size[1], out)
+#define c2findc2(in,size,out) cfinda(in, size[0]*size[1])
-#define z2findz2(in,size,out) zfinda(in, size[0]*size[1], out)
+#define z2findz2(in,size,out) zfinda(in, size[0]*size[1])
#endif /* !__INT_FIND_H__ */
diff --git a/src/auxiliaryFunctions/interfaces/int_isempty.h b/src/auxiliaryFunctions/interfaces/int_isempty.h
new file mode 100644
index 00000000..4f7c8889
--- /dev/null
+++ b/src/auxiliaryFunctions/interfaces/int_isempty.h
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */
+
+#ifndef __INT_ISEMPTY_H__
+#define __INT_ISEMPTY_H__
+
+#define s0isemptys0(in) sisemptys(in)
+
+#define d0isemptyd0(in) disemptys(in)
+
+#define c0isemptyc0(in) cisemptys(in)
+
+#define z0isemptyz0(in) zisemptys(in)
+
+#define s2isemptys0(in,size,out) sisemptya(in, size[0]*size[1])
+
+#define d2isemptyd0(in,size,out) disemptya(in, size[0]*size[1])
+
+#define c2isemptyc0(in,size,out) cisemptya(in, size[0]*size[1])
+
+#define z2isemptyz0(in,size,out) zisemptya(in, size[0]*size[1])
+
+#endif /* !__INT_ISEMPTY_H__ */
diff --git a/src/auxiliaryFunctions/interfaces/int_isnan.h b/src/auxiliaryFunctions/interfaces/int_isnan.h
new file mode 100644
index 00000000..4e2e4d7f
--- /dev/null
+++ b/src/auxiliaryFunctions/interfaces/int_isnan.h
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */
+
+#ifndef __INT_ISNAN_H__
+#define __INT_ISNAN_H__
+
+#define s0isnans0(in) sisnans(in)
+
+#define d0isnand0(in) disnans(in)
+
+#define c0isnanc0(in) cisnans(in)
+
+#define z0isnanz0(in) zisnans(in)
+
+#define s2isnans2(in,size,out) sisnana(in, size[0]*size[1], out)
+
+#define d2isnand2(in,size,out) disnana(in, size[0]*size[1], out)
+
+#define c2isnanc2(in,size,out) cisnana(in, size[0]*size[1], out)
+
+#define z2isnanz2(in,size,out) zisnana(in, size[0]*size[1], out)
+
+#endif /* !__INT_ISNAN_H__ */
diff --git a/src/auxiliaryFunctions/interfaces/int_sqrt.h b/src/auxiliaryFunctions/interfaces/int_sqrt.h
deleted file mode 100644
index 5848686a..00000000
--- a/src/auxiliaryFunctions/interfaces/int_sqrt.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-** -*- C -*-
-**
-** int_sqrt.h
-** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it>
-**
-**
-** Copyright POLIBA 2008
-*/
-/*
- 1. Search for sqrt in INIT_FillSCI2LibCDirs.sci
- 2. Search for // --- Function List Class. --- in INIT_FillSCI2LibCDirs.sci
- 3. You will find
- PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
- PrintStringInfo('s0'+ArgSeparator+'c0',ClassFileName,'file','y');
- PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
- PrintStringInfo('d0'+ArgSeparator+'z0',ClassFileName,'file','y');
- PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
- PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
-
- PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
- PrintStringInfo('s2'+ArgSeparator+'c2',ClassFileName,'file','y');
- PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
- PrintStringInfo('d2'+ArgSeparator+'z2',ClassFileName,'file','y');
- PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
- PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
- 4. These are all the functions to be implemented.
- 5. According to functions available in src you have to generate the mapping between
- functions in step3 and functions in src.
-*/
-
-#ifndef __INT_SQRT_H__
-#define __INT_SQRT_H__
-
-#define s0sqrts0(in) \
-ssqrts(in)
-
-#define s0sqrtc0(in) \
-/* BRUNO IT IS NOT AVAILABLE, PLEASE IMPLEMENT IT */
-
-#define d0sqrtd0(in) \
-dsqrts(in)
-
-#define d0sqrtz0(in) \
-/* BRUNO IT IS NOT AVAILABLE, PLEASE IMPLEMENT IT */
-
-#define c0sqrtc0(in) \
-csqrts(in)
-
-#define z0sqrtz0(in) \
-zsqrts(in)
-
-#define s2sqrts2(inptr,insizeptr,outptr) \
-ssqrta(inptr, insizeptr[0]*insizeptr[1], outptr)
-
-#define s2sqrtc2(inptr,insizeptr,outptr) \
-/* BRUNO IT IS NOT AVAILABLE, PLEASE IMPLEMENT IT */
-
-#define d2sqrtd2(inptr,insizeptr,outptr) \
-dsqrta(inptr, insizeptr[0]*insizeptr[1], outptr)
-
-#define d2sqrtz2(inptr,insizeptr,outptr) \
-/* BRUNO IT IS NOT AVAILABLE, PLEASE IMPLEMENT IT */
-
-#define c2sqrtc2(inptr,insizeptr,outptr) \
-csqrta(inptr, insizeptr[0]*insizeptr[1], outptr)
-
-#define z2sqrtz2(inptr,insizeptr,outptr) \
-zsqrta(inptr, insizeptr[0]*insizeptr[1], outptr)
-
-#endif /* !__INT_SQRT_H__ */