summaryrefslogtreecommitdiff
path: root/src/auxiliaryFunctions/includes
diff options
context:
space:
mode:
Diffstat (limited to 'src/auxiliaryFunctions/includes')
-rw-r--r--src/auxiliaryFunctions/includes/abs.h24
-rw-r--r--src/auxiliaryFunctions/includes/conj.h19
-rw-r--r--src/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h26
-rw-r--r--src/auxiliaryFunctions/includes/find.h18
-rw-r--r--src/auxiliaryFunctions/includes/find2d.h17
-rw-r--r--src/auxiliaryFunctions/includes/frexp.h13
-rw-r--r--src/auxiliaryFunctions/includes/isempty.h3
-rw-r--r--src/auxiliaryFunctions/includes/isnan.h28
-rw-r--r--src/auxiliaryFunctions/includes/length.h2
-rw-r--r--src/auxiliaryFunctions/includes/pythag.h18
-rw-r--r--src/auxiliaryFunctions/includes/rand.h26
-rw-r--r--src/auxiliaryFunctions/includes/sign.h26
12 files changed, 166 insertions, 54 deletions
diff --git a/src/auxiliaryFunctions/includes/abs.h b/src/auxiliaryFunctions/includes/abs.h
index bd75ba54..00565e39 100644
--- a/src/auxiliaryFunctions/includes/abs.h
+++ b/src/auxiliaryFunctions/includes/abs.h
@@ -13,10 +13,14 @@
#ifndef __ABS_H__
#define __ABS_H__
+#include "dynlib_auxiliaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
#include "sqrt.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
** \brief Float Absolute Value function
@@ -24,7 +28,7 @@
** \param in : the float we must determine abs.
** \return -in or in depending on the sign of in.
**/
-float sabss(float in);
+EXTERN_AUXFUNCT float sabss(float in);
/**
** \brief Double Absolute Value function
@@ -32,7 +36,7 @@ float sabss(float in);
** \param in : the double we must determine abs.
** \return -in or +in depending on the abs of in.
**/
-double dabss(double in);
+EXTERN_AUXFUNCT double dabss(double in);
/**
** \brief Float Complex Absolute Value function
@@ -40,7 +44,7 @@ double dabss(double in);
** \param in : the float complex we must determine abs i.e. module.
** \return |in|.
**/
-float cabss(floatComplex in);
+EXTERN_AUXFUNCT float cabss(floatComplex in);
/**
** \brief Double Complex Absolute Value function
@@ -48,7 +52,7 @@ float cabss(floatComplex in);
** \param in : the double complex we must determine abs i.e. module.
** \return |in|.
**/
-double zabss(doubleComplex in);
+EXTERN_AUXFUNCT double zabss(doubleComplex in);
/**
** \brief Float Array Absolute Value function
@@ -56,7 +60,7 @@ double zabss(doubleComplex in);
** \param in : the float array we must determine abs.
** \param out : the float array result.
**/
-void sabsa(float *in, int size, float* out);
+EXTERN_AUXFUNCT void sabsa(float *in, int size, float* out);
/**
** \brief Double Array Absolute Value function
@@ -64,7 +68,7 @@ void sabsa(float *in, int size, float* out);
** \param in : the double array we must determine abs.
** \param out : the double array result.
**/
-void dabsa(double *in, int size, double* out);
+EXTERN_AUXFUNCT void dabsa(double *in, int size, double* out);
/**
** \brief Float Complex Array Absolute Value function
@@ -72,7 +76,7 @@ void dabsa(double *in, int size, double* out);
** \param in : the float complex array we must determine abs i.e. module.
** \param out : the float complex array result i.e out[n] = |in[n]|.
**/
-void cabsa(floatComplex *in, int size, float* out);
+EXTERN_AUXFUNCT void cabsa(floatComplex *in, int size, float* out);
/**
** \brief Double Complex Array Absolute Value function
@@ -80,6 +84,10 @@ void cabsa(floatComplex *in, int size, float* out);
** \param in : the double complex array we must determine abs i.e. module.
** \param out : the double complex array result i.e out[n] = |in[n]|.
**/
-void zabsa(doubleComplex *in, int size, double* out);
+EXTERN_AUXFUNCT void zabsa(doubleComplex *in, int size, double* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
#endif /* !__ABS_H__ */
diff --git a/src/auxiliaryFunctions/includes/conj.h b/src/auxiliaryFunctions/includes/conj.h
index ee777578..b49855bf 100644
--- a/src/auxiliaryFunctions/includes/conj.h
+++ b/src/auxiliaryFunctions/includes/conj.h
@@ -13,14 +13,25 @@
#ifndef __CONJ_H__
#define __CONJ_H__
+#include "dynlib_auxiliaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
-floatComplex cconjs( floatComplex in ) ;
+#ifdef __cplusplus
+extern "C" {
+#endif
-void cconja ( floatComplex* in , int size, floatComplex* out );
+EXTERN_AUXFUNCT floatComplex cconjs( floatComplex in ) ;
+
+EXTERN_AUXFUNCT void cconja ( floatComplex* in , int size, floatComplex* out );
+
+EXTERN_AUXFUNCT doubleComplex zconjs ( doubleComplex in) ;
+
+EXTERN_AUXFUNCT void zconja ( doubleComplex* in , int size, doubleComplex* out ) ;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
-doubleComplex zconjs ( doubleComplex in) ;
-void zconja ( doubleComplex* in , int size, doubleComplex* out ) ;
#endif /* !__CONJ_H__ */
diff --git a/src/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h b/src/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h
new file mode 100644
index 00000000..b2002944
--- /dev/null
+++ b/src/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h
@@ -0,0 +1,26 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* 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
+*
+*/
+
+#ifndef __DYNLIB_AUXILIARYFUNCTIONS_H__
+#define __DYNLIB_AUXILIARYFUNCTIONS_H__
+
+#ifdef _MSC_VER
+ #if AUXILIARYFUNCTIONS_EXPORTS
+ #define EXTERN_AUXFUNCT __declspec (dllexport)
+ #else
+ #define EXTERN_AUXFUNCT __declspec (dllimport)
+ #endif
+#else
+ #define EXTERN_AUXFUNCT
+#endif
+
+#endif /* __DYNLIB_AUXILIARYFUNCTIONS_H__ */ \ No newline at end of file
diff --git a/src/auxiliaryFunctions/includes/find.h b/src/auxiliaryFunctions/includes/find.h
index 8683d1a0..202219c8 100644
--- a/src/auxiliaryFunctions/includes/find.h
+++ b/src/auxiliaryFunctions/includes/find.h
@@ -13,26 +13,36 @@
#ifndef __FIND_H__
#define __FIND_H__
+#include "dynlib_auxiliaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
** \brief Float Find function
*/
-void sfinda(float* x, int size, float *out, int *sizeOut);
+EXTERN_AUXFUNCT void sfinda(float* x, int size, float *out, int *sizeOut);
/*
** \brief Double Find function
*/
-void dfinda(double*x, int size, double *out, int *sizeOut);
+EXTERN_AUXFUNCT void dfinda(double*x, int size, double *out, int *sizeOut);
/*
** \brief Float Complex Find function
*/
-void cfinda(floatComplex* z, int size, float *out, int *sizeOut);
+EXTERN_AUXFUNCT void cfinda(floatComplex* z, int size, float *out, int *sizeOut);
/*
** \brief Double Complex Find function
*/
-void zfinda(doubleComplex* z, int size, double *out, int *sizeOut);
+EXTERN_AUXFUNCT void zfinda(doubleComplex* z, int size, double *out, int *sizeOut);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
#endif /* !__FIND_H__ */
diff --git a/src/auxiliaryFunctions/includes/find2d.h b/src/auxiliaryFunctions/includes/find2d.h
index 264d49d2..72c036d5 100644
--- a/src/auxiliaryFunctions/includes/find2d.h
+++ b/src/auxiliaryFunctions/includes/find2d.h
@@ -13,27 +13,36 @@
#ifndef __FIND2D_H__
#define __FIND2D_H__
+#include "dynlib_auxiliaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
** \brief Float Find function
*/
-void sfind2da(float* x, int rows, int columns, float* out1, int* sizeOut1, float* out2, int* sizeOut2);
+EXTERN_AUXFUNCT void sfind2da(float* x, int rows, int columns, float* out1, int* sizeOut1, float* out2, int* sizeOut2);
/*
** \brief Double Find function
*/
-void dfind2da(double* x, int rows, int columns, double* out1, int* sizeOut1, double* out2, int* sizeOut2);
+EXTERN_AUXFUNCT void dfind2da(double* x, int rows, int columns, double* out1, int* sizeOut1, double* out2, int* sizeOut2);
/*
** \brief Float Complex Find function
*/
-void cfind2da(floatComplex* z, int rows, int columns, float* out1, int* sizeOut1, float* out2, int* sizeOut2);
+EXTERN_AUXFUNCT void cfind2da(floatComplex* z, int rows, int columns, float* out1, int* sizeOut1, float* out2, int* sizeOut2);
/*
** \brief Double Complex Find function
*/
-void zfind2da(doubleComplex* z, int rows, int columns, double* out1, int* sizeOut1, double* out2, int* sizeOut2);
+EXTERN_AUXFUNCT void zfind2da(doubleComplex* z, int rows, int columns, double* out1, int* sizeOut1, double* out2, int* sizeOut2);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* !__FIND2D_H__ */
diff --git a/src/auxiliaryFunctions/includes/frexp.h b/src/auxiliaryFunctions/includes/frexp.h
index 1c3e6410..cb4d8f32 100644
--- a/src/auxiliaryFunctions/includes/frexp.h
+++ b/src/auxiliaryFunctions/includes/frexp.h
@@ -14,10 +14,19 @@
#define __FREXP_H__
#include <math.h>
+#include "dynlib_auxiliaryfunctions.h"
-float sfrexps(float _fltVal, float *_pfltExp);
+#ifdef __cplusplus
+extern "C" {
+#endif
-double dfrexps(double _dblVal, double *_pdblExp);
+EXTERN_AUXFUNCT float sfrexps(float _fltVal, float *_pfltExp);
+
+EXTERN_AUXFUNCT double dfrexps(double _dblVal, double *_pdblExp);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
diff --git a/src/auxiliaryFunctions/includes/isempty.h b/src/auxiliaryFunctions/includes/isempty.h
index daa21fa7..4248200a 100644
--- a/src/auxiliaryFunctions/includes/isempty.h
+++ b/src/auxiliaryFunctions/includes/isempty.h
@@ -13,13 +13,14 @@
#ifndef __IS_EMPTY_H__
#define __IS_EMPTY_H__
-#include <stdbool.h>
+
#include "floatComplex.h"
#include "doubleComplex.h"
#include "notFound.h"
#include "find.h"
+
/*
** \brief Float Is Empty function
*/
diff --git a/src/auxiliaryFunctions/includes/isnan.h b/src/auxiliaryFunctions/includes/isnan.h
index 889328bd..e0975c23 100644
--- a/src/auxiliaryFunctions/includes/isnan.h
+++ b/src/auxiliaryFunctions/includes/isnan.h
@@ -13,51 +13,59 @@
#ifndef __IS_NAN_H__
#define __IS_NAN_H__
-#include <stdbool.h>
#include <math.h>
-
+#include "dynlib_auxiliaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
** \brief Float Is Nan function
*/
-float sisnans(float x);
+EXTERN_AUXFUNCT float sisnans(float x);
/*
** \brief Double Is Nan function
*/
-double disnans(double x);
+EXTERN_AUXFUNCT double disnans(double x);
/*
** \brief Float Complex Is Nan function
*/
-float cisnans(floatComplex z);
+EXTERN_AUXFUNCT float cisnans(floatComplex z);
/*
** \brief Double Complex Is Nan function
*/
-double zisnans(doubleComplex z);
+EXTERN_AUXFUNCT double zisnans(doubleComplex z);
/*
** \brief Float Is Nan function
*/
-void sisnana(float* x, int size, float* out);
+EXTERN_AUXFUNCT void sisnana(float* x, int size, float* out);
/*
** \brief Double Is Nan function
*/
-void disnana(double* x, int size, double* out);
+EXTERN_AUXFUNCT void disnana(double* x, int size, double* out);
/*
** \brief Float Complex Is Nan function
*/
-void cisnana(floatComplex* z, int size, float* out);
+EXTERN_AUXFUNCT void cisnana(floatComplex* z, int size, float* out);
/*
** \brief Double Complex Is Nan function
*/
-void zisnana(doubleComplex* z, int size, double* out);
+EXTERN_AUXFUNCT void zisnana(doubleComplex* z, int size, double* out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* !__IS_NAN_H__ */
diff --git a/src/auxiliaryFunctions/includes/length.h b/src/auxiliaryFunctions/includes/length.h
index 8402a05e..f8939f18 100644
--- a/src/auxiliaryFunctions/includes/length.h
+++ b/src/auxiliaryFunctions/includes/length.h
@@ -14,6 +14,8 @@
#ifndef __LENGTH_H__
#define __LENGTH_H__
+#include "dynlib_auxiliaryfunctions.h"
+
/**
** WARNING :
** We assume size of arrays are known, so we
diff --git a/src/auxiliaryFunctions/includes/pythag.h b/src/auxiliaryFunctions/includes/pythag.h
index a6e469eb..9535a354 100644
--- a/src/auxiliaryFunctions/includes/pythag.h
+++ b/src/auxiliaryFunctions/includes/pythag.h
@@ -13,28 +13,38 @@
#ifndef __PYTHAG_H__
#define __PYTHAG_H__
+#include "dynlib_auxiliaryfunctions.h"
#include "multiplication.h"
#include "addition.h"
#include "sqrt.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
** \brief Float Pythag function
*/
-float spythags(float x, float y);
+EXTERN_AUXFUNCT float spythags(float x, float y);
/*
** \brief Double Pythag function
*/
-double dpythags(double x, double y);
+EXTERN_AUXFUNCT double dpythags(double x, double y);
/*
** \brief Float Complex Pythag function
*/
-floatComplex cpythags(floatComplex x, floatComplex y);
+EXTERN_AUXFUNCT floatComplex cpythags(floatComplex x, floatComplex y);
/*
** \brief Double Complex Pythag function
*/
-doubleComplex zpythags(doubleComplex x, doubleComplex y);
+EXTERN_AUXFUNCT doubleComplex zpythags(doubleComplex x, doubleComplex y);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* !__PYTHAG_H__ */
diff --git a/src/auxiliaryFunctions/includes/rand.h b/src/auxiliaryFunctions/includes/rand.h
index 1c6fc727..4716cbba 100644
--- a/src/auxiliaryFunctions/includes/rand.h
+++ b/src/auxiliaryFunctions/includes/rand.h
@@ -14,57 +14,65 @@
#define __RAND_H__
#include <math.h>
-
+#include "dynlib_auxiliaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
** \brief Float Rand function
** \return A random float.
**/
-float srands(void);
+EXTERN_AUXFUNCT float srands(void);
/**
** \brief Double Rand function
** \return A random double.
**/
-double drands(void);
+EXTERN_AUXFUNCT double drands(void);
/**
** \brief Float Complex Rand function
** \return A random float complex.
**/
-floatComplex crands(void);
+EXTERN_AUXFUNCT floatComplex crands(void);
/**
** \brief Double Complex Rand function
** \return A random double complex.
**/
-doubleComplex zrands(void);
+EXTERN_AUXFUNCT doubleComplex zrands(void);
/**
** \brief Float Array Rand function
** \return A random float array.
**/
-void sranda(float *out, int size);
+EXTERN_AUXFUNCT void sranda(float *out, int size);
/**
** \brief Double Array Rand function
** \return A random double array.
**/
-void dranda(double *out, int size);
+EXTERN_AUXFUNCT void dranda(double *out, int size);
/**
** \brief Float Complex Array Rand function
** \return A random float complex array.
**/
-void cranda(floatComplex *out, int size);
+EXTERN_AUXFUNCT void cranda(floatComplex *out, int size);
/**
** \brief Double Complex Array Rand function
** \return A random double complex array.
**/
-void zranda(doubleComplex *out, int size);
+EXTERN_AUXFUNCT void zranda(doubleComplex *out, int size);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
diff --git a/src/auxiliaryFunctions/includes/sign.h b/src/auxiliaryFunctions/includes/sign.h
index 46f9a765..0f69b4b7 100644
--- a/src/auxiliaryFunctions/includes/sign.h
+++ b/src/auxiliaryFunctions/includes/sign.h
@@ -15,16 +15,21 @@
#include <math.h>
+#include "dynlib_auxiliaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
** \brief Float Signe function
** Determine the sign of in (assume that 0 is positive).
** \param in : the float we must determine sign.
** \return -1 or +1 depending on the sign of in.
**/
-float ssigns(float in);
+EXTERN_AUXFUNCT float ssigns(float in);
/**
** \brief Double Signe function
@@ -32,7 +37,7 @@ float ssigns(float in);
** \param in : the double we must determine sign.
** \return -1 or +1 depending on the sign of in.
**/
-double dsigns(double in);
+EXTERN_AUXFUNCT double dsigns(double in);
/**
** \brief Float Complex Signe function
@@ -40,7 +45,7 @@ double dsigns(double in);
** \param in : the float we must determine sign.
** \return -1 or +1 depending on the sign of in.
**/
-floatComplex csigns(floatComplex in);
+EXTERN_AUXFUNCT floatComplex csigns(floatComplex in);
/**
** \brief Double Complex Signe function
@@ -48,7 +53,7 @@ floatComplex csigns(floatComplex in);
** \param in : the double we must determine sign.
** \return -1 or +1 depending on the sign of in.
**/
-doubleComplex zsigns(doubleComplex in);
+EXTERN_AUXFUNCT doubleComplex zsigns(doubleComplex in);
/**
** \brief Float Signe Array function
@@ -57,7 +62,7 @@ doubleComplex zsigns(doubleComplex in);
** \param size : the number of elements.
** \return -1 or +1 depending on the sign of in elements.
**/
-void ssigna(float *in, int size, float *out);
+EXTERN_AUXFUNCT void ssigna(float *in, int size, float *out);
/**
** \brief Double Signe Array function
@@ -66,7 +71,7 @@ void ssigna(float *in, int size, float *out);
** \param size : the number of elements.
** \return -1 or +1 depending on the sign of in elements.
**/
-void dsigna(double *in, int size, double *out);
+EXTERN_AUXFUNCT void dsigna(double *in, int size, double *out);
/**
** \brief Float Signe Complex Array function
@@ -75,7 +80,7 @@ void dsigna(double *in, int size, double *out);
** \param size : the number of elements.
** \return -1 or +1 depending on the sign of in elements.
**/
-void csigna(floatComplex *in, int size, floatComplex *out);
+EXTERN_AUXFUNCT void csigna(floatComplex *in, int size, floatComplex *out);
/**
** \brief Double Signe Complex Array function
@@ -84,6 +89,11 @@ void csigna(floatComplex *in, int size, floatComplex *out);
** \param size : the number of elements.
** \return -1 or +1 depending on the sign of in elements.
**/
-void zsigna(doubleComplex *in, int size, doubleComplex *out);
+EXTERN_AUXFUNCT void zsigna(doubleComplex *in, int size, doubleComplex *out);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* !__SIGN_H__ */