corr('fft', ...) 21/15521/8
Anais AUBERT [Thu, 13 Nov 2014 13:08:57 +0000 (14:08 +0100)]
deff('[y]=xmacro(se,ist)','y=sin(ist:(ist+se-1))');
x=xmacro(100,1);
[cc1,mm1]=corr(x,2^3);
[cc,mm]=corr('fft',xmacro,100,2^3)
[cc2,mm2]=corr('fft','corexx',100,2^3)

deff('[y]=ymacro(se,ist)','y=cos(ist:(ist+se-1))');
y=ymacro(100,1);
[cc1,mm1]=corr(x,y,2^3);
[cc,mm]=corr('fft',xmacro,ymacro,100,2^3)
[cc2,mm2]=corr('fft','corexx','corexy',100,2^3)

Change-Id: I455cdaf3e9359603800fcdc80cfb87604f5516dc

scilab/modules/signal_processing/Makefile.am
scilab/modules/signal_processing/Makefile.in
scilab/modules/signal_processing/sci_gateway/cpp/sci_corr.cpp
scilab/modules/signal_processing/sci_gateway/cpp/signal_processing_gw.vcxproj
scilab/modules/signal_processing/src/c/Ex-corr.h [new file with mode: 0644]
scilab/modules/signal_processing/src/c/signal_processing.vcxproj
scilab/modules/signal_processing/src/c/signal_processing.vcxproj.filters
scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.cpp [new file with mode: 0644]
scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.hxx [new file with mode: 0644]
scilab/modules/signal_processing/src/fortran/Ex-corr.f [moved from scilab/modules/signal_processing/sci_gateway/fortran/Ex-corr.f with 100% similarity]
scilab/modules/signal_processing/src/fortran/signal_processing_f.vfproj

index 09fcfe2..b9a3217 100644 (file)
@@ -3,6 +3,9 @@
 #
 # This file is distributed under the same license as the Scilab package.
 
+SIGNAL_PROCESSING_CPP_SOURCES = \
+    src/cpp/signalprocessingfunctions.cpp
+
 SIGNAL_PROCESSING_C_SOURCES = \
     src/c/corrtable.c \
     src/c/conv2.c
@@ -64,7 +67,8 @@ SIGNAL_PROCESSING_FORTRAN_SOURCES = \
     src/fortran/poles.f \
     src/fortran/desi00.f \
     src/fortran/desi21.f \
-    src/fortran/dfftmx.f
+    src/fortran/dfftmx.f\
+    src/fortran/Ex-corr.f
 
 GATEWAY_CPP_SOURCES = \
     sci_gateway/cpp/sci_rpem.cpp \
@@ -78,12 +82,11 @@ GATEWAY_C_SOURCES = \
     sci_gateway/c/sci_amell.c \
     sci_gateway/c/sci_conv2.c
 
-GATEWAY_FORTRAN_SOURCES = \
-    sci_gateway/fortran/Ex-corr.f
 
 libscisignal_processing_la_CPPFLAGS = \
     -I$(srcdir)/includes/ \
     -I$(srcdir)/src/c/ \
+    -I$(srcdir)/src/cpp/ \
     -I$(top_srcdir)/modules/ast/includes/ast/ \
     -I$(top_srcdir)/modules/ast/includes/exps/ \
     -I$(top_srcdir)/modules/ast/includes/operations/ \
@@ -93,12 +96,14 @@ libscisignal_processing_la_CPPFLAGS = \
     -I$(top_srcdir)/modules/ast/includes/types/ \
     -I$(top_srcdir)/modules/ast/includes/analysis/ \
     -I$(top_srcdir)/modules/api_scilab/includes/ \
+    -I$(top_srcdir)/modules/console/includes/ \
     -I$(top_srcdir)/modules/localization/includes/ \
     -I$(top_srcdir)/modules/output_stream/includes/ \
     -I$(top_srcdir)/modules/elementary_functions/includes/ \
     -I$(top_srcdir)/modules/functions_manager/includes/ \
     -I$(top_srcdir)/modules/dynamic_link/includes/ \
     -I$(top_srcdir)/modules/string/includes/ \
+    -I$(top_srcdir)/modules/threads/includes/ \
     $(EIGEN_CPPFLAGS) \
        $(AM_CPPFLAGS)
 
@@ -107,12 +112,12 @@ pkglib_LTLIBRARIES = libscisignal_processing.la
 noinst_LTLIBRARIES = libscisignal_processing-algo.la
 
 
-libscisignal_processing_algo_la_SOURCES = $(SIGNAL_PROCESSING_FORTRAN_SOURCES) $(SIGNAL_PROCESSING_C_SOURCES)
-libscisignal_processing_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES) $(GATEWAY_CPP_SOURCES)
-libscisignal_processing_algo_la_CFLAGS = $(libscisignal_processing_la_CPPFLAGS)
+libscisignal_processing_algo_la_SOURCES = $(SIGNAL_PROCESSING_FORTRAN_SOURCES) $(SIGNAL_PROCESSING_C_SOURCES) $(SIGNAL_PROCESSING_CPP_SOURCES)
+libscisignal_processing_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES)
+libscisignal_processing_algo_la_CPPFLAGS = $(libscisignal_processing_la_CPPFLAGS)
 
 # For the code check (splint)
-CHECK_SRC= $(SIGNAL_PROCESSING_C_SOURCES) $(GATEWAY_C_SOURCES)
+CHECK_SRC= $(SIGNAL_PROCESSING_C_SOURCES) $(GATEWAY_C_SOURCES) $(SIGNAL_PROCESSING_CPP_SOURCES)
 INCLUDE_FLAGS = $(libscisignal_processing_la_CPPFLAGS)
 
 libscisignal_processing_la_LIBADD = libscisignal_processing-algo.la
index cddbcc4..c1876d5 100644 (file)
@@ -189,11 +189,13 @@ am__objects_1 = src/fortran/degree.lo src/fortran/parcha.lo \
        src/fortran/snell.lo src/fortran/fft842.lo \
        src/fortran/tg02ad.lo src/fortran/remez.lo \
        src/fortran/poles.lo src/fortran/desi00.lo \
