diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/elementary_functions/includes | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/elementary_functions/includes')
-rwxr-xr-x | modules/elementary_functions/includes/dynlib_elementary_functions.h | 28 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/elementary_functions.h | 28 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/finite.h | 25 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/gw_elementary_functions.h | 76 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/idmax.h | 32 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/idmin.h | 31 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/int2db.h | 30 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/rea2b.h | 27 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/rea2db.h | 30 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/scidcopy.h | 34 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/unsfdcopy.h | 36 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/vfinite.h | 24 | ||||
-rwxr-xr-x | modules/elementary_functions/includes/xerhlt.h | 34 |
13 files changed, 435 insertions, 0 deletions
diff --git a/modules/elementary_functions/includes/dynlib_elementary_functions.h b/modules/elementary_functions/includes/dynlib_elementary_functions.h new file mode 100755 index 000000000..07039bc54 --- /dev/null +++ b/modules/elementary_functions/includes/dynlib_elementary_functions.h @@ -0,0 +1,28 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) DIGITEO - 2010 - 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.1-en.txt +* +*/ + +/*--------------------------------------------------------------------------*/ +#ifndef __DYNLIB_ELEMENTARY_FUNCTIONS_H__ +#define __DYNLIB_ELEMENTARY_FUNCTIONS_H__ + +#ifdef _MSC_VER +#ifdef ELEMENTARY_FUNCTIONS_EXPORTS +#define ELEMENTARY_FUNCTIONS_IMPEXP __declspec(dllexport) +#else +#define ELEMENTARY_FUNCTIONS_IMPEXP __declspec(dllimport) +#endif +#else +#define ELEMENTARY_FUNCTIONS_IMPEXP +#endif + +#endif /* __DYNLIB_ELEMENTARY_FUNCTIONS_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/elementary_functions/includes/elementary_functions.h b/modules/elementary_functions/includes/elementary_functions.h new file mode 100755 index 000000000..36f7225f8 --- /dev/null +++ b/modules/elementary_functions/includes/elementary_functions.h @@ -0,0 +1,28 @@ +/* + * Scilab( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright(C) INRIA + * Copyright(C) DIGITEO - 2010 - 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.1-en.txt + * + */ + +#ifndef __ELEMENTARY_FUNCTIONS_H__ +#define __ELEMENTARY_FUNCTIONS_H__ + +#include "machine.h" /* C2F */ + +/* these functions as fortran subroutines of elementary_functions */ + +int C2F(dmcopy)(double *a, int *na, double *b, int *nb, int *m, int *n); +int C2F(dset)(int *n, double *dx, double *dy, int *incy); +int C2F(wwrdiv)(double *ar, double *ai, int *ia, double *br, double *bi, int *ib, double *rr, double *ri, int *ir, int *n, int *ierr); +int C2F(dmmul)(double *a, int *na, double *b, int *nb, double *c__, int *nc, int *l, int *m, int *n); +int C2F(dsort)(double *count, int *n, int *index); + +#endif /* __ELEMENTARY_FUNCTIONS_H__ */ + diff --git a/modules/elementary_functions/includes/finite.h b/modules/elementary_functions/includes/finite.h new file mode 100755 index 000000000..9369c9fa8 --- /dev/null +++ b/modules/elementary_functions/includes/finite.h @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) INRIA + * + * 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.1-en.txt + * + */ + +#ifndef __FINITE_H__ +#define __FINITE_H__ + +#include "doublecomplex.h" +#include "dynlib_elementary_functions.h" + +#ifndef HAVE_FINITE +ELEMENTARY_FUNCTIONS_IMPEXP int finite(double x); +#endif + +ELEMENTARY_FUNCTIONS_IMPEXP int finiteComplex(doublecomplex x); + +#endif /* __FINITE_H__ */ diff --git a/modules/elementary_functions/includes/gw_elementary_functions.h b/modules/elementary_functions/includes/gw_elementary_functions.h new file mode 100755 index 000000000..c2f5c14af --- /dev/null +++ b/modules/elementary_functions/includes/gw_elementary_functions.h @@ -0,0 +1,76 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - 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.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __GW_ELEMENTARIES_FUNCTIONS__ +#define __GW_ELEMENTARIES_FUNCTIONS__ +/*--------------------------------------------------------------------------*/ +#include "machine.h" +#include "dynlib_elementary_functions.h" +/*--------------------------------------------------------------------------*/ +ELEMENTARY_FUNCTIONS_IMPEXP int gw_elementary_functions(void); +/*--------------------------------------------------------------------------*/ +int sci_abs(char *fname, unsigned long fname_len); +int sci_real(char *fname, unsigned long fname_len); +int sci_imag(char *fname, unsigned long fname_len); +int sci_conj(char *fname, unsigned long fname_len); +int sci_round(char *fname, unsigned long fname_len); +int sci_int(char *fname, unsigned long fname_len); +int sci_size(char *fname, unsigned long fname_len); +int sci_sum(char *fname, unsigned long fname_len); +int sci_prod(char *fname, unsigned long fname_len); +int sci_diag(char *fname, unsigned long fname_len); +int sci_triu(char *fname, unsigned long fname_len); +int sci_tril(char *fname, unsigned long fname_len); +int sci_eye(char *fname, unsigned long fname_len); +int sci_rand(char *fname, unsigned long fname_len); +int sci_ones(char *fname, unsigned long fname_len); +int sci_maxi(char *fname, unsigned long fname_len); +int sci_kron(char *fname, unsigned long fname_len); +int sci_scimatrix(char *fname, unsigned long fname_len); +int sci_sin(char *fname, unsigned long fname_len); +int sci_cos(char *fname, unsigned long fname_len); +int sci_atan(char *fname, unsigned long fname_len); +int sci_exp(char *fname, unsigned long fname_len); +int sci_sqrt(char *fname, unsigned long fname_len); +int sci_log(char *fname, unsigned long fname_len); +int sci_chinesehat(char *fname, unsigned long fname_len); +int sci_sign(char *fname, unsigned long fname_len); +int sci_clean(char *fname, unsigned long fname_len); +int sci_floor(char *fname, unsigned long fname_len); +int sci_ceil(char *fname, unsigned long fname_len); +int sci_expm(char *fname, unsigned long fname_len); +int sci_cumsum(char *fname, unsigned long fname_len); +int sci_cumprod(char *fname, unsigned long fname_len); +int sci_testmatrix(char *fname, unsigned long fname_len); +int sci_isreal(char *fname, unsigned long fname_len); +int sci_frexp(char *fname, unsigned long fname_len); +int sci_zeros(char *fname, unsigned long fname_len); +int sci_tan(char *fname, unsigned long fname_len); +int sci_log1p(char *fname, unsigned long fname_len); +int sci_imult(char *fname, unsigned long fname_len); +int sci_asin(char *fname, unsigned long fname_len); +int sci_acos(char *fname, unsigned long fname_len); +int sci_number_properties(char *fname, unsigned long fname_len); +int sci_nearfloat(char *fname, unsigned long fname_len); +int sci_dsearch(char *fname, unsigned long fname_len); +int sci_isequal(char *fname, unsigned long fname_len); +int sci_spones(char *fname, unsigned long fname_len); +int sci_gsort(char *fname, unsigned long fname_len); +int sci_isequalbitwise(char *fname, unsigned long fname_len); +int sci_rat(char *fname, unsigned long fname_len); +int sci_base2dec(char *fname, unsigned long fname_len); +int sci_dec2base(char *fname, unsigned long fname_len); +int C2F(sci_find)(char *fname, unsigned long fname_len); +int sci_log10(char *fname, unsigned long fname_len); +#endif /* __GW_ELEMENTARIES_FUNCTIONS__ */ +/*--------------------------------------------------------------------------*/ + diff --git a/modules/elementary_functions/includes/idmax.h b/modules/elementary_functions/includes/idmax.h new file mode 100755 index 000000000..5e0a493c4 --- /dev/null +++ b/modules/elementary_functions/includes/idmax.h @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - 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.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __IDMAX_H__ +#define __IDMAX_H__ + +#include "machine.h" /* C2F */ +#include "dynlib_elementary_functions.h" + +/** +* finds the index of the first element having maximum value + * this function return 1 if x has only nan components : may be this is not a good behavior + * this function doesn't test if n<1 or incx<1 : this is done + * by the scilab interface + * @param n size of x + * @param x vector + * @param incr indice + * @return 0 +*/ +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(idmax)(int *n, double *x, int *incx); + +#endif /* __IDMAX_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/elementary_functions/includes/idmin.h b/modules/elementary_functions/includes/idmin.h new file mode 100755 index 000000000..7b49add61 --- /dev/null +++ b/modules/elementary_functions/includes/idmin.h @@ -0,0 +1,31 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - 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.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __IDMIN_H__ +#define __IDMIN_H__ + +#include "machine.h" /* C2F */ +#include "dynlib_elementary_functions.h" + +/** + * finds the index of the first element having minimum value + * this function return 1 if x has only nan components : may be this is not a good behavior + * this function doesn't test if n<1 or incx<1 : this is done by the scilab interface + * @param n size of x + * @param x vector + * @param incr indice + * @return 0 +*/ +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(idmin)(int *n, double *x, int *incx); + +#endif /* __IDMIN_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/elementary_functions/includes/int2db.h b/modules/elementary_functions/includes/int2db.h new file mode 100755 index 000000000..e995b7fe5 --- /dev/null +++ b/modules/elementary_functions/includes/int2db.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - 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.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __INT2DB_H__ +#define __INT2DB_H__ + +#include "machine.h" /* C2F */ +#include "dynlib_elementary_functions.h" + +/** +* translate a int vector to double precision vector +* @param n size of dx vector +* @param dx int vector +* @param incx increment order +* @param dy double precision vector +* @param incy increment order +*/ +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(int2db)(int *n, int *dx, int *incx, double *dy, int *incy); + +#endif /* __INT2DB_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/elementary_functions/includes/rea2b.h b/modules/elementary_functions/includes/rea2b.h new file mode 100755 index 000000000..14c499267 --- /dev/null +++ b/modules/elementary_functions/includes/rea2b.h @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - 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.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __REA2B_H__ +#define __REA2B_H__ + +/** +* translate a float vector to double precision vector +* @param n size of dx vector +* @param dx float vector +* @param incx increment order +* @param dy double precision vector +* @param incy increment order +*/ +int C2F(rea2db)(int *n, float *dx, int *incx, double *dy, int *incy); + +#endif /* __REA2B_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/elementary_functions/includes/rea2db.h b/modules/elementary_functions/includes/rea2db.h new file mode 100755 index 000000000..d2848ea10 --- /dev/null +++ b/modules/elementary_functions/includes/rea2db.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - 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.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ + +#ifndef __READ2DB_H__ +#define __READ2DB_H__ + +#include "machine.h" +#include "dynlib_elementary_functions.h" +/*--------------------------------------------------------------------------*/ +/* cette subroutine traduit un vecteur dx, de taille n, sur un + vecteur double precision dy. + dans le cas de deux increments egaux a 1, cette fonction + emploie des boucles "epanouies". + dans le cas ou les increments sont negatifs cette + fonction prend les composantes en ordre inverse. +*/ +/*--------------------------------------------------------------------------*/ +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(rea2db)(int *n, float *dx, int *incx, double *dy, int *incy); + +#endif /* __READ2DB_H__ */ diff --git a/modules/elementary_functions/includes/scidcopy.h b/modules/elementary_functions/includes/scidcopy.h new file mode 100755 index 000000000..d8a4f4b42 --- /dev/null +++ b/modules/elementary_functions/includes/scidcopy.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - Sylvestre LEDRU + * Copyright (C) 2010 - 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.1-en.txt + * + */ + +/*--------------------------------------------------------------------------*/ +/* rewrite unsfdcopy.f */ +/*--------------------------------------------------------------------------*/ +#ifndef __SCIDCOPY_H__ +#define __SCIDCOPY_H__ + +#include "machine.h" +#include "dynlib_elementary_functions.h" +/** + * <long-description> + * + * @param n + * @param dx + * @param incx + * @param dy + * @param incy + * @return <ReturnValue> + */ +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(scidcopy)(int *n, const long long *dx, int *incx, long long *dy, int *incy); + +#endif /* __SCIDCOPY_H__ */ diff --git a/modules/elementary_functions/includes/unsfdcopy.h b/modules/elementary_functions/includes/unsfdcopy.h new file mode 100755 index 000000000..a233d7f4e --- /dev/null +++ b/modules/elementary_functions/includes/unsfdcopy.h @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - Sylvestre LEDRU + * Copyright (C) 2010 - 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.1-en.txt + * + */ + +/*--------------------------------------------------------------------------*/ +/* rewrite unsfdcopy.f */ +/*--------------------------------------------------------------------------*/ + +#ifndef __UNSFDCOPY_H__ +#define __UNSFDCOPY_H__ + +#include "machine.h" +#include "dynlib_elementary_functions.h" + +/** + * <long-description> + * + * @param n + * @param dx + * @param incx + * @param dy + * @param incy + * @return <ReturnValue> + */ +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(unsfdcopy)(int *n, long long *dx, int *incx, long long *dy, int *incy); + +#endif /* __UNSFDCOPY_H__ */ diff --git a/modules/elementary_functions/includes/vfinite.h b/modules/elementary_functions/includes/vfinite.h new file mode 100755 index 000000000..18c0420d6 --- /dev/null +++ b/modules/elementary_functions/includes/vfinite.h @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) INRIA + * + * 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.1-en.txt + * + */ + +#ifndef __VFINITE__ +#define __VFINITE__ + +#include "machine.h" +#include "doublecomplex.h" +#include "dynlib_elementary_functions.h" + + +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(vfinite)(int *n, double *v); +ELEMENTARY_FUNCTIONS_IMPEXP int C2F(vfiniteComplex)(int *n, doublecomplex *v); + +#endif /* !__VFINITE__ */ diff --git a/modules/elementary_functions/includes/xerhlt.h b/modules/elementary_functions/includes/xerhlt.h new file mode 100755 index 000000000..168ffbfb3 --- /dev/null +++ b/modules/elementary_functions/includes/xerhlt.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - 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.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __XERHLT_H__ +#define __XERHLT_H__ + +#include "machine.h" /* C2F */ +#include "dynlib_elementary_functions.h" + +/** +* do a long jump (slatec) +* @param messg a message +* @param l length of messg +*/ +ELEMENTARY_FUNCTIONS_IMPEXP void C2F(xerhlt) (char *messg, unsigned long l); + +/** +* setjmp slatec +* @returns the value 0 if returning directly and non-zero +* when returning from longjmp() using the saved context +*/ +ELEMENTARY_FUNCTIONS_IMPEXP int setjmp_slatec_jmp_env(void); + +#endif /* __XERHLT_H__ */ +/*--------------------------------------------------------------------------*/ |