-       src/fortran/desi21.lo src/fortran/dfftmx.lo
+       src/fortran/desi21.lo src/fortran/dfftmx.lo \
+       src/fortran/Ex-corr.lo
 am__objects_2 = src/c/libscisignal_processing_algo_la-corrtable.lo \
        src/c/libscisignal_processing_algo_la-conv2.lo
+am__objects_3 = src/cpp/libscisignal_processing_algo_la-signalprocessingfunctions.lo
 am_libscisignal_processing_algo_la_OBJECTS = $(am__objects_1) \
-       $(am__objects_2)
+       $(am__objects_2) $(am__objects_3)
 libscisignal_processing_algo_la_OBJECTS =  \
        $(am_libscisignal_processing_algo_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -202,18 +204,17 @@ am__v_lt_0 = --silent
 am__v_lt_1 = 
 libscisignal_processing_la_DEPENDENCIES =  \
        libscisignal_processing-algo.la
-am__objects_3 = sci_gateway/c/libscisignal_processing_la-sci_remez.lo \
+am__objects_4 = sci_gateway/c/libscisignal_processing_la-sci_remez.lo \
        sci_gateway/c/libscisignal_processing_la-sci_amell.lo \
        sci_gateway/c/libscisignal_processing_la-sci_conv2.lo
-am__objects_4 = sci_gateway/fortran/Ex-corr.lo
 am__objects_5 =  \
        sci_gateway/cpp/libscisignal_processing_la-sci_rpem.lo \
        sci_gateway/cpp/libscisignal_processing_la-sci_corr.lo \
        sci_gateway/cpp/libscisignal_processing_la-sci_delip.lo \
        sci_gateway/cpp/libscisignal_processing_la-sci_fft.lo \
        sci_gateway/cpp/libscisignal_processing_la-sci_syredi.lo
-am_libscisignal_processing_la_OBJECTS = $(am__objects_3) \
-       $(am__objects_4) $(am__objects_5)
+am_libscisignal_processing_la_OBJECTS = $(am__objects_4) \
+       $(am__objects_5)
 libscisignal_processing_la_OBJECTS =  \
        $(am_libscisignal_processing_la_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
@@ -599,6 +600,9 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 yacc_present = @yacc_present@
+SIGNAL_PROCESSING_CPP_SOURCES = \
+    src/cpp/signalprocessingfunctions.cpp
+
 SIGNAL_PROCESSING_C_SOURCES = \
     src/c/corrtable.c \
     src/c/conv2.c
@@ -660,7 +664,8 @@ SIGNAL_PROCESSING_FORTRAN_SOURCES = \
     src/fortran/poles.f \
     src/fortran/desi00.f \
     src/fortran/desi21.f \
-    src/fortran/dfftmx.f
+    src/fortran/dfftmx.f\
+    src/fortran/Ex-corr.f
 
 GATEWAY_CPP_SOURCES = \
     sci_gateway/cpp/sci_rpem.cpp \
@@ -674,12 +679,10 @@ GATEWAY_C_SOURCES = \
     sci_gateway/c/sci_amell.c \
     sci_gateway/c/sci_conv2.c
 
-GATEWAY_FORTRAN_SOURCES = \
-    sci_gateway/fortran/Ex-corr.f
-
 libscisignal_processing_la_CPPFLAGS = \
     -I$(srcdir)/includes/ \
     -I$(srcdir)/src/c/ \
+    -I$(srcdir)/src/cpp/ \
     -I$(top_srcdir)/modules/ast/includes/ast/ \
     -I$(top_srcdir)/modules/ast/includes/exps/ \
     -I$(top_srcdir)/modules/ast/includes/operations/ \
@@ -689,23 +692,25 @@ libscisignal_processing_la_CPPFLAGS = \
     -I$(top_srcdir)/modules/ast/includes/types/ \
     -I$(top_srcdir)/modules/ast/includes/analysis/ \
     -I$(top_srcdir)/modules/api_scilab/includes/ \
+    -I$(top_srcdir)/modules/console/includes/ \
     -I$(top_srcdir)/modules/localization/includes/ \
     -I$(top_srcdir)/modules/output_stream/includes/ \
     -I$(top_srcdir)/modules/elementary_functions/includes/ \
     -I$(top_srcdir)/modules/functions_manager/includes/ \
     -I$(top_srcdir)/modules/dynamic_link/includes/ \
     -I$(top_srcdir)/modules/string/includes/ \
+    -I$(top_srcdir)/modules/threads/includes/ \
     $(EIGEN_CPPFLAGS) \
        $(AM_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscisignal_processing.la
 noinst_LTLIBRARIES = libscisignal_processing-algo.la
-libscisignal_processing_algo_la_SOURCES = $(SIGNAL_PROCESSING_FORTRAN_SOURCES) $(SIGNAL_PROCESSING_C_SOURCES)
-libscisignal_processing_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES) $(GATEWAY_CPP_SOURCES)
-libscisignal_processing_algo_la_CFLAGS = $(libscisignal_processing_la_CPPFLAGS)
+libscisignal_processing_algo_la_SOURCES = $(SIGNAL_PROCESSING_FORTRAN_SOURCES) $(SIGNAL_PROCESSING_C_SOURCES) $(SIGNAL_PROCESSING_CPP_SOURCES)
+libscisignal_processing_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES)
+libscisignal_processing_algo_la_CPPFLAGS = $(libscisignal_processing_la_CPPFLAGS)
 
 # For the code check (splint)
-CHECK_SRC = $(SIGNAL_PROCESSING_C_SOURCES) $(GATEWAY_C_SOURCES)
+CHECK_SRC = $(SIGNAL_PROCESSING_C_SOURCES) $(GATEWAY_C_SOURCES) $(SIGNAL_PROCESSING_CPP_SOURCES)
 INCLUDE_FLAGS = $(libscisignal_processing_la_CPPFLAGS)
 libscisignal_processing_la_LIBADD = libscisignal_processing-algo.la
 
@@ -1000,6 +1005,8 @@ src/fortran/desi21.lo: src/fortran/$(am__dirstamp) \
        src/fortran/$(DEPDIR)/$(am__dirstamp)
 src/fortran/dfftmx.lo: src/fortran/$(am__dirstamp) \
        src/fortran/$(DEPDIR)/$(am__dirstamp)
+src/fortran/Ex-corr.lo: src/fortran/$(am__dirstamp) \
+       src/fortran/$(DEPDIR)/$(am__dirstamp)
 src/c/$(am__dirstamp):
        @$(MKDIR_P) src/c
        @: > src/c/$(am__dirstamp)
@@ -1010,9 +1017,17 @@ src/c/libscisignal_processing_algo_la-corrtable.lo:  \
        src/c/$(am__dirstamp) src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libscisignal_processing_algo_la-conv2.lo: src/c/$(am__dirstamp) \
        src/c/$(DEPDIR)/$(am__dirstamp)
+src/cpp/$(am__dirstamp):
+       @$(MKDIR_P) src/cpp
+       @: > src/cpp/$(am__dirstamp)
+src/cpp/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/cpp/$(DEPDIR)
+       @: > src/cpp/$(DEPDIR)/$(am__dirstamp)
+src/cpp/libscisignal_processing_algo_la-signalprocessingfunctions.lo:  \
+       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
 
 libscisignal_processing-algo.la: $(libscisignal_processing_algo_la_OBJECTS) $(libscisignal_processing_algo_la_DEPENDENCIES) $(EXTRA_libscisignal_processing_algo_la_DEPENDENCIES) 
-       $(AM_V_F77LD)$(F77LINK)  $(libscisignal_processing_algo_la_OBJECTS) $(libscisignal_processing_algo_la_LIBADD) $(LIBS)
+       $(AM_V_CXXLD)$(CXXLINK)  $(libscisignal_processing_algo_la_OBJECTS) $(libscisignal_processing_algo_la_LIBADD) $(LIBS)
 sci_gateway/c/$(am__dirstamp):
        @$(MKDIR_P) sci_gateway/c
        @: > sci_gateway/c/$(am__dirstamp)
@@ -1028,14 +1043,6 @@ sci_gateway/c/libscisignal_processing_la-sci_amell.lo:  \
 sci_gateway/c/libscisignal_processing_la-sci_conv2.lo:  \
        sci_gateway/c/$(am__dirstamp) \
        sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
-sci_gateway/fortran/$(am__dirstamp):
-       @$(MKDIR_P) sci_gateway/fortran
-       @: > sci_gateway/fortran/$(am__dirstamp)
-sci_gateway/fortran/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) sci_gateway/fortran/$(DEPDIR)
-       @: > sci_gateway/fortran/$(DEPDIR)/$(am__dirstamp)
-sci_gateway/fortran/Ex-corr.lo: sci_gateway/fortran/$(am__dirstamp) \
-       sci_gateway/fortran/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/cpp/$(am__dirstamp):
        @$(MKDIR_P) sci_gateway/cpp
        @: > sci_gateway/cpp/$(am__dirstamp)
@@ -1067,10 +1074,10 @@ mostlyclean-compile:
        -rm -f sci_gateway/c/*.lo
        -rm -f sci_gateway/cpp/*.$(OBJEXT)
        -rm -f sci_gateway/cpp/*.lo
-       -rm -f sci_gateway/fortran/*.$(OBJEXT)
-       -rm -f sci_gateway/fortran/*.lo
        -rm -f src/c/*.$(OBJEXT)
        -rm -f src/c/*.lo
+       -rm -f src/cpp/*.$(OBJEXT)
+       -rm -f src/cpp/*.lo
        -rm -f src/fortran/*.$(OBJEXT)
        -rm -f src/fortran/*.lo
 
@@ -1087,6 +1094,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscisignal_processing_la-sci_syredi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscisignal_processing_algo_la-conv2.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscisignal_processing_algo_la-corrtable.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libscisignal_processing_algo_la-signalprocessingfunctions.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1113,18 +1121,18 @@ distclean-compile:
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 src/c/libscisignal_processing_algo_la-corrtable.lo: src/c/corrtable.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscisignal_processing_algo_la_CFLAGS) $(CFLAGS) -MT src/c/libscisignal_processing_algo_la-corrtable.lo -MD -MP -MF src/c/$(DEPDIR)/libscisignal_processing_algo_la-corrtable.Tpo -c -o src/c/libscisignal_processing_algo_la-corrtable.lo `test -f 'src/c/corrtable.c' || echo '$(srcdir)/'`src/c/corrtable.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscisignal_processing_algo_la-corrtable.lo -MD -MP -MF src/c/$(DEPDIR)/libscisignal_processing_algo_la-corrtable.Tpo -c -o src/c/libscisignal_processing_algo_la-corrtable.lo `test -f 'src/c/corrtable.c' || echo '$(srcdir)/'`src/c/corrtable.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscisignal_processing_algo_la-corrtable.Tpo src/c/$(DEPDIR)/libscisignal_processing_algo_la-corrtable.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/corrtable.c' object='src/c/libscisignal_processing_algo_la-corrtable.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscisignal_processing_algo_la_CFLAGS) $(CFLAGS) -c -o src/c/libscisignal_processing_algo_la-corrtable.lo `test -f 'src/c/corrtable.c' || echo '$(srcdir)/'`src/c/corrtable.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscisignal_processing_algo_la-corrtable.lo `test -f 'src/c/corrtable.c' || echo '$(srcdir)/'`src/c/corrtable.c
 
 src/c/libscisignal_processing_algo_la-conv2.lo: src/c/conv2.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscisignal_processing_algo_la_CFLAGS) $(CFLAGS) -MT src/c/libscisignal_processing_algo_la-conv2.lo -MD -MP -MF src/c/$(DEPDIR)/libscisignal_processing_algo_la-conv2.Tpo -c -o src/c/libscisignal_processing_algo_la-conv2.lo `test -f 'src/c/conv2.c' || echo '$(srcdir)/'`src/c/conv2.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscisignal_processing_algo_la-conv2.lo -MD -MP -MF src/c/$(DEPDIR)/libscisignal_processing_algo_la-conv2.Tpo -c -o src/c/libscisignal_processing_algo_la-conv2.lo `test -f 'src/c/conv2.c' || echo '$(srcdir)/'`src/c/conv2.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscisignal_processing_algo_la-conv2.Tpo src/c/$(DEPDIR)/libscisignal_processing_algo_la-conv2.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/conv2.c' object='src/c/libscisignal_processing_algo_la-conv2.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscisignal_processing_algo_la_CFLAGS) $(CFLAGS) -c -o src/c/libscisignal_processing_algo_la-conv2.lo `test -f 'src/c/conv2.c' || echo '$(srcdir)/'`src/c/conv2.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscisignal_processing_algo_la-conv2.lo `test -f 'src/c/conv2.c' || echo '$(srcdir)/'`src/c/conv2.c
 
 sci_gateway/c/libscisignal_processing_la-sci_remez.lo: sci_gateway/c/sci_remez.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libscisignal_processing_la-sci_remez.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libscisignal_processing_la-sci_remez.Tpo -c -o sci_gateway/c/libscisignal_processing_la-sci_remez.lo `test -f 'sci_gateway/c/sci_remez.c' || echo '$(srcdir)/'`sci_gateway/c/sci_remez.c
@@ -1171,6 +1179,13 @@ sci_gateway/c/libscisignal_processing_la-sci_conv2.lo: sci_gateway/c/sci_conv2.c
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
+src/cpp/libscisignal_processing_algo_la-signalprocessingfunctions.lo: src/cpp/signalprocessingfunctions.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libscisignal_processing_algo_la-signalprocessingfunctions.lo -MD -MP -MF src/cpp/$(DEPDIR)/libscisignal_processing_algo_la-signalprocessingfunctions.Tpo -c -o src/cpp/libscisignal_processing_algo_la-signalprocessingfunctions.lo `test -f 'src/cpp/signalprocessingfunctions.cpp' || echo '$(srcdir)/'`src/cpp/signalprocessingfunctions.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libscisignal_processing_algo_la-signalprocessingfunctions.Tpo src/cpp/$(DEPDIR)/libscisignal_processing_algo_la-signalprocessingfunctions.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/signalprocessingfunctions.cpp' object='src/cpp/libscisignal_processing_algo_la-signalprocessingfunctions.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libscisignal_processing_algo_la-signalprocessingfunctions.lo `test -f 'src/cpp/signalprocessingfunctions.cpp' || echo '$(srcdir)/'`src/cpp/signalprocessingfunctions.cpp
+
 sci_gateway/cpp/libscisignal_processing_la-sci_rpem.lo: sci_gateway/cpp/sci_rpem.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscisignal_processing_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscisignal_processing_la-sci_rpem.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscisignal_processing_la-sci_rpem.Tpo -c -o sci_gateway/cpp/libscisignal_processing_la-sci_rpem.lo `test -f 'sci_gateway/cpp/sci_rpem.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_rpem.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscisignal_processing_la-sci_rpem.Tpo sci_gateway/cpp/$(DEPDIR)/libscisignal_processing_la-sci_rpem.Plo
@@ -1222,8 +1237,8 @@ clean-libtool:
        -rm -rf .libs _libs
        -rm -rf sci_gateway/c/.libs sci_gateway/c/_libs
        -rm -rf sci_gateway/cpp/.libs sci_gateway/cpp/_libs
-       -rm -rf sci_gateway/fortran/.libs sci_gateway/fortran/_libs
        -rm -rf src/c/.libs src/c/_libs
+       -rm -rf src/cpp/.libs src/cpp/_libs
        -rm -rf src/fortran/.libs src/fortran/_libs
 install-libscisignal_processing_la_etcDATA: $(libscisignal_processing_la_etc_DATA)
        @$(NORMAL_INSTALL)
@@ -1409,10 +1424,10 @@ distclean-generic:
        -rm -f sci_gateway/c/$(am__dirstamp)
        -rm -f sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
        -rm -f sci_gateway/cpp/$(am__dirstamp)
-       -rm -f sci_gateway/fortran/$(DEPDIR)/$(am__dirstamp)
-       -rm -f sci_gateway/fortran/$(am__dirstamp)
        -rm -f src/c/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/c/$(am__dirstamp)
+       -rm -f src/cpp/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/cpp/$(am__dirstamp)
        -rm -f src/fortran/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/fortran/$(am__dirstamp)
 
@@ -1425,7 +1440,7 @@ clean-am: clean-generic clean-libtool clean-local \
        clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-       -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR)
+       -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR) src/cpp/$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
        distclean-local distclean-tags
@@ -1474,7 +1489,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-       -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR)
+       -rm -rf sci_gateway/c/$(DEPDIR) sci_gateway/cpp/$(DEPDIR) src/c/$(DEPDIR) src/cpp/$(DEPDIR)
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
index c30c61f..aca2cdd 100644 (file)
@@ -1,6 +1,7 @@
 /*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2011 - DIGITEO - Antoine ELIAS
+* Copyright (C) 2014 - Scilab Enterprises - Anais AUBERT
 *
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
@@ -14,7 +15,9 @@
 #include "signal_gw.hxx"
 #include "double.hxx"
 #include "string.hxx"
+#include "internal.hxx"
 #include "function.hxx"
+#include "signalprocessingfunctions.hxx"
 
 extern "C"
 {
@@ -22,9 +25,6 @@ extern "C"
 #include "Scierror.h"
 #include "sciprint.h"
 
-    //fortran prototypes
-    extern void C2F(tscccf)(double *x, double *y, int *length, double *cxy, double *xymean, int *lag, int *error);
-
 }
 
 /*--------------------------------------------------------------------------*/
@@ -40,20 +40,29 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ
     //call format
     if (in[0]->isString())
     {
-        sciprint(_("%ls: Need to plug external call"), L"corr");
-        return types::Function::Error;
-
         types::String* pS = in[0]->getAs<types::String>();
         if (pS->getSize() == 1 && pS->get(0)[0] == L'f')
         {
             //[cov,mean]=corr('fft',xmacro,[ymacro],n,sect)
-            int iErr                    = 0;
-            int iSect                   = 0;
-            int iTotalSize              = 0;
-            int iSize                   = 0;
-            int iMode                   = 0;
-            types::Callable* pXFunction = NULL;
-            types::Callable* pYFunction = NULL;
+            types::InternalType* pXFunction = NULL;
+            types::InternalType* pYFunction = NULL;
+
+            int iErr        = 0;
+            int iSect       = 0;
+            int iOutSize    = 0;
+            int iTotalSize  = 0;
+            int iSize       = 0;
+            int iMode       = 0;
+
+            double* xa = NULL;
+            double* xi = NULL;
+            double* xr = NULL;
+            double* zr = NULL;
+            double* zi = NULL;
+
+            char *dx = NULL;
+            char *dy = NULL;
+            bool bOK = false;
 
             //check input parameters
             if (in.size() < 4 || in.size() > 5)
@@ -70,7 +79,8 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ
                 return types::Function::Error;
             }
 
-            iSect = (int)in[iPos]->getAs<types::Double>()->get(0);
+            iOutSize = (int)in[iPos]->getAs<types::Double>()->get(0);
+            iSect = iOutSize * 2;
 
             //get parameter n
             iPos--;
@@ -82,29 +92,80 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ
 
             iTotalSize = (int)in[iPos]->getAs<types::Double>()->get(0);
 
+            Signalprocessingfunctions* spFunctionsManager = new Signalprocessingfunctions(L"corr");
+            Signalprocessing::addSignalprocessingfunctions(spFunctionsManager);
+
             //get xmacro
-            if (in[1]->isCallable() == false)
+            if (in[1]->isCallable())
             {
-                Scierror(999, _("%s: Wrong type for input argument #%d: A function expected.\n"), "corr", 2);
+                pXFunction = in[1]->getAs<types::Callable>();
+                spFunctionsManager->setDgetx(in[1]->getAs<types::Callable>());
+            }
+            else if (in[1]->isString())
+            {
+                pXFunction = in[1]->getAs<types::String>();
+                spFunctionsManager->setDgetx(in[1]->getAs<types::String>());
+            }
+            else
+            {
+                Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), "corr", iPos + 1);
                 return types::Function::Error;
             }
 
-            pXFunction = in[1]->getAs<types::Callable>();
             iMode = 2;
 
             if (in.size() == 5)
             {
                 //get ymacro
-                if (in[2]->isCallable() == false)
+                if (in[2]->isCallable())
+                {
+                    pYFunction = in[2]->getAs<types::Callable>();
+                    spFunctionsManager->setDgety(in[2]->getAs<types::Callable>());
+                }
+                else if (in[2]->isString())
                 {
-                    Scierror(999, _("%s: Wrong type for input argument #%d: A function expected.\n"), "corr", 3);
+                    pYFunction = in[2]->getAs<types::String>();
+                    spFunctionsManager->setDgety(in[2]->getAs<types::String>());
+                }
+                else
+                {
+                    Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), "corr", iPos + 2);
                     return types::Function::Error;
                 }
 
-                pYFunction = in[2]->getAs<types::Callable>();
                 iMode = 3;
             }
 
+            xa = new double[iSect];
+            xr = new double[iSect];
+            xi = new double[iSect];
+            zr = new double[iSect / 2 + 1];
+            zi = new double[iSect / 2 + 1];
+            C2F(cmpse2)(&iSect, &iTotalSize, &iMode, (void*) dgetx_f, (void*) dgety_f, xa, xr, xi, zr, zi, &iErr);
+
+            delete[] xi;
+            delete[] zr;
+            delete[] zi;
+
+            if (iErr > 0)
+            {
+                delete[] xa;
+                delete[] xr;
+                Scierror(999, _("fft call : needs power of two!"));
+                return types::Function::Error;
+            }
+
+            types::Double *pDblOut1 = new types::Double(1, iOutSize);
+            pDblOut1->set(xa);
+            delete[] xa;
+            out.push_back(pDblOut1);
+
+            types::Double *pDblOut2 = new types::Double(1, iMode - 1);
+            pDblOut2->set(xr);
+            delete[] xr;
+            out.push_back(pDblOut2);
+
+            return types::Function::OK;
         }
         else if (pS->getSize() == 1 && pS->get(0)[0] == L'u')
         {
@@ -129,7 +190,6 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ
         int iSize                       = 0;
         double pdblMean[2];
 
-
         //check input parameters
         if (in.size() < 2 || in.size() > 3)
         {
@@ -146,7 +206,6 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ
         }
 
         iCorrelation = (int)in[iPos]->getAs<types::Double>()->get(0);
-        pDblCorrelation = new types::Double(1, iCorrelation);
 
         if (in.size() == 3)
         {
@@ -185,10 +244,11 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ
         }
 
         iSize = pDblX->getSize();
-
+        pDblCorrelation = new types::Double(1, iCorrelation);
         C2F(tscccf)(pDblX->get(), pDblY->get(), &iSize, pDblCorrelation->get(), pdblMean, &iCorrelation, &iErr);
         if (iErr == -1)
         {
+            delete pDblCorrelation;
             Scierror(999, _("%s: Too many coefficients are required.\n"), "corr");
             return types::Function::Error;
         }
@@ -210,5 +270,7 @@ types::Function::ReturnValue sci_corr(types::typed_list &in, int _iRetCount, typ
             out.push_back(pDblMean);
         }
     }
+
     return types::Function::OK;
-}
\ No newline at end of file
+}
+
index e687b0e..d1ff5da 100644 (file)
@@ -80,7 +80,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../src/c;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../src/c;../../src/cpp;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../threads/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../src/c;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../src/c;../../src/cpp;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../threads/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../src/c;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../src/c;../../src/cpp;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../threads/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../src/c;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../src/c;../../src/cpp;../../includes;../../../../libs/intl;../../../../libs/Eigen/includes;../../../functions_manager/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../dynamic_link/includes;../../../string/includes;../../../threads/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
diff --git a/scilab/modules/signal_processing/src/c/Ex-corr.h b/scilab/modules/signal_processing/src/c/Ex-corr.h
new file mode 100644 (file)
index 0000000..5b73956
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2014 - Scilab Enterprises - Anais AUBERT
+*
+* 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 __EX_CORR_H__
+#define __EX_CORR_H__
+
+void C2F(corexx)(double* x, int* incr, int* istart);
+void C2F(corexy)(double* y, int* incr, int* istart);
+
+#endif // __EX_CORR_H__
index 99ed0a6..2f1f253 100644 (file)
@@ -80,7 +80,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../elementary_functions/includes;../../../threads/includes;../../../../libs/Eigen/includes;../../../console/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -108,7 +108,7 @@ lib /DEF:"$(ProjectDir)signal_processing_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../elementary_functions/includes;../../../threads/includes;../../../../libs/Eigen/includes;../../../console/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -134,7 +134,7 @@ lib /DEF:"$(ProjectDir)signal_processing_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../elementary_functions/includes;../../../threads/includes;../../../../libs/Eigen/includes;../../../console/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -167,7 +167,7 @@ lib /DEF:"$(ProjectDir)signal_processing_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/intl;../../../output_stream/includes;../../../localization/includes;../../../dynamic_link/includes;../../../string/includes;../../../core/includes;../../../statistics/includes;../../../api_scilab/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../elementary_functions/includes;../../../threads/includes;../../../../libs/Eigen/includes;../../../console/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SIGNAL_PROCESSING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -194,6 +194,7 @@ lib /DEF:"$(ProjectDir)signal_processing_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <ClCompile Include="..\cpp\signalprocessingfunctions.cpp" />
     <ClCompile Include="conv2.c" />
     <ClCompile Include="corrtable.c" />
     <ClCompile Include="DllmainSignal_processing.c" />
@@ -201,6 +202,7 @@ lib /DEF:"$(ProjectDir)signal_processing_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_signal_processing.h" />
+    <ClInclude Include="..\cpp\signalprocessingfunctions.hxx" />
     <ClInclude Include="conv2.h" />
   </ItemGroup>
   <ItemGroup>
@@ -226,10 +228,16 @@ lib /DEF:"$(ProjectDir)signal_processing_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
       <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\ast\ast.vcxproj">
+      <Project>{0d3fa25b-8116-44ec-a45e-260789daa3d9}</Project>
+    </ProjectReference>
     <ProjectReference Include="..\..\..\dynamic_link\src\c\dynamic_link.vcxproj">
       <Project>{eab6c580-22b3-4359-ba1d-dd7499a96163}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
+      <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
+    </ProjectReference>
     <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
       <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
@@ -238,6 +246,9 @@ lib /DEF:"$(ProjectDir)signal_processing_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
       <Project>{fe9eb721-b3c1-41d8-b585-3fb3a0083cec}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\threads\threads.vcxproj">
+      <Project>{50a1ffc8-adc2-4d9e-a2d0-5dcd63188ae9}</Project>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
index b12a5b7..0ac94ee 100644 (file)
@@ -35,6 +35,9 @@
     <ClCompile Include="conv2.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\cpp\signalprocessingfunctions.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_signal_processing.h">
@@ -43,6 +46,9 @@
     <ClInclude Include="conv2.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\cpp\signalprocessingfunctions.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="core_import.def">
diff --git a/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.cpp b/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.cpp
new file mode 100644 (file)
index 0000000..57c4754
--- /dev/null
@@ -0,0 +1,359 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2014 - Scilab Enterprises - Anais AUBERT
+*
+* 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
+*
+*/
+/*--------------------------------------------------------------------------*/
+
+#include "execvisitor.hxx"
+#include "double.hxx"
+#include "signalprocessingfunctions.hxx"
+
+extern "C"
+{
+#include "elem_common.h"
+#include "Ex-corr.h"
+#include "localization.h"
+}
+
+/*--------------------------------------------------------------------------*/
+
+std::map<__threadId, Signalprocessingfunctions*> Signalprocessing::m_mapSignalprocessingfunctions;
+
+void Signalprocessing::addSignalprocessingfunctions(Signalprocessingfunctions* _spFunction)
+{
+    types::ThreadId* pThread = ConfigVariable::getLastRunningThread();
+    m_mapSignalprocessingfunctions[pThread->getThreadId()] = _spFunction;
+}
+
+void Signalprocessing::removeSignalprocessingfunctions()
+{
+    types::ThreadId* pThread = ConfigVariable::getLastRunningThread();
+    m_mapSignalprocessingfunctions.erase(pThread->getThreadId());
+}
+
+Signalprocessingfunctions* Signalprocessing::getSignalprocessingfunctions()
+{
+    types::ThreadId* pThread = ConfigVariable::getLastRunningThread();
+    return m_mapSignalprocessingfunctions[pThread->getThreadId()];
+}
+
+Signalprocessingfunctions::Signalprocessingfunctions(std::wstring callerName)
+{
+
+    m_wstrCaller = callerName;
+
+    m_pCallDgetx = NULL;
+    m_pCallDgety = NULL;
+
+    m_pStringDgetxDyn = NULL;
+    m_pStringDgetyDyn = NULL;
+
+    m_pStringDgetxStatic = NULL;
+    m_pStringDgetyStatic = NULL;
+
+    // init static functions
+    if (callerName == L"corr")
+    {
+        m_staticFunctionMap[L"corexx"]   = (void*) C2F(corexx);
+        m_staticFunctionMap[L"corexy"]     = (void*) C2F(corexy);
+
+    }
+}
+
+void Signalprocessingfunctions::execFunctionDgetx(double* x, int* siz, int* iss)
+{
+    char errorMsg[256];
+    if (m_pCallDgetx)
+    {
+        callDgetx(x, siz, iss);
+    }
+    else if (m_pStringDgetxDyn)
+    {
+        ConfigVariable::EntryPointStr* func = ConfigVariable::getEntryPoint(m_pStringDgetxDyn->get(0));
+        if (func == NULL)
+        {
+            sprintf(errorMsg, _("Undefined fonction '%ls'.\n"), m_pStringDgetxDyn->get(0));
+            throw ast::ScilabError(errorMsg);
+        }
+        ((dgetx_f_t)(func->functionPtr))(x, siz, iss);
+    }
+    else if (m_pStringDgetxStatic)// function static
+    {
+        ((dgetx_f_t)m_staticFunctionMap[m_pStringDgetxStatic->get(0)])(x, siz, iss);
+    }
+    else
+    {
+        sprintf(errorMsg, _("User function '%s' have not been setted.\n"), "g");
+        throw ast::ScilabError(errorMsg);
+    }
+}
+
+void Signalprocessingfunctions::setDgetx(types::Callable* _dgetx)
+{
+    m_pCallDgetx = _dgetx;
+}
+
+void Signalprocessingfunctions::setDgetx(types::String* _dgetx)
+{
+    m_pStringDgetxStatic = _dgetx;
+}
+void Signalprocessingfunctions::setDgety(types::Callable* _dgety)
+{
+    m_pCallDgety = _dgety;
+}
+void Signalprocessingfunctions::setDgety(types::String* _dgety)
+{
+    m_pStringDgetyStatic = _dgety;
+}
+
+//param for fortran call
+void dgetx_f(double* x, int* siz, int* iss)
+{
+    Signalprocessingfunctions* spFunction = NULL;
+    spFunction = Signalprocessing::getSignalprocessingfunctions();
+
+    if (spFunction == NULL)
+    {
+        throw ast::ScilabError(_("An error occurred while getting Signalprocessingfunctions object.\n"));
+    }
+
+    spFunction->execFunctionDgetx(x, siz, iss);
+}
+
+void Signalprocessingfunctions::execFunctionDgety(double* y, int* siz, int* iss)
+{
+    char errorMsg[256];
+    if (m_pCallDgety)
+    {
+        callDgety(y, siz, iss);
+
+    }
+    else if (m_pStringDgetxDyn)
+    {
+        ConfigVariable::EntryPointStr* func = ConfigVariable::getEntryPoint(m_pStringDgetyDyn->get(0));
+        if (func == NULL)
+        {
+            sprintf(errorMsg, _("Undefined fonction '%ls'.\n"), m_pStringDgetyDyn->get(0));
+            throw ast::ScilabError(errorMsg);
+        }
+        ((dgety_f_t)(func->functionPtr))(y, siz, iss);
+    }
+    else if (m_pStringDgetyStatic)// function static
+    {
+        ((dgety_f_t)m_staticFunctionMap[m_pStringDgetyStatic->get(0)])(y, siz, iss);
+    }
+    else
+    {
+        sprintf(errorMsg, _("User function '%s' have not been setted.\n"), "g");
+        throw ast::ScilabError(errorMsg);
+    }
+}
+
+//param for fortran call
+void dgety_f(double* y, int* siz, int* iss)
+{
+    Signalprocessingfunctions* spFunction = NULL;
+    spFunction = Signalprocessing::getSignalprocessingfunctions();
+
+    if (spFunction == NULL)
+    {
+        throw ast::ScilabError(_("An error occurred while getting Signalprocessingfunctions object.\n"));
+    }
+
+    spFunction->execFunctionDgety(y, siz, iss);
+}
+
+void Signalprocessingfunctions::callDgety(double* y, int* siz, int* iss)
+{
+    char errorMsg[256];
+    int one         = 1;
+    int iRetCount   = 1;
+
+    typed_list in;
+    typed_list out;
+    types::optional_list opt;
+    ast::ExecVisitor execFunc;
+
+    types::Double* pDblY    = new types::Double(*siz);
+
+    // create input args
+    types::Double* pDblT = new types::Double(*iss);
+    pDblT->IncreaseRef();
+    pDblY->IncreaseRef();
+
+    // push_back
+    in.push_back(pDblY);
+    in.push_back(pDblT);
+
+
+
+    for (int i = 0; i < (int)m_FArgs.size(); i++)
+    {
+        m_FArgs[i]->IncreaseRef();
+        in.push_back(m_FArgs[i]);
+    }
+
+    bool bOk = m_pCallDgety->call(in, opt, iRetCount, out, &execFunc) == types::Function::OK;
+
+    for (int i = 0; i < (int)m_FArgs.size(); i++)
+    {
+        m_FArgs[i]->DecreaseRef();
+    }
+
+    if (bOk == false)
+    {
+        sprintf(errorMsg, _("%ls: error while calling user function.\n"), m_pCallDgety->getName().c_str());
+        throw ast::ScilabError(errorMsg);
+    }
+
+    if (out.size() != iRetCount)
+    {
+        char* pstrName = wide_string_to_UTF8(m_pCallDgety->getName().c_str());
+        sprintf(errorMsg, _("%s: Wrong number of input argument(s): %d expected.\n"), pstrName, iRetCount);
+        FREE(pstrName);
+        throw ast::ScilabError(errorMsg);
+    }
+
+    out[0]->IncreaseRef();
+
+    pDblT->DecreaseRef();
+    if (pDblT->isDeletable())
+    {
+        delete pDblT;
+    }
+
+
+    pDblY->DecreaseRef();
+    if (pDblY->isDeletable())
+    {
+        delete pDblY;
+    }
+
+
+    out[0]->DecreaseRef();
+
+    if (out[0]->isDouble() == false)
+    {
+        char* pstrName = wide_string_to_UTF8(m_pCallDgety->getName().c_str());
+        sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1);
+        FREE(pstrName);
+        throw ast::ScilabError(errorMsg);
+    }
+    types::Double* pDblOut = out[0]->getAs<types::Double>();
+    if (pDblOut->isComplex())
+    {
+        char* pstrName = wide_string_to_UTF8(m_pCallDgety->getName().c_str());
+        sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1);
+        FREE(pstrName);
+        throw ast::ScilabError(errorMsg);
+    }
+
+    C2F(dcopy)(siz, pDblOut->get(), &one, y, &one);
+
+
+    if (out[0]->isDeletable())
+    {
+        delete out[0];
+    }
+}
+//call external
+void Signalprocessingfunctions::callDgetx(double* x, int* siz, int* iss)
+{
+    char errorMsg[256];
+    int one         = 1;
+    int iRetCount   = 1;
+
+    typed_list in;
+    typed_list out;
+    types::optional_list opt;
+    ast::ExecVisitor execFunc;
+
+    types::Double* pDblX    = new types::Double(*siz);
+
+    // create input args
+    types::Double* pDblT = new types::Double(*iss);
+    pDblT->IncreaseRef();
+    pDblX->IncreaseRef();
+
+    // push_back
+    in.push_back(pDblX);
+    in.push_back(pDblT);
+
+
+
+    for (int i = 0; i < (int)m_FArgs.size(); i++)
+    {
+        m_FArgs[i]->IncreaseRef();
+        in.push_back(m_FArgs[i]);
+    }
+
+    bool bOk = m_pCallDgetx->call(in, opt, iRetCount, out, &execFunc) == types::Function::OK;
+
+    for (int i = 0; i < (int)m_FArgs.size(); i++)
+    {
+        m_FArgs[i]->DecreaseRef();
+    }
+
+    if (bOk == false)
+    {
+        sprintf(errorMsg, _("%ls: error while calling user function.\n"), m_pCallDgetx->getName().c_str());
+        throw ast::ScilabError(errorMsg);
+    }
+
+    if (out.size() != iRetCount)
+    {
+        char* pstrName = wide_string_to_UTF8(m_pCallDgetx->getName().c_str());
+        sprintf(errorMsg, _("%s: Wrong number of input argument(s): %d expected.\n"), pstrName, iRetCount);
+        FREE(pstrName);
+        throw ast::ScilabError(errorMsg);
+    }
+
+    out[0]->IncreaseRef();
+
+    pDblT->DecreaseRef();
+    if (pDblT->isDeletable())
+    {
+        delete pDblT;
+    }
+
+
+    pDblX->DecreaseRef();
+    if (pDblX->isDeletable())
+    {
+        delete pDblX;
+    }
+
+
+    out[0]->DecreaseRef();
+
+    if (out[0]->isDouble() == false)
+    {
+        char* pstrName = wide_string_to_UTF8(m_pCallDgetx->getName().c_str());
+        sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1);
+        FREE(pstrName);
+        throw ast::ScilabError(errorMsg);
+    }
+    types::Double* pDblOut = out[0]->getAs<types::Double>();
+    if (pDblOut->isComplex())
+    {
+        char* pstrName = wide_string_to_UTF8(m_pCallDgetx->getName().c_str());
+        sprintf(errorMsg, _("%s: Wrong type for output argument #%d: Real matrix expected.\n"), pstrName, 1);
+        FREE(pstrName);
+        throw ast::ScilabError(errorMsg);
+    }
+
+    C2F(dcopy)(siz, pDblOut->get(), &one, x, &one);
+
+
+    if (out[0]->isDeletable())
+    {
+        delete out[0];
+    }
+}
diff --git a/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.hxx b/scilab/modules/signal_processing/src/cpp/signalprocessingfunctions.hxx
new file mode 100644 (file)
index 0000000..0595c70
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2014 - Scilab Enterprises - Anais AUBERT
+*
+* 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 __SIGNALPROCESSING_HXX__
+#define __SIGNALPROCESSING_HXX__
+
+#include <map>
+#include "dynlib_signal_processing.h"
+#include "string.hxx"
+#include "callable.hxx"
+
+extern "C"
+{
+#include "Thread_Wrapper.h"
+}
+
+extern "C"
+{
+    extern void C2F(tscccf)(double *x, double *y, int *length, double *cxy, double *xymean, int *lag, int *error);
+    extern void C2F(cmpse2)(int *iSect, int *iTotalSize, int *iMode, void *pXFunction, void *pYFunction, double *xa, double *xr, double *xi, double *zr, double *zi, int *error);
+}
+
+typedef void(*dgetx_f_t)(double*, int*, int*);
+typedef void(*dgety_f_t)(double*, int*, int*);
+
+extern void C2F(cmpse2)(int *iSect, int *iTotalSize, int *iMode, dgetx_f_t, dgety_f_t, double *xa, double *xr, double *xi, double *zr, double *zi, int *error);
+
+SIGNAL_PROCESSING_IMPEXP void dgety_f(double* x, int* siz, int* iss);
+SIGNAL_PROCESSING_IMPEXP void dgetx_f(double* x, int* siz, int* iss);
+
+class SIGNAL_PROCESSING_IMPEXP Signalprocessingfunctions
+{
+
+public :
+    Signalprocessingfunctions(std::wstring callerName);
+    ~Signalprocessingfunctions();
+
+    void setDgetx(types::Callable*);
+    void setDgety(types::Callable*);
+
+    void setDgetx(types::String*);
+    void setDgety(types::String*);
+
+    void execDgetx(double*, int* , int*);
+    void execDgety(double*, int* , int*);
+
+    void callDgetx(double* x, int* siz, int* iss);
+    void callDgety(double* y, int* siz, int* iss);
+
+    void execFunctionDgetx(double*, int*, int* );
+    void execFunctionDgety(double*, int* , int* );
+
+private :
+
+    std::vector<types::InternalType*> m_FArgs;
+    std::map<std::wstring, void*> m_staticFunctionMap;
+    std::wstring m_wstrCaller;
+
+    types::Callable* m_pCallDgetx;
+    types::Callable* m_pCallDgety;
+
+    types::String* m_pStringDgetxDyn;
+    types::String* m_pStringDgetyDyn;
+
+    types::String* m_pStringDgetxStatic;
+    types::String* m_pStringDgetyStatic;
+
+    std::vector<types::InternalType*> m_dgetxArgs;
+    std::vector<types::InternalType*> m_dgetyArgs;
+
+
+
+
+
+};
+
+class SIGNAL_PROCESSING_IMPEXP Signalprocessing
+{
+    // differential equation functions
+private :
+    static std::map<__threadId, Signalprocessingfunctions*> m_mapSignalprocessingfunctions;
+
+public :
+    static void addSignalprocessingfunctions(Signalprocessingfunctions* _spFunction);
+    static void removeSignalprocessingfunctions();
+    static Signalprocessingfunctions* getSignalprocessingfunctions();
+};
+#endif /* !__SIGNALPROCESSING_HXX__ */
index 6556b07..523e54c 100644 (file)
@@ -87,7 +87,7 @@
                <File RelativePath=".\dgee01.f"/>
                <File RelativePath=".\dsn2.f"/>
                <File RelativePath=".\dsqrtc.f"/>
-               <File RelativePath="..\..\sci_gateway\fortran\Ex-corr.f"/>
+               <File RelativePath=".\Ex-corr.f"/>
                <File RelativePath=".\fft842.f"/>
                <File RelativePath=".\filbut.f"/>
                <File RelativePath=".\freque.f"/>