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/fftw/src | |
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/fftw/src')
40 files changed, 4598 insertions, 0 deletions
diff --git a/modules/fftw/src/c/.deps/.dirstamp b/modules/fftw/src/c/.deps/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/fftw/src/c/.deps/.dirstamp diff --git a/modules/fftw/src/c/.deps/libscifftw_algo_la-callfftw.Plo b/modules/fftw/src/c/.deps/libscifftw_algo_la-callfftw.Plo new file mode 100755 index 000000000..a2be5dbf2 --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_algo_la-callfftw.Plo @@ -0,0 +1,157 @@ +src/c/libscifftw_algo_la-callfftw.lo: src/c/callfftw.c \ + /usr/include/stdc-predef.h src/c/callfftw.h \ + ../../modules/core/includes/BOOL.h src/c/fftw3.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + ../../modules/dynamic_link/includes/dynamiclibrary.h \ + ../../modules/dynamic_link/includes/dynamiclibrary_others.h \ + /usr/include/dlfcn.h /usr/include/x86_64-linux-gnu/bits/dlfcn.h \ + ../../modules/fileio/includes/getshortpathname.h \ + ../../modules/fileio/includes/dynlib_fileio.h \ + ../../modules/core/includes/machine.h \ + ../../modules/core/includes/MALLOC.h \ + ../../modules/core/includes/sci_mem_alloc.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + ../../modules/localization/includes/charEncoding.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + /usr/include/x86_64-linux-gnu/sys/stat.h \ + /usr/include/x86_64-linux-gnu/bits/stat.h + +/usr/include/stdc-predef.h: + +src/c/callfftw.h: + +../../modules/core/includes/BOOL.h: + +src/c/fftw3.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +../../modules/dynamic_link/includes/dynamiclibrary.h: + +../../modules/dynamic_link/includes/dynamiclibrary_others.h: + +/usr/include/dlfcn.h: + +/usr/include/x86_64-linux-gnu/bits/dlfcn.h: + +../../modules/fileio/includes/getshortpathname.h: + +../../modules/fileio/includes/dynlib_fileio.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/MALLOC.h: + +../../modules/core/includes/sci_mem_alloc.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +../../modules/localization/includes/charEncoding.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +/usr/include/x86_64-linux-gnu/sys/stat.h: + +/usr/include/x86_64-linux-gnu/bits/stat.h: diff --git a/modules/fftw/src/c/.deps/libscifftw_algo_la-fftw_utilities.Plo b/modules/fftw/src/c/.deps/libscifftw_algo_la-fftw_utilities.Plo new file mode 100755 index 000000000..edc5f00fb --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_algo_la-fftw_utilities.Plo @@ -0,0 +1,167 @@ +src/c/libscifftw_algo_la-fftw_utilities.lo: src/c/fftw_utilities.c \ + /usr/include/stdc-predef.h src/c/fftw_utilities.h /usr/include/string.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/string.h \ + /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h src/c/fftw3.h \ + ../../modules/core/includes/MALLOC.h \ + ../../modules/core/includes/sci_mem_alloc.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h src/c/callfftw.h \ + ../../modules/core/includes/BOOL.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h + +/usr/include/stdc-predef.h: + +src/c/fftw_utilities.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/string.h: + +/usr/include/x86_64-linux-gnu/bits/string2.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +src/c/fftw3.h: + +../../modules/core/includes/MALLOC.h: + +../../modules/core/includes/sci_mem_alloc.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +src/c/callfftw.h: + +../../modules/core/includes/BOOL.h: + +/usr/include/math.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: diff --git a/modules/fftw/src/c/.deps/libscifftw_algo_la-fftwlibname.Plo b/modules/fftw/src/c/.deps/libscifftw_algo_la-fftwlibname.Plo new file mode 100755 index 000000000..76010d3d5 --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_algo_la-fftwlibname.Plo @@ -0,0 +1,104 @@ +src/c/libscifftw_algo_la-fftwlibname.lo: src/c/fftwlibname.c \ + /usr/include/stdc-predef.h /usr/include/string.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/string.h \ + /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h src/c/fftwlibname.h \ + ../../modules/core/includes/MALLOC.h \ + ../../modules/core/includes/sci_mem_alloc.h + +/usr/include/stdc-predef.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/string.h: + +/usr/include/x86_64-linux-gnu/bits/string2.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +src/c/fftwlibname.h: + +../../modules/core/includes/MALLOC.h: + +../../modules/core/includes/sci_mem_alloc.h: diff --git a/modules/fftw/src/c/.deps/libscifftw_algo_la-sci_data_utilities.Plo b/modules/fftw/src/c/.deps/libscifftw_algo_la-sci_data_utilities.Plo new file mode 100755 index 000000000..2d062f540 --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_algo_la-sci_data_utilities.Plo @@ -0,0 +1,285 @@ +src/c/libscifftw_algo_la-sci_data_utilities.lo: \ + src/c/sci_data_utilities.c /usr/include/stdc-predef.h \ + ../../modules/core/includes/stack-c.h /usr/include/string.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/string.h \ + /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + ../../modules/core/includes/stack-def.h \ + ../../modules/core/includes/machine.h \ + ../../modules/core/includes/stackTypeVariable.h \ + ../../modules/core/includes/BOOL.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/core/includes/stack1.h \ + ../../modules/core/includes/scisparse.h \ + ../../modules/core/includes/stack2.h \ + ../../modules/core/includes/stack3.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/core/includes/MALLOC.h \ + ../../modules/core/includes/sci_mem_alloc.h \ + ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/api_scilab/includes/api_common.h \ + ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/api_scilab/includes/api_double.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/api_scilab/includes/api_string.h /usr/include/wchar.h \ + /usr/include/stdio.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + ../../modules/api_scilab/includes/api_int.h \ + ../../modules/api_scilab/includes/api_poly.h \ + ../../modules/api_scilab/includes/api_sparse.h \ + ../../modules/api_scilab/includes/api_boolean.h \ + ../../modules/api_scilab/includes/api_boolean_sparse.h \ + ../../modules/api_scilab/includes/api_pointer.h \ + ../../modules/api_scilab/includes/api_list.h \ + ../../modules/api_scilab/includes/api_error.h \ + ../../modules/api_scilab/includes/api_handle.h \ + ../../modules/api_scilab/includes/api_optional.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/api_scilab/includes/api_hypermat.h \ + ../../modules/core/includes/core_math.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/localization/includes/localization.h \ + ../../modules/core/includes/machine.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + ../../modules/output_stream/includes/Scierror.h \ + ../../modules/output_stream/includes/do_error_number.h + +/usr/include/stdc-predef.h: + +../../modules/core/includes/stack-c.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/string.h: + +/usr/include/x86_64-linux-gnu/bits/string2.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/math.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +../../modules/core/includes/stack-def.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/stackTypeVariable.h: + +../../modules/core/includes/BOOL.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/core/includes/stack1.h: + +../../modules/core/includes/scisparse.h: + +../../modules/core/includes/stack2.h: + +../../modules/core/includes/stack3.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/core/includes/sci_types.h: + +../../modules/core/includes/MALLOC.h: + +../../modules/core/includes/sci_mem_alloc.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/api_scilab/includes/api_common.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/api_scilab/includes/api_double.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/api_scilab/includes/api_string.h: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +../../modules/api_scilab/includes/api_int.h: + +../../modules/api_scilab/includes/api_poly.h: + +../../modules/api_scilab/includes/api_sparse.h: + +../../modules/api_scilab/includes/api_boolean.h: + +../../modules/api_scilab/includes/api_boolean_sparse.h: + +../../modules/api_scilab/includes/api_pointer.h: + +../../modules/api_scilab/includes/api_list.h: + +../../modules/api_scilab/includes/api_error.h: + +../../modules/api_scilab/includes/api_handle.h: + +../../modules/api_scilab/includes/api_optional.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/api_scilab/includes/api_hypermat.h: + +../../modules/core/includes/core_math.h: + +../../modules/core/includes/sci_types.h: + +../../modules/localization/includes/localization.h: + +../../modules/core/includes/machine.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +../../modules/output_stream/includes/Scierror.h: + +../../modules/output_stream/includes/do_error_number.h: diff --git a/modules/fftw/src/c/.deps/libscifftw_algo_la-with_fftw.Plo b/modules/fftw/src/c/.deps/libscifftw_algo_la-with_fftw.Plo new file mode 100755 index 000000000..88266ada8 --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_algo_la-with_fftw.Plo @@ -0,0 +1,14 @@ +src/c/libscifftw_algo_la-with_fftw.lo: src/c/with_fftw.c \ + /usr/include/stdc-predef.h includes/with_fftw.h \ + ../../modules/core/includes/machine.h ../../modules/core/includes/BOOL.h \ + includes/dynlib_fftw.h + +/usr/include/stdc-predef.h: + +includes/with_fftw.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/BOOL.h: + +includes/dynlib_fftw.h: diff --git a/modules/fftw/src/c/.deps/libscifftw_la-callfftw.Plo b/modules/fftw/src/c/.deps/libscifftw_la-callfftw.Plo new file mode 100755 index 000000000..9ce06a81e --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_la-callfftw.Plo @@ -0,0 +1 @@ +# dummy diff --git a/modules/fftw/src/c/.deps/libscifftw_la-fftw_utilities.Plo b/modules/fftw/src/c/.deps/libscifftw_la-fftw_utilities.Plo new file mode 100755 index 000000000..9ce06a81e --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_la-fftw_utilities.Plo @@ -0,0 +1 @@ +# dummy diff --git a/modules/fftw/src/c/.deps/libscifftw_la-fftwlibname.Plo b/modules/fftw/src/c/.deps/libscifftw_la-fftwlibname.Plo new file mode 100755 index 000000000..9ce06a81e --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_la-fftwlibname.Plo @@ -0,0 +1 @@ +# dummy diff --git a/modules/fftw/src/c/.deps/libscifftw_la-sci_data_utilities.Plo b/modules/fftw/src/c/.deps/libscifftw_la-sci_data_utilities.Plo new file mode 100755 index 000000000..9ce06a81e --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_la-sci_data_utilities.Plo @@ -0,0 +1 @@ +# dummy diff --git a/modules/fftw/src/c/.deps/libscifftw_la-with_fftw.Plo b/modules/fftw/src/c/.deps/libscifftw_la-with_fftw.Plo new file mode 100755 index 000000000..9ce06a81e --- /dev/null +++ b/modules/fftw/src/c/.deps/libscifftw_la-with_fftw.Plo @@ -0,0 +1 @@ +# dummy diff --git a/modules/fftw/src/c/.dirstamp b/modules/fftw/src/c/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/fftw/src/c/.dirstamp diff --git a/modules/fftw/src/c/.libs/libscifftw_algo_la-callfftw.o b/modules/fftw/src/c/.libs/libscifftw_algo_la-callfftw.o Binary files differnew file mode 100755 index 000000000..cdc877c9d --- /dev/null +++ b/modules/fftw/src/c/.libs/libscifftw_algo_la-callfftw.o diff --git a/modules/fftw/src/c/.libs/libscifftw_algo_la-fftw_utilities.o b/modules/fftw/src/c/.libs/libscifftw_algo_la-fftw_utilities.o Binary files differnew file mode 100755 index 000000000..051aa000d --- /dev/null +++ b/modules/fftw/src/c/.libs/libscifftw_algo_la-fftw_utilities.o diff --git a/modules/fftw/src/c/.libs/libscifftw_algo_la-fftwlibname.o b/modules/fftw/src/c/.libs/libscifftw_algo_la-fftwlibname.o Binary files differnew file mode 100755 index 000000000..d386e01db --- /dev/null +++ b/modules/fftw/src/c/.libs/libscifftw_algo_la-fftwlibname.o diff --git a/modules/fftw/src/c/.libs/libscifftw_algo_la-sci_data_utilities.o b/modules/fftw/src/c/.libs/libscifftw_algo_la-sci_data_utilities.o Binary files differnew file mode 100755 index 000000000..c3bfbe6c3 --- /dev/null +++ b/modules/fftw/src/c/.libs/libscifftw_algo_la-sci_data_utilities.o diff --git a/modules/fftw/src/c/.libs/libscifftw_algo_la-with_fftw.o b/modules/fftw/src/c/.libs/libscifftw_algo_la-with_fftw.o Binary files differnew file mode 100755 index 000000000..83cee3b01 --- /dev/null +++ b/modules/fftw/src/c/.libs/libscifftw_algo_la-with_fftw.o diff --git a/modules/fftw/src/c/DllmainFttw.c b/modules/fftw/src/c/DllmainFttw.c new file mode 100755 index 000000000..06e524aa2 --- /dev/null +++ b/modules/fftw/src/c/DllmainFttw.c @@ -0,0 +1,32 @@ +/* + * 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 + * + */ +#include <windows.h> +/*--------------------------------------------------------------------------*/ +#pragma comment(lib,"../../bin/libintl.lib") +/*--------------------------------------------------------------------------*/ +int WINAPI DllMain (HINSTANCE hInstance , DWORD reason, PVOID pvReserved) +{ + switch (reason) + { + case DLL_PROCESS_ATTACH: + break; + case DLL_PROCESS_DETACH: + break; + case DLL_THREAD_ATTACH: + break; + case DLL_THREAD_DETACH: + break; + } + return 1; +} +/*--------------------------------------------------------------------------*/ + diff --git a/modules/fftw/src/c/callfftw.c b/modules/fftw/src/c/callfftw.c new file mode 100755 index 000000000..ab8b6b401 --- /dev/null +++ b/modules/fftw/src/c/callfftw.c @@ -0,0 +1,307 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2006 - INRIA - Allan CORNET +* Copyright (C) 2012 - INRIA - Serge STEER +* +* 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 +* +*/ +#include "callfftw.h" +/*--------------------------------------------------------------------------*/ +#include "dynamiclibrary.h" +#include "getshortpathname.h" +#include "MALLOC.h" +#include "charEncoding.h" +/*--------------------------------------------------------------------------*/ +typedef void (*PROC_FFTW_EXECUTE_SPLIT_DFT) (const fftw_plan p, double *ri, double *ii, double *ro, double *io); +typedef void (*PROC_FFTW_EXECUTE_SPLIT_DFT_C2R) (const fftw_plan p, double *ri, double *ii, double *ro); +typedef void (*PROC_FFTW_EXECUTE_SPLIT_DFT_R2C) (const fftw_plan p, double *ri, double *ro, double *io); +typedef void (*PROC_FFTW_EXECUTE_SPLIT_DFT_R2R) (const fftw_plan p, double *ri, double *ro); +typedef fftw_plan (*PROC_FFTW_PLAN_GURU_SPLIT_DFT) (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *ro, double *io, unsigned flags); +typedef fftw_plan (*PROC_FFTW_PLAN_GURU_SPLIT_DFT_C2R) (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *ro, unsigned flags); +typedef fftw_plan (*PROC_FFTW_PLAN_GURU_SPLIT_DFT_R2C) (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ro, double *io, unsigned flags); +typedef fftw_plan (*PROC_FFTW_PLAN_GURU_SPLIT_DFT_R2R) (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ro, fftw_r2r_kind *kind, unsigned flags); +typedef void (*PROC_FFTW_DESTROY_PLAN) (fftw_plan p); +typedef char *(*PROC_FFTW_EXPORT_WISDOM_TO_STRING) (void); +typedef int (*PROC_FFTW_IMPORT_WISDOM_FROM_STRING) (const char *input_string); +typedef void (*PROC_FFTW_FORGET_WISDOM) (void); +/*--------------------------------------------------------------------------*/ +static DynLibHandle hinstLib = NULL; +static PROC_FFTW_EXECUTE_SPLIT_DFT MY_FFTW_EXECUTE_SPLIT_DFT = NULL; +static PROC_FFTW_EXECUTE_SPLIT_DFT_C2R MY_FFTW_EXECUTE_SPLIT_DFT_C2R = NULL; +static PROC_FFTW_EXECUTE_SPLIT_DFT_R2C MY_FFTW_EXECUTE_SPLIT_DFT_R2C = NULL; +static PROC_FFTW_EXECUTE_SPLIT_DFT_R2R MY_FFTW_EXECUTE_SPLIT_DFT_R2R = NULL; +static PROC_FFTW_PLAN_GURU_SPLIT_DFT MY_FFTW_PLAN_GURU_SPLIT_DFT = NULL; +static PROC_FFTW_PLAN_GURU_SPLIT_DFT_C2R MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R = NULL; +static PROC_FFTW_PLAN_GURU_SPLIT_DFT_R2C MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C = NULL; +static PROC_FFTW_PLAN_GURU_SPLIT_DFT_R2R MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R = NULL; +static PROC_FFTW_DESTROY_PLAN MY_FFTW_DESTROY_PLAN = NULL; +static PROC_FFTW_EXPORT_WISDOM_TO_STRING MY_FFTW_EXPORT_WISDOM_TO_STRING = NULL; +static PROC_FFTW_IMPORT_WISDOM_FROM_STRING MY_FFTW_IMPORT_WISDOM_FROM_STRING = NULL; +static PROC_FFTW_FORGET_WISDOM MY_FFTW_FORGET_WISDOM = NULL; +/*--------------------------------------------------------------------------*/ +BOOL IsLoadedFFTW(void) +{ + if ( (MY_FFTW_EXECUTE_SPLIT_DFT) && (MY_FFTW_PLAN_GURU_SPLIT_DFT) && (MY_FFTW_DESTROY_PLAN) && + (MY_FFTW_EXPORT_WISDOM_TO_STRING) && (MY_FFTW_IMPORT_WISDOM_FROM_STRING) && + (MY_FFTW_FORGET_WISDOM) ) + { + return TRUE; + } + return FALSE; +} +/*--------------------------------------------------------------------------*/ +BOOL LoadFFTWLibrary(const char* libraryname) +{ + + if (libraryname == NULL) + { + return FALSE; + } + if (hinstLib == NULL) + { +#ifdef _MSC_VER + { + wchar_t * wclibraryname = to_wide_string(libraryname); + if (wclibraryname) + { + hinstLib = LoadDynLibraryW(wclibraryname); + FREE(wclibraryname); + wclibraryname = NULL; + } + } +#else + hinstLib = LoadDynLibrary(libraryname); +#endif + MY_FFTW_EXECUTE_SPLIT_DFT = NULL; + MY_FFTW_EXECUTE_SPLIT_DFT_C2R = NULL; + MY_FFTW_EXECUTE_SPLIT_DFT_R2C = NULL; + MY_FFTW_EXECUTE_SPLIT_DFT_R2R = NULL; + + MY_FFTW_PLAN_GURU_SPLIT_DFT = NULL; + MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R = NULL; + MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C = NULL; + MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R = NULL; + + MY_FFTW_DESTROY_PLAN = NULL; + + MY_FFTW_EXPORT_WISDOM_TO_STRING = NULL; + MY_FFTW_IMPORT_WISDOM_FROM_STRING = NULL; + MY_FFTW_FORGET_WISDOM = NULL; + + MY_FFTW_EXECUTE_SPLIT_DFT = (PROC_FFTW_EXECUTE_SPLIT_DFT) GetDynLibFuncPtr(hinstLib, "fftw_execute_split_dft"); + MY_FFTW_EXECUTE_SPLIT_DFT_C2R = (PROC_FFTW_EXECUTE_SPLIT_DFT_C2R) GetDynLibFuncPtr(hinstLib, "fftw_execute_split_dft_c2r"); + MY_FFTW_EXECUTE_SPLIT_DFT_R2C = (PROC_FFTW_EXECUTE_SPLIT_DFT_R2C) GetDynLibFuncPtr(hinstLib, "fftw_execute_split_dft_r2c"); + MY_FFTW_EXECUTE_SPLIT_DFT_R2R = (PROC_FFTW_EXECUTE_SPLIT_DFT_R2R) GetDynLibFuncPtr(hinstLib, "fftw_execute_r2r"); + + MY_FFTW_PLAN_GURU_SPLIT_DFT = (PROC_FFTW_PLAN_GURU_SPLIT_DFT) GetDynLibFuncPtr(hinstLib, "fftw_plan_guru_split_dft"); + MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R = (PROC_FFTW_PLAN_GURU_SPLIT_DFT_C2R) GetDynLibFuncPtr(hinstLib, "fftw_plan_guru_split_dft_c2r"); + MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C = (PROC_FFTW_PLAN_GURU_SPLIT_DFT_R2C) GetDynLibFuncPtr(hinstLib, "fftw_plan_guru_split_dft_r2c"); + MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R = (PROC_FFTW_PLAN_GURU_SPLIT_DFT_R2R) GetDynLibFuncPtr(hinstLib, "fftw_plan_guru_r2r"); + + + MY_FFTW_DESTROY_PLAN = (PROC_FFTW_DESTROY_PLAN) GetDynLibFuncPtr(hinstLib, "fftw_destroy_plan"); + + MY_FFTW_EXPORT_WISDOM_TO_STRING = (PROC_FFTW_EXPORT_WISDOM_TO_STRING) GetDynLibFuncPtr(hinstLib, "fftw_export_wisdom_to_string"); + MY_FFTW_IMPORT_WISDOM_FROM_STRING = (PROC_FFTW_IMPORT_WISDOM_FROM_STRING) GetDynLibFuncPtr(hinstLib, "fftw_import_wisdom_from_string"); + MY_FFTW_FORGET_WISDOM = (PROC_FFTW_FORGET_WISDOM) GetDynLibFuncPtr(hinstLib, "fftw_forget_wisdom"); + } + + return IsLoadedFFTW(); +} +/*--------------------------------------------------------------------------*/ +BOOL DisposeFFTWLibrary(void) +{ + BOOL fFreeResult; + + if (hinstLib) + { + fFreeResult = FreeDynLibrary(hinstLib); + hinstLib = NULL; + } + + if (MY_FFTW_EXECUTE_SPLIT_DFT) + { + MY_FFTW_EXECUTE_SPLIT_DFT = NULL; + } + if (MY_FFTW_EXECUTE_SPLIT_DFT_C2R) + { + MY_FFTW_EXECUTE_SPLIT_DFT_C2R = NULL; + } + if (MY_FFTW_EXECUTE_SPLIT_DFT_R2C) + { + MY_FFTW_EXECUTE_SPLIT_DFT_R2C = NULL; + } + if (MY_FFTW_EXECUTE_SPLIT_DFT_R2R) + { + MY_FFTW_EXECUTE_SPLIT_DFT_R2R = NULL; + } + + if (MY_FFTW_PLAN_GURU_SPLIT_DFT) + { + MY_FFTW_PLAN_GURU_SPLIT_DFT = NULL; + } + if (MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R) + { + MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R = NULL; + } + if (MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C) + { + MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C = NULL; + } + if (MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R) + { + MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R = NULL; + } + + if (MY_FFTW_DESTROY_PLAN) + { + MY_FFTW_DESTROY_PLAN = NULL; + } + + if (MY_FFTW_EXPORT_WISDOM_TO_STRING) + { + MY_FFTW_EXPORT_WISDOM_TO_STRING = NULL; + } + if (MY_FFTW_IMPORT_WISDOM_FROM_STRING) + { + MY_FFTW_IMPORT_WISDOM_FROM_STRING = NULL; + } + if (MY_FFTW_FORGET_WISDOM) + { + MY_FFTW_FORGET_WISDOM = NULL; + } + + if ( !MY_FFTW_EXECUTE_SPLIT_DFT && !MY_FFTW_EXECUTE_SPLIT_DFT_C2R && + !MY_FFTW_EXECUTE_SPLIT_DFT_R2C && !MY_FFTW_EXECUTE_SPLIT_DFT_R2R && + !MY_FFTW_PLAN_GURU_SPLIT_DFT && !MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R && + !MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C && !MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R && + !MY_FFTW_DESTROY_PLAN && + !MY_FFTW_EXPORT_WISDOM_TO_STRING && !MY_FFTW_IMPORT_WISDOM_FROM_STRING && + !MY_FFTW_FORGET_WISDOM ) + { + return TRUE; + } + + return FALSE; +} +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft (const fftw_plan p, double *ri, double *ii, double *ro, double *io) +{ + if (MY_FFTW_EXECUTE_SPLIT_DFT) + { + (MY_FFTW_EXECUTE_SPLIT_DFT)(p, ri, ii, ro, io); + } +} +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft_c2r (const fftw_plan p, double *ri, double *ii, double *ro) +{ + if (MY_FFTW_EXECUTE_SPLIT_DFT_C2R) + { + (MY_FFTW_EXECUTE_SPLIT_DFT_C2R)(p, ri, ii, ro); + } +} +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft_r2c (const fftw_plan p, double *ri, double *ro, double *io) +{ + if (MY_FFTW_EXECUTE_SPLIT_DFT_R2C) + { + (MY_FFTW_EXECUTE_SPLIT_DFT_R2C)(p, ri, ro, io); + } +} +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft_r2r (const fftw_plan p, double *ri, double *ro) +{ + if (MY_FFTW_EXECUTE_SPLIT_DFT_R2R) + { + (MY_FFTW_EXECUTE_SPLIT_DFT_R2R)(p, ri, ro); + } +} +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *ro, double *io, unsigned flags) +{ + if (MY_FFTW_PLAN_GURU_SPLIT_DFT) + { + return (fftw_plan)(MY_FFTW_PLAN_GURU_SPLIT_DFT)(rank, dims, howmany_rank, howmany_dims, ri, ii, ro, io, flags); + } + else + { + return NULL; + } +} +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft_c2r (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *ro, unsigned flags) +{ + if (MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R) + { + return (fftw_plan)(MY_FFTW_PLAN_GURU_SPLIT_DFT_C2R)(rank, dims, howmany_rank, howmany_dims, ri, ii, ro, flags); + } + else + { + return NULL; + } +} +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft_r2c (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ro, double *io, unsigned flags) +{ + if (MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C) + { + return (fftw_plan)(MY_FFTW_PLAN_GURU_SPLIT_DFT_R2C)(rank, dims, howmany_rank, howmany_dims, ri, ro, io, flags); + } + else + { + return NULL; + } +} +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft_r2r (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ro, fftw_r2r_kind *kind, unsigned flags) +{ + if (MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R) + { + return (fftw_plan)(MY_FFTW_PLAN_GURU_SPLIT_DFT_R2R)(rank, dims, howmany_rank, howmany_dims, ri, ro, kind, flags); + } + else + { + return NULL; + } +} + +/*--------------------------------------------------------------------------*/ +void call_fftw_destroy_plan (fftw_plan p) +{ + if (MY_FFTW_DESTROY_PLAN) + { + (MY_FFTW_DESTROY_PLAN)(p); + } +} +/*--------------------------------------------------------------------------*/ +char *call_fftw_export_wisdom_to_string (void) +{ + if (MY_FFTW_EXPORT_WISDOM_TO_STRING) + { + return (char *)(MY_FFTW_EXPORT_WISDOM_TO_STRING)(); + } + return NULL; +} +/*--------------------------------------------------------------------------*/ +int call_fftw_import_wisdom_from_string (const char *input_string) +{ + if (MY_FFTW_IMPORT_WISDOM_FROM_STRING) + { + return (int)(MY_FFTW_IMPORT_WISDOM_FROM_STRING)(input_string); + } + return 0; +} +/*--------------------------------------------------------------------------*/ +void call_fftw_forget_wisdom (void) +{ + if (MY_FFTW_FORGET_WISDOM) + { + (MY_FFTW_FORGET_WISDOM)(); + } +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/c/callfftw.h b/modules/fftw/src/c/callfftw.h new file mode 100755 index 000000000..87dab4910 --- /dev/null +++ b/modules/fftw/src/c/callfftw.h @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - Allan CORNET + * Copyright (C) 2012 - INRIA - Serge STEER + * + * 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 __CALLFFTW_H__ +#define __CALLFFTW_H__ +/*--------------------------------------------------------------------------*/ +#include "BOOL.h" +#include "fftw3.h" +/*--------------------------------------------------------------------------*/ +BOOL IsLoadedFFTW(void); +/*--------------------------------------------------------------------------*/ +BOOL LoadFFTWLibrary(const char *libraryname); +/*--------------------------------------------------------------------------*/ +BOOL DisposeFFTWLibrary(void); +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft (const fftw_plan p, double *ri, double *ii, double *ro, double *io); +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft_c2r (const fftw_plan p, double *ri, double *ii, double *ro); +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft_r2c (const fftw_plan p, double *ri, double *ro, double *io); +/*--------------------------------------------------------------------------*/ +void call_fftw_execute_split_dft_r2r (const fftw_plan p, double *ri, double *ro); +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *ro, double *io, unsigned flags) ; +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft_c2r (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *ro, unsigned flags); +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft_r2c (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ro, double *io, unsigned flags); +/*--------------------------------------------------------------------------*/ +fftw_plan call_fftw_plan_guru_split_dft_r2r (int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ro, fftw_r2r_kind *kind, unsigned flags); +/*--------------------------------------------------------------------------*/ +void call_fftw_destroy_plan (fftw_plan p); +/*--------------------------------------------------------------------------*/ +char *call_fftw_export_wisdom_to_string (void); +/*--------------------------------------------------------------------------*/ +int call_fftw_import_wisdom_from_string (const char *input_string); +/*--------------------------------------------------------------------------*/ +void call_fftw_forget_wisdom (void); +/*--------------------------------------------------------------------------*/ +int withMKL(void); +/*--------------------------------------------------------------------------*/ + +#endif /* __CALLFFTW_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/c/fftw.rc b/modules/fftw/src/c/fftw.rc new file mode 100755 index 000000000..664ea0a8b --- /dev/null +++ b/modules/fftw/src/c/fftw.rc @@ -0,0 +1,97 @@ +// Microsoft Visual C++ generated resource script. +// + + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +//#include "afxres.h" +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// French (France) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 5,5,2,0 + PRODUCTVERSION 5,5,2,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040c04b0" + BEGIN + VALUE "CompanyName", "Scilab" + VALUE "FileDescription", "fftw module" + VALUE "FileVersion", "5, 5, 2, 0" + VALUE "InternalName", "fftw" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "fftw.rc" + VALUE "ProductName", " fftw" + VALUE "ProductVersion", "5, 5, 2, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x40c, 1200 + END +END + +#endif // French (France) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/modules/fftw/src/c/fftw3.h b/modules/fftw/src/c/fftw3.h new file mode 100755 index 000000000..75a93a0cb --- /dev/null +++ b/modules/fftw/src/c/fftw3.h @@ -0,0 +1,334 @@ +/* + * Copyright (c) 2003, 2006 Matteo Frigo + * Copyright (c) 2003, 2006 Massachusetts Institute of Technology + * + * The following statement of license applies *only* to this header file, + * and *not* to the other files distributed with FFTW or derived therefrom: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/***************************** NOTE TO USERS ********************************* + * + * THIS IS A HEADER FILE, NOT A MANUAL + * + * If you want to know how to use FFTW, please read the manual, + * online at http://www.fftw.org/doc/ and also included with FFTW. + * For a quick start, see the manual's tutorial section. + * + * (Reading header files to learn how to use a library is a habit + * stemming from code lacking a proper manual. Arguably, it's a + * *bad* habit in most cases, because header files can contain + * interfaces that are not part of the public, stable API.) + * + ****************************************************************************/ + +/* header file for fftw3 */ +/* (The following is the CVS ID for this file, *not* the version + number of FFTW:) */ +/* $Id: fftw3.h,v 1.90 2006-01-17 04:03:33 stevenj Exp $ */ + +#ifndef FFTW3_H +#define FFTW3_H + +#include <stdio.h> + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + /* If <complex.h> is included, use the C99 complex type. Otherwise + define a type bit-compatible with C99 complex */ +#if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) +# define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C +#else +# define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2] +#endif + +#define FFTW_CONCAT(prefix, name) prefix ## name +#define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name) +#define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name) +#define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name) + + /* IMPORTANT: for Windows compilers, you should add a line + */ +#define FFTW_DLL + /* + here and in kernel/ifftw.h if you are compiling/using FFTW as a + DLL, in order to do the proper importing/exporting, or + alternatively compile with -DFFTW_DLL or the equivalent + command-line flag. This is not necessary under MinGW/Cygwin, where + libtool does the imports/exports automatically. */ +#if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__)) + /* annoying Windows syntax for shared-library declarations */ +# if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */ +# define FFTW_EXTERN extern __declspec(dllexport) +# else /* user is calling FFTW; import symbol */ +# define FFTW_EXTERN extern __declspec(dllimport) +# endif +#else +# define FFTW_EXTERN extern +#endif + + enum fftw_r2r_kind_do_not_use_me { + FFTW_R2HC = 0, FFTW_HC2R = 1, FFTW_DHT = 2, + FFTW_REDFT00 = 3, FFTW_REDFT01 = 4, FFTW_REDFT10 = 5, FFTW_REDFT11 = 6, + FFTW_RODFT00 = 7, FFTW_RODFT01 = 8, FFTW_RODFT10 = 9, FFTW_RODFT11 = 10 + }; + + struct fftw_iodim_do_not_use_me + { + int n; /* dimension size */ + int is; /* input stride */ + int os; /* output stride */ + }; + + /* + huge second-order macro that defines prototypes for all API + functions. We expand this macro for each supported precision + + X: name-mangling macro + R: real data type + C: complex data type + */ + +#define FFTW_DEFINE_API(X, R, C) \ + \ +FFTW_DEFINE_COMPLEX(R, C); \ + \ +typedef struct X(plan_s) *X(plan); \ + \ +typedef struct fftw_iodim_do_not_use_me X(iodim); \ + \ +typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \ + \ +FFTW_EXTERN void X(execute)(const X(plan) p); \ + \ +FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \ + C *in, C *out, int sign, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \ + unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_dft_2d)(int nx, int ny, \ + C *in, C *out, int sign, unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_dft_3d)(int nx, int ny, int nz, \ + C *in, C *out, int sign, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \ + int howmany, \ + C *in, const int *inembed, \ + int istride, int idist, \ + C *out, const int *onembed, \ + int ostride, int odist, \ + int sign, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims, \ + int howmany_rank, \ + const X(iodim) *howmany_dims, \ + C *in, C *out, \ + int sign, unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \ + int howmany_rank, \ + const X(iodim) *howmany_dims, \ + R *ri, R *ii, R *ro, R *io, \ + unsigned flags); \ + \ +FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \ +FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \ + R *ro, R *io); \ + \ +FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \ + int howmany, \ + R *in, const int *inembed, \ + int istride, int idist, \ + C *out, const int *onembed, \ + int ostride, int odist, \ + unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \ + R *in, C *out, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int nx, int ny, \ + R *in, C *out, unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int nx, int ny, \ + int nz, \ + R *in, C *out, unsigned flags); \ + \ + \ +FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \ + int howmany, \ + C *in, const int *inembed, \ + int istride, int idist, \ + R *out, const int *onembed, \ + int ostride, int odist, \ + unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \ + C *in, R *out, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int nx, int ny, \ + C *in, R *out, unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int nx, int ny, \ + int nz, \ + C *in, R *out, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \ + int howmany_rank, \ + const X(iodim) *howmany_dims, \ + R *in, C *out, \ + unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \ + int howmany_rank, \ + const X(iodim) *howmany_dims, \ + C *in, R *out, \ + unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)( \ + int rank, const X(iodim) *dims, \ + int howmany_rank, \ + const X(iodim) *howmany_dims, \ + R *in, R *ro, R *io, \ + unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \ + int rank, const X(iodim) *dims, \ + int howmany_rank, \ + const X(iodim) *howmany_dims, \ + R *ri, R *ii, R *out, \ + unsigned flags); \ + \ +FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \ +FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \ + \ +FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \ + R *in, R *ro, R *io); \ +FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \ + R *ri, R *ii, R *out); \ + \ +FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \ + int howmany, \ + R *in, const int *inembed, \ + int istride, int idist, \ + R *out, const int *onembed, \ + int ostride, int odist, \ + const X(r2r_kind) *kind, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \ + const X(r2r_kind) *kind, unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \ + X(r2r_kind) kind, unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_r2r_2d)(int nx, int ny, R *in, R *out, \ + X(r2r_kind) kindx, X(r2r_kind) kindy, \ + unsigned flags); \ +FFTW_EXTERN X(plan) X(plan_r2r_3d)(int nx, int ny, int nz, \ + R *in, R *out, X(r2r_kind) kindx, \ + X(r2r_kind) kindy, X(r2r_kind) kindz, \ + unsigned flags); \ + \ +FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \ + int howmany_rank, \ + const X(iodim) *howmany_dims, \ + R *in, R *out, \ + const X(r2r_kind) *kind, unsigned flags); \ +FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \ + \ +FFTW_EXTERN void X(destroy_plan)(X(plan) p); \ +FFTW_EXTERN void X(forget_wisdom)(void); \ +FFTW_EXTERN void X(cleanup)(void); \ + \ +FFTW_EXTERN void X(set_timelimit)(double); \ + \ +FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \ +FFTW_EXTERN int X(init_threads)(void); \ +FFTW_EXTERN void X(cleanup_threads)(void); \ + \ +FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \ +FFTW_EXTERN char *X(export_wisdom_to_string)(void); \ +FFTW_EXTERN void X(export_wisdom)(void (*write_char)(char c, void *), \ + void *data); \ +FFTW_EXTERN int X(import_system_wisdom)(void); \ +FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \ +FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \ +FFTW_EXTERN int X(import_wisdom)(int (*read_char)(void *), void *data); \ + \ +FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \ +FFTW_EXTERN void X(print_plan)(const X(plan) p); \ + \ +FFTW_EXTERN void *X(malloc)(size_t n); \ +FFTW_EXTERN void X(free)(void *p); \ + \ +FFTW_EXTERN void X(flops)(const X(plan) p, \ + double *add, double *mul, double *fmas); \ +FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \ + \ +FFTW_EXTERN const char X(version)[]; \ +FFTW_EXTERN const char X(cc)[]; \ +FFTW_EXTERN const char X(codelet_optim)[]; + + + /* end of FFTW_DEFINE_API macro */ + + FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex) + FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex) + FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex) + +#define FFTW_FORWARD (-1) +#define FFTW_BACKWARD (+1) + +#define FFTW_NO_TIMELIMIT (-1.0) + + /* documented flags */ +#define FFTW_MEASURE (0U) +#define FFTW_DESTROY_INPUT (1U << 0) +#define FFTW_UNALIGNED (1U << 1) +#define FFTW_CONSERVE_MEMORY (1U << 2) +#define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */ +#define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */ +#define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */ +#define FFTW_ESTIMATE (1U << 6) + + /* undocumented beyond-guru flags */ +#define FFTW_ESTIMATE_PATIENT (1U << 7) +#define FFTW_BELIEVE_PCOST (1U << 8) +#define FFTW_NO_DFT_R2HC (1U << 9) +#define FFTW_NO_NONTHREADED (1U << 10) +#define FFTW_NO_BUFFERING (1U << 11) +#define FFTW_NO_INDIRECT_OP (1U << 12) +#define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */ +#define FFTW_NO_RANK_SPLITS (1U << 14) +#define FFTW_NO_VRANK_SPLITS (1U << 15) +#define FFTW_NO_VRECURSE (1U << 16) +#define FFTW_NO_SIMD (1U << 17) +#define FFTW_NO_SLOW (1U << 18) +#define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19) +#define FFTW_ALLOW_PRUNING (1U << 20) + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* FFTW3_H */ diff --git a/modules/fftw/src/c/fftw_utilities.c b/modules/fftw/src/c/fftw_utilities.c new file mode 100755 index 000000000..2a9f5e020 --- /dev/null +++ b/modules/fftw/src/c/fftw_utilities.c @@ -0,0 +1,1933 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2007 - INRIA - Alan LAYEC + * Copyright (C) 2007 - INRIA - Allan CORNET + * Copyright (C) 2012 - INRIA - Serge STEER + * + * 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 + * + */ +#include "fftw_utilities.h" +#include "MALLOC.h" +#include "callfftw.h" +#include <math.h> +int check_1D_symmetry(double *Ar, double *Ai, int nA, int iA); +int check_2D_symmetry(double *Ar, double *Ai, int mA, int iA, int nA, int jA); +int check_ND_symmetry(double *Ar, double *Ai, int ndims, int *dims, int *incr); + +void complete_1D_array(double *Ar, double *Ai, int nA, int iA); +void complete_2D_array(double *Ar, double *Ai, int mA, int iA, int nA, int jA); +int complete_ND_array(double *Ar, double *Ai, int ndims, int *dims, int *incr); +void dct_scale_1D_array(double *Ar, double *Ai, int nA, int iA, int isn, double fact); +void dct_scale_2D_array(double *Ar, double *Ai, int mA, int iA, int nA, int jA, int isn, double fact); +int dct_scale_ND_array(double *Ar, double *Ai, int ndims, int *dims, int *incr, int isn, double fact); + +void dst_scale_1D_array(double *Ar, double *Ai, int nA, int iA, int isn, double fact); +void dst_scale_2D_array(double *Ar, double *Ai, int mA, int iA, int nA, int jA, int isn, double fact); +int dst_scale_ND_array(double *Ar, double *Ai, int ndims, int *dims, int *incr, int isn, double fact); + +/*--------------------------------------------------------------------------*/ +/* definition of structures to store parameters + * of FFTW planners - set here default value - + */ +FFTW_Plan_struct Sci_Forward_Plan = +{ + 0, /* int plan_type */ + NULL, /* fftw_plan p */ + {0, NULL, 0, NULL}, /* guru_dim_struct gdim */ + FFTW_ESTIMATE, /* unsigned flags */ + NULL /* kind */ +}; + +FFTW_Plan_struct Sci_Backward_Plan = +{ + 0, /* int plan_type */ + NULL, /* fftw_plan p */ + {0, NULL, 0, NULL}, /* guru_dim_struct gdim */ + FFTW_ESTIMATE, /* unsigned flags */ + NULL /* kind */ +}; +/*--------------------------------------------------------------------------*/ +FFTW_Plan_struct *getSci_Backward_Plan(void) +{ + return &Sci_Backward_Plan; +} +/*--------------------------------------------------------------------------*/ +FFTW_Plan_struct *getSci_Forward_Plan(void) +{ + return &Sci_Forward_Plan; +} +/*--------------------------------------------------------------------------*/ +unsigned cur_fftw_flags = FFTW_ESTIMATE; +/*--------------------------------------------------------------------------*/ +unsigned int getCurrentFftwFlags(void) +{ + return cur_fftw_flags; +} +/*--------------------------------------------------------------------------*/ +void setCurrentFftwFlags(unsigned int newFftwFlags) +{ + cur_fftw_flags = newFftwFlags; +} +/*--------------------------------------------------------------------------*/ +/* Free a FFTW_Plan_struct + * + * Input : FFTW_Plan_struct *Sci_Plan + * + * Output : int, return 1. + * + */ +int FreeFFTWPlan(FFTW_Plan_struct *Sci_Plan) +{ + if (Sci_Plan->p != NULL) + { + call_fftw_destroy_plan(Sci_Plan->p); + Sci_Plan->p = NULL; + } + if (Sci_Plan->gdim.rank != 0) + { + Sci_Plan->gdim.rank = 0; + FREE(Sci_Plan->gdim.dims); + Sci_Plan->gdim.dims = NULL; + FREE(Sci_Plan->kind); + Sci_Plan->kind = NULL; + } + if (Sci_Plan->gdim.howmany_rank != 0) + { + Sci_Plan->gdim.howmany_rank = 0; + FREE(Sci_Plan->gdim.howmany_dims); + Sci_Plan->gdim.howmany_dims = NULL; + } + return(1); +} +/*--------------------------------------------------------------------------*/ +/* Return a valid plan ptr. + * This function search in the Sci_xx_Plan structures if + * the given input parameters follows an already stored + * set of parameters. + * If found then return an already stored plan ptr. + * If not found, then returns + * a new set of parameters (and a new plan) + * with fftw_plan_guru_split_dft + * and store it in Sci_xx_Plan structures + * + * Input : guru_dim_struct *gdim + * double *ri, double *ii + * double *ro, double *io + * unsigned flags, int isn + * + * Output : fftw_plan + * + * + */ +fftw_plan GetFFTWPlan(enum Plan_Type type, guru_dim_struct *gdim, + double *ri, double *ii, + double *ro, double *io, + unsigned flags, int isn, fftw_r2r_kind *kind, int *errflag) +{ + FFTW_Plan_struct *Sci_Plan; + int i = 0; + + *errflag = 0; + + if (isn == -1) + { + Sci_Plan = &Sci_Backward_Plan; + } + else + { + Sci_Plan = &Sci_Forward_Plan; + } + + if ( (!(CheckGuruDims(&(Sci_Plan->gdim), gdim))) || + (!CheckKindArray(Sci_Plan->kind, kind, gdim->rank)) || + (Sci_Plan->flags != cur_fftw_flags) || + (Sci_Plan->plan_type != type)) + { + /* plan must be changed */ + FreeFFTWPlan(Sci_Plan); + + Sci_Plan->plan_type = type; + if (gdim->rank != 0) + { + Sci_Plan->gdim.rank = gdim->rank; + if ((Sci_Plan->gdim.dims = (fftw_iodim *) MALLOC(sizeof(fftw_iodim) * (gdim->rank))) == NULL) + { + *errflag = 1; + return(NULL); + } + for (i = 0; i < gdim->rank; i++) + { + Sci_Plan->gdim.dims[i].n = gdim->dims[i].n; + Sci_Plan->gdim.dims[i].is = gdim->dims[i].is; + Sci_Plan->gdim.dims[i].os = gdim->dims[i].os; + } + + if (kind != NULL) + { + if ((Sci_Plan->kind = (fftw_r2r_kind *) MALLOC(sizeof(fftw_r2r_kind) * (gdim->rank))) == NULL) + { + *errflag = 1; + return(NULL); + } + for (i = 0; i < gdim->rank; i++) + { + Sci_Plan->kind[i] = kind[i]; + } + } + } + if (gdim->howmany_rank != 0) + { + Sci_Plan->gdim.howmany_rank = gdim->howmany_rank; + if ((Sci_Plan->gdim.howmany_dims = (fftw_iodim *) MALLOC(sizeof(fftw_iodim) * (gdim->howmany_rank))) == NULL) + { + FREE(Sci_Plan->gdim.dims); + *errflag = 1; + return(NULL); + } + for (i = 0; i < gdim->howmany_rank; i++) + { + Sci_Plan->gdim.howmany_dims[i].n = gdim->howmany_dims[i].n; + Sci_Plan->gdim.howmany_dims[i].is = gdim->howmany_dims[i].is; + Sci_Plan->gdim.howmany_dims[i].os = gdim->howmany_dims[i].os; + } + } + + Sci_Plan->flags = cur_fftw_flags; + + switch (type) + { + case C2C_PLAN: + Sci_Plan->p = call_fftw_plan_guru_split_dft(Sci_Plan->gdim.rank, + Sci_Plan->gdim.dims, + Sci_Plan->gdim.howmany_rank, + Sci_Plan->gdim.howmany_dims, + ri, ii, ro, io, + Sci_Plan->flags); + break; + case C2R_PLAN: + Sci_Plan->p = call_fftw_plan_guru_split_dft_c2r(Sci_Plan->gdim.rank, + Sci_Plan->gdim.dims, + Sci_Plan->gdim.howmany_rank, + Sci_Plan->gdim.howmany_dims, + ri, ii, ro, flags); + break; + case R2C_PLAN: + Sci_Plan->p = call_fftw_plan_guru_split_dft_r2c(Sci_Plan->gdim.rank, + Sci_Plan->gdim.dims, + Sci_Plan->gdim.howmany_rank, + Sci_Plan->gdim.howmany_dims, + ri, ro, io, flags); + + break; + case R2R_PLAN: + Sci_Plan->p = call_fftw_plan_guru_split_dft_r2r(Sci_Plan->gdim.rank, + Sci_Plan->gdim.dims, + Sci_Plan->gdim.howmany_rank, + Sci_Plan->gdim.howmany_dims, + ri, ro, kind, flags); + break; + } + + } + if (Sci_Plan->p == NULL) + { + *errflag = 2; + } + return(Sci_Plan->p); +} +/*--------------------------------------------------------------------------*/ +/* Check if two guru_dim structures are equal + * + * Input : guru_dim_struct *gdim1 + * guru_dim_struct *gdim2 + * + * Output : int, return 0 if False, else 1. + * + */ +int CheckGuruDims(guru_dim_struct *gdim1, guru_dim_struct *gdim2) +{ + int i; + + if ( (gdim1->rank == gdim2->rank) && + (gdim1->howmany_rank == gdim2->howmany_rank)) + { + for (i = 0; i < gdim1->rank; i++) + { + if (gdim1->dims[i].n != gdim2->dims[i].n) + { + return(0); + } + if (gdim1->dims[i].is != gdim2->dims[i].is) + { + return(0); + } + if (gdim1->dims[i].os != gdim2->dims[i].os) + { + return(0); + } + } + for (i = 0; i < gdim1->howmany_rank; i++) + { + if (gdim1->howmany_dims[i].n != gdim2->howmany_dims[i].n) + { + return(0); + } + if (gdim1->howmany_dims[i].is != gdim2->howmany_dims[i].is) + { + return(0); + } + if (gdim1->howmany_dims[i].os != gdim2->howmany_dims[i].os) + { + return(0); + } + } + return(1); + } + else + { + return(0); + } +} +/*--------------------------------------------------------------------------*/ +/* Check if kind array are equal + * + * Input : fftw_r2r_kind *kind1 + * gfftw_r2r_kind *kind2 + * int rank + * + * Output : int, return 0 if False, else 1. + * + */ +int CheckKindArray(fftw_r2r_kind *kind1, fftw_r2r_kind *kind2, int rank) +{ + int i; + if ((kind1 == NULL) && (kind2 == NULL)) + { + return(1); + } + + for (i = 0; i < rank; i++) + { + if (kind1[i] != kind2[i]) + { + return(0); + } + } + return(1); +} +/*--------------------------------------------------------------------------*/ +/* call different fftw_execute_split_dft_xxx procedures according to type input + * + * Input : Plan_Type type + * fftw_plan p + * double *ri + * double *ii + * Output : double *ro + * double *io + */ +void ExecuteFFTWPlan(enum Plan_Type type, const fftw_plan p, double *ri, double *ii, double *ro, double *io) +{ + switch (type) + { + case C2C_PLAN: + call_fftw_execute_split_dft(p, ri, ii, ro, io); + break; + case C2R_PLAN: + call_fftw_execute_split_dft_c2r(p, ri, ii, ro); + break; + case R2C_PLAN: + call_fftw_execute_split_dft_r2c(p, ri, ro, io); + break; + case R2R_PLAN: + call_fftw_execute_split_dft_r2r(p, ri, ro); + break; + } +} +/*--------------------------------------------------------------------------*/ +int is_real(double *Ar, double *Ai, int ndims, int *dims) +{ + double zero = 0.0; + int t = 1; + int i = 0; + int lA = 1; + + + for (i = 0; i < ndims; i++) + { + lA = lA * dims[i]; + } + + /*Check if A is real*/ + if (Ai != NULL) + { + for (i = 0; i < lA; i++) + { + if (Ai[i] != zero) + { + t = 0; + break; + } + } + } + return t; +} + +/*-------------------------------------------------------------------------- + * Check if a 1D array A is "symmetric" or hermitian symmetric for fft. + * A==conj(A([1 $:-1:2])) + * Ar : pointer on real part array + * Ai : pointer on imaginary part array or NULL + * nA : number of elements + * iA : increment between 2 consecutive element of the array + */ + +int check_1D_symmetry(double *Ar, double *Ai, int nA, int iA) +{ + int i = 0; + int nas2 = (int)(nA / 2); + double zero = 0.0; + //Checking real part + if ( nA % 2 == 0) + { + /* A length is even */ + for (i = 1; i < nas2; i++) + { + if (Ar[iA * i] != Ar[iA * (nA - i)]) + { + return 0; + } + } + } + else + { + /* A length is odd */ + for (i = 1; i <= nas2; i++) + { + if (Ar[iA * i] != Ar[iA * (nA - i)]) + { + return 0; + } + } + } + if (Ai == NULL) + { + return 1; + } + //Checking imaginary part + if ( nA % 2 == 0) + { + /* A length is even */ + if (Ai[0] != zero || Ai[iA * (nA / 2)] != zero) + { + return 0; + } + for (i = 1; i < nas2; i++) + { + if (Ai[iA * i] != -Ai[iA * (nA - i)]) + { + return 0; + } + } + } + else + { + /* A length is odd */ + if (Ai[0] != zero) + { + return 0; + } + for (i = 1; i <= nas2; i++) + { + if (Ai[iA * i] != -Ai[iA * (nA - i)]) + { + return 0; + } + } + } + return 1; +} +/*-------------------------------------------------------------------------- + * Check if a 2D array A is "symmetric" or hermitian symmetric for fft. + * A==conj(A([1 $:-1:2],[1 $:-1:2]) + * Ar : pointer on real part array + * Ai : pointer on imaginary part array or NULL + * mA : number of rows + * nA : number of columns + * iA : increment between 2 consecutive element of a row + * jA : increment between 2 consecutive element of a column + */ + +int check_2D_symmetry(double *Ar, double *Ai, int mA, int iA, int nA, int jA) +{ + int l1 = 0; + int l2 = 0; + int k = 0; + int l = 0; + int nAs2 = (int)(nA / 2) + 1; /* A VERIFIER */ + + /* Check first column */ + if (!check_1D_symmetry(Ar, Ai, mA, iA)) + { + return 0; + } + /* Check first row */ + if (!check_1D_symmetry(Ar, Ai, nA, jA)) + { + return 0; + } + + /* Check A(2:$,2:$) block */ + if (Ai == NULL) + { + for (k = 1; k < nAs2; k++) + { + l1 = jA * k + iA ; + l2 = jA * (nA - k) + iA * (mA - 1); + for (l = 1; l < mA; l++) + { + if (Ar[l1] != Ar[l2]) + { + return 0; + } + l1 += iA; + l2 -= iA; + } + } + } + else + { + for (k = 1; k < nAs2; k++) + { + l1 = jA * k + iA ; + l2 = jA * (nA - k) + iA * (mA - 1); + for (l = 1; l < mA; l++) + { + if ((Ar[l1] != Ar[l2]) || (Ai[l1] != -Ai[l2])) + { + return 0; + } + l1 += iA; + l2 -= iA; + } + } + } + return 1; +} + +/*-------------------------------------------------------------------------- + * Check if a N-D array A is "symmetric" or hermitian symmetric for fft + * A==conj(A([1 $:-1:2],...,[1 $:-1:2]) + * Ar : pointer on real part array + * Ai : pointer on imaginary part array or NULL + * mA : number of rows + * nA : number of columns + * iA : increment between 2 consecutive element of a row + * jA : increment between 2 consecutive element of a column + */ + +int check_ND_symmetry(double *Ar, double *Ai, int ndims, int *dims, int *incr) +{ + int i = 0, j = 0, l = 0; + int r = 0; + int l1 = 0;/* current 1-D index in array*/ + int l2 = 0;/* associated symmetric value 1-D index */ + int *temp = NULL; + int *dims1 = NULL; + int *incr1 = NULL; + int nSub = 0, nSubs2 = 0; + int k = 0, step = 0; + + if (ndims == 2) + { + r = check_2D_symmetry(Ar, Ai, dims[0], incr[0], dims[1], incr[1]); + return r; + } + else if (ndims == 1) + { + r = check_1D_symmetry(Ar, Ai, dims[0], incr[0]); + return r; + } + + if ((temp = (int *)MALLOC(sizeof(int) * (2 * ndims))) == NULL) + { + return -1; + } + dims1 = temp; + incr1 = temp + ndims; + + for (i = 0; i < ndims; i++) + { + /* remove current dimension and increment out of dims ans incr */ + l = 0; + for (j = 0; j < ndims; j++) + { + if (j != i) + { + dims1[l] = dims[j]; + incr1[l] = incr[j]; + l++; + } + } + r = check_ND_symmetry(Ar, Ai, ndims - 1, dims1, incr1); + if (r != 1) + { + dims1 = NULL; + incr1 = NULL; + FREE(temp); + return r; + } + } + + /* check bloc A(2:$,....,2:$)*/ + /*A(2,...,2) index*/ + l1 = 0; + for (i = 0; i < ndims; i++) + { + l1 += incr[i]; + } + /*A($,...,$) index*/ + l2 = 0; + for (i = 0; i < ndims; i++) + { + l2 += (dims[i] - 1) * incr[i]; + } + + + /* cumprod(size(A(2:$,....,2:$)))*/ + incr1[0] = dims[0] - 1; + for (i = 1; i < (ndims - 1); i++) + { + incr1[i] = incr1[i - 1] * (dims[i] - 1) ; + } + /* steps*/ + dims1[0] = (dims[0] - 2) * incr[0]; + for (i = 1; i < (ndims - 1); i++) + { + dims1[i] = dims1[i - 1] + (dims[i] - 2) * incr[i]; + } + + /* A(2:$,....,2:$) block number of elements*/ + nSub = 1; + for (i = 0; i < ndims; i++) + { + nSub *= (dims[i] - 1); + } + + nSubs2 = (int)(nSub / 2); + + + if (Ai == NULL) + { + /* Real case */ + for (i = 0; i < nSubs2; i++) + { + + if (Ar[l1] != Ar[l2]) + { + return 0; + } + step = incr[0]; + for (j = ndims - 2; j >= 0; j--) + { + if ((i + 1) % incr1[j] == 0) + { + step = -dims1[j] + incr[j + 1] ; + break; + } + } + l1 += step; + l2 -= step; + } + } + else /* Complex case */ + { + for (i = 0; i < nSubs2; i++) + { + if (Ar[l1] != Ar[l2] || Ai[l1] != -Ai[l2]) + { + return 0; + } + step = incr[0]; + for (j = ndims - 2; j >= 0; j--) + { + if ((i + 1) % incr1[j] == 0) + { + step = -dims1[j] + incr[j + 1] ; + break; + } + } + l1 += step; + l2 -= step; + } + } + dims1 = NULL; + incr1 = NULL; + FREE(temp); + return 1; +} + + + +int check_array_symmetry(double *Ar, double *Ai, guru_dim_struct gdim) +{ + int ndims = gdim.rank; + int * dims = NULL; + int * incr = NULL; + int r = -1; + int i = 0, j = 0, k = 0; + + if (gdim.howmany_rank == 0) + { + switch (gdim.rank) + { + case 1: + return check_1D_symmetry(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is); + case 2: + return check_2D_symmetry(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is); + default: /*general N-D case*/ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + return -1; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + FREE(dims); + return -1; + } + for (i = 0; i < ndims; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + r = check_ND_symmetry(Ar, Ai, ndims, dims, incr); + FREE(dims); + FREE(incr); + return r; + } + } + else + { + int m = 0; + int p = 1; + int *dims1 = NULL; + int *incr1 = NULL; + int ir = 0; + + if ((dims1 = (int *)MALLOC(sizeof(int) * gdim.howmany_rank)) == NULL) + { + return -1; + } + dims1[0] = gdim.howmany_dims[0].n; + for (i = 1; i < gdim.howmany_rank; i++) + { + dims1[i] = dims1[i - 1] * gdim.howmany_dims[i].n; + } + m = dims1[gdim.howmany_rank - 1]; + + if ((incr1 = (int *)MALLOC(sizeof(int) * gdim.howmany_rank)) == NULL) + { + FREE(dims1); + return -1; + } + p = 1; + for (i = 0; i < gdim.howmany_rank; i++) + { + p += (gdim.howmany_dims[i].n - 1) * gdim.howmany_dims[i].is; + incr1[i] = p; + } + switch (gdim.rank) + { + case 1: + if (Ai == NULL) + { + /* multiple 1D fft */ + for (ir = 0; ir < gdim.howmany_rank; ir++) + { + j = 0; + for (i = 1; i <= m; i++) + { + if ((r = check_1D_symmetry(Ar + j, NULL, gdim.dims[0].n, gdim.dims[0].is)) != 1 ) + { + return r; + } + j += gdim.howmany_dims[0].is; + for (k = gdim.howmany_rank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + } + else + { + for (ir = 0; ir < gdim.howmany_rank; ir++) + { + j = 0; + for (i = 1; i <= m; i++) + { + if ((r = check_1D_symmetry(Ar + j, Ai + j, gdim.dims[0].n, gdim.dims[0].is)) != 1 ) + { + return r; + } + j += gdim.howmany_dims[0].is; + for (k = gdim.howmany_rank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + } + FREE(dims1); + return 1; + case 2: /* multiple 2D fft */ + if (Ai == NULL) + { + for (ir = 0; ir < gdim.howmany_rank; ir++) + { + j = 0; + for (i = 1; i <= m; i++) + { + if ((r = check_2D_symmetry(Ar + j, NULL, gdim.dims[0].n, gdim.dims[0].is, + gdim.dims[1].n, gdim.dims[1].is)) != 1 ) + { + return r; + } + j += gdim.howmany_dims[0].is; + + for (k = gdim.howmany_rank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + } + else + { + for (ir = 0; ir < gdim.howmany_rank; ir++) + { + j = 0; + for (i = 1; i <= m; i++) + { + if ((r = check_2D_symmetry(Ar + j, Ai + j, gdim.dims[0].n, gdim.dims[0].is, + gdim.dims[1].n, gdim.dims[1].is)) != 1 ) + { + return r; + } + j += gdim.howmany_dims[0].is; + for (k = gdim.howmany_rank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + } + FREE(dims1); + FREE(incr1); + return 1; + default: /*general N-D case*/ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + return -1; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + FREE(dims); + return -1; + } + for (i = 0; i < ndims; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + for (ir = 0; ir < gdim.howmany_rank; ir++) + { + j = 0; + for (i = 1; i <= m; i++) + { + if (Ai == NULL) + { + r = check_ND_symmetry(Ar + j, NULL, ndims, dims, incr); + } + else + { + r = check_ND_symmetry(Ar + j, Ai + j, ndims, dims, incr); + } + if (r <= 0) + { + FREE(dims); + FREE(incr); + FREE(dims1); + return r; + } + j += gdim.howmany_dims[0].is; + for (k = gdim.howmany_rank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + FREE(dims); + FREE(incr); + FREE(dims1); + return 1; + } + } + return 1; +} +/*-------------------------------------------------------------------------- + * "symmetrizing" a vector A of length nA modifying the second half part of the vector + * nA even: A=[a0 A1 conj(A1($:-1:1))] + * nA odd : A=[a0 A1 am conj(A1($:-1:1))] + */ + +void complete_1D_array(double *Ar, double *Ai, int nA, int iA) +{ + + if (nA > 2) + { + int nAs2 = (int)(nA / 2); + int n = (nA % 2 == 0) ? nAs2 - 1 : nAs2; + int l1 = iA; /* ignore first element */ + int l2 = (nA - 1) * iA; + int i = 0; + if (Ai == NULL) + { + for (i = 0; i < n; i++) + { + Ar[l2] = Ar[l1]; + l1 += iA; + l2 -= iA; + } + } + else + { + for (i = 0; i < n; i++) + { + Ar[l2] = Ar[l1]; + Ai[l2] = -Ai[l1]; + l1 += iA; + l2 -= iA; + } + } + } +} + +/*-------------------------------------------------------------------------- + * "symmetrizing" a mA x nA array modifying the second half part of the columns + * nA even: A=[a11 A12 conj(A12($:-1:1)) + * A21 A22 conj(A22($:-1:1,$:-1:1))] + * + * nA odd : A=[a11 A12 am conj(A12($:-1:1)) + A21 A22 A2m conj(A22($:-1:1,$:-1:1))]] +*/ + +void complete_2D_array(double *Ar, double *Ai, int mA, int iA, int nA, int jA) +{ + if (nA > 2) + { + int n = (nA % 2 == 0) ? (int)(nA / 2) - 1 : (int)(nA / 2); + int i = 0, j = 0; /* loop variables */ + int l1 = jA + iA; /* the index of the first element of the A22 block A(2,2)*/ + int l2 = (mA - 1) * iA + (nA - 1) * jA; /* the index of the last element of the A22 block A(mA,nA)*/ + int step = 0; + /* first column */ + /*could not be useful because fftw only skip half of the rightmost dimension but it may be not exactly symmetric */ + + complete_1D_array(Ar, Ai, mA, iA); + + /* first row */ + complete_1D_array(Ar, Ai, nA, jA); + + /* A22 block */ + if (Ai == NULL) + { + for (j = 0; j < n; j++) + { + for (i = 1; i < mA; i++) + { + Ar[l2] = Ar[l1]; + l1 += iA; + l2 -= iA; + } + step = -(mA - 1) * iA + jA; + l1 += step; + l2 -= step; + } + } + else + { + for (j = 0; j < n; j++) + { + for (i = 1; i < mA; i++) + { + Ar[l2] = Ar[l1]; + Ai[l2] = -Ai[l1]; + l1 += iA; + l2 -= iA; + } + step = -(mA - 1) * iA + jA; + l1 += step; + l2 -= step; + } + } + } +} + +int complete_ND_array(double *Ar, double *Ai, int ndims, int *dims, int *incr) +{ + int i = 0, j = 0, l = 0; + int r = 0; + int l1 = 0;/* current 1-D index in array*/ + int l2 = 0;/* associated symmetric value 1-D index */ + + int *temp = NULL; + int *dims1 = NULL; + int *incr1 = NULL; + int nSub = 0, nSubs2 = 0, step = 0, k = 0; + + if (ndims == 2) + { + complete_2D_array(Ar, Ai, dims[0], incr[0], dims[1], incr[1]); + return 0; + } + else if (ndims == 1) + { + complete_1D_array(Ar, Ai, dims[0], incr[0]); + return 0; + } + if ((temp = (int *)MALLOC(sizeof(int) * (2 * ndims))) == NULL) + { + return -1; + } + dims1 = temp; + incr1 = temp + ndims; + + for (i = 0; i < ndims; i++) + { + /* remove current dimension and increment out of dims ans incr */ + l = 0; + for (j = 0; j < ndims; j++) + { + if (j != i) + { + dims1[l] = dims[j]; + incr1[l] = incr[j]; + l++; + } + } + r = complete_ND_array(Ar, Ai, ndims - 1, dims1, incr1); + if (r < 0) + { + dims1 = NULL; + incr1 = NULL; + FREE(temp); + return r; + } + } + + /* check bloc A(2:$,....,2:$)*/ + l1 = 0; + for (i = 0; i < ndims; i++) + { + l1 += incr[i]; + } + /*A($,...,$) index*/ + l2 = 0; + for (i = 0; i < ndims; i++) + { + l2 += (dims[i] - 1) * incr[i]; + } + + + /* cumprod(size(A(2:$,....,2:$)))*/ + incr1[0] = dims[0] - 1; + for (i = 1; i < (ndims - 1); i++) + { + incr1[i] = incr1[i - 1] * (dims[i] - 1) ; + } + /* steps*/ + dims1[0] = (dims[0] - 2) * incr[0]; + for (i = 1; i < (ndims - 1); i++) + { + dims1[i] = dims1[i - 1] + (dims[i] - 2) * incr[i]; + } + + /* A(2:$,....,2:$) block number of elements*/ + nSub = 1; + for (i = 0; i < ndims; i++) + { + nSub *= (dims[i] - 1); + } + + nSubs2 = (int)(nSub / 2); + + if (Ai == 0) + { + /* Real case */ + for (i = 0; i < nSubs2; i++) + { + Ar[l2] = Ar[l1]; + step = incr[0]; + for (j = ndims - 2; j >= 0; j--) + { + if ((i + 1) % incr1[j] == 0) + { + step = -dims1[j] + incr[j + 1] ; + break; + } + } + l1 += step; + l2 -= step; + } + } + else /* Complex case */ + { + for (i = 0; i < nSubs2; i++) + { + Ar[l2] = Ar[l1]; + Ai[l2] = -Ai[l1]; + step = incr[0]; + for (j = ndims - 2; j >= 0; j--) + { + if ((i + 1) % incr1[j] == 0) + { + step = -dims1[j] + incr[j + 1] ; + break; + } + } + l1 += step; + l2 -= step; + } + } + dims1 = NULL; + incr1 = NULL; + FREE(temp); + return 1; +} + +int complete_array(double *Ar, double *Ai, guru_dim_struct gdim) +{ + int ndims = gdim.rank; + int * dims = NULL; + int * incr = NULL; + int r = -1; + int i = 0, j = 0, k = 0; + if (gdim.howmany_rank == 0) + { + switch (gdim.rank) + { + case 1: + complete_1D_array(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is); + return 0; + case 2: + complete_2D_array(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is); + return 0; + default: /*general N-D case*/ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + return -1; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + FREE(dims); + return -1; + } + for (i = 0; i < ndims; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + r = complete_ND_array(Ar, Ai, ndims, dims, incr); + FREE(dims); + FREE(incr); + return r; + } + } + else + { + int m = 0; + int *dims1 = NULL; + int *incr1 = NULL; + int hrank = gdim.howmany_rank; + + if ((dims1 = (int *)MALLOC(sizeof(int) * hrank)) == NULL) + { + return -1; + } + dims1[0] = gdim.howmany_dims[0].n; + for (i = 1; i < hrank; i++) + { + dims1[i] = dims1[i - 1] * gdim.howmany_dims[i].n; + } + m = dims1[gdim.howmany_rank - 1]; + + if ((incr1 = (int *)MALLOC(sizeof(int) * hrank)) == NULL) + { + FREE(dims1); + return -1; + } + incr1[0] = gdim.howmany_dims[0].n * gdim.howmany_dims[0].is; + for (i = 1; i < hrank; i++) + { + incr1[i] = incr1[i - 1] + (gdim.howmany_dims[i].n - 1) * gdim.howmany_dims[i].is;; + } + switch (gdim.rank) + { + case 1: /* multiple 1D fft */ + if (Ai == NULL) + { + j = 0; + for (i = 1; i <= m; i++) + { + complete_1D_array(Ar + j, NULL, gdim.dims[0].n, gdim.dims[0].is); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + else + { + j = 0; + for (i = 1; i <= m; i++) + { + complete_1D_array(Ar + j, Ai + j, gdim.dims[0].n, gdim.dims[0].is); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + FREE(dims1); + return 0; + case 2: /* multiple 2D fft */ + if (Ai == NULL) + { + j = 0; + for (i = 1; i <= m; i++) + { + complete_2D_array(Ar + j, NULL, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + else + { + j = 0; + for (i = 1; i <= m; i++) + { + complete_2D_array(Ar + j, Ai + j, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is); + + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + FREE(dims1); + return 0; + default: /* multiple ND fft */ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + return -1; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + FREE(dims); + FREE(dims1); + return -1; + } + for (i = 0; i < ndims; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + j = 0; + for (i = 1; i <= m; i++) + { + if (Ai == NULL) + { + r = complete_ND_array(Ar + j, NULL, ndims, dims, incr); + } + else + { + r = complete_ND_array(Ar + j, Ai + j, ndims, dims, incr); + } + if (r < 0) + { + FREE(dims); + FREE(incr); + FREE(dims1); + return r; + } + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + + FREE(dims); + FREE(incr); + FREE(dims1); + FREE(incr1); + } + } + return 0; +} +/*-------------------------------------------------------------------------- + * Check if Scilab is linked with MKL library * Some fftw functions + * are not yet implemented in MKL in particular wisdom; guru_split real case + * functions and guru_split complex with homany_rank>1 + */ + +int withMKL(void) +{ + return (call_fftw_export_wisdom_to_string() == NULL); +} +/*--------------------------------------------------------------------------*/ + + + + +void dct_scale_1D_array(double *Ar, double *Ai, int nA, int iA, int isn, double fact) +{ + /* fact: multiplication factor for all terms but the first one*/ + double s, s0; + int i = 0; + + if (isn == -1) + { + s0 = fact * 0.5 / sqrt(nA); + } + else + { + s0 = fact / sqrt(nA); /* 2.0*sqrt(nA)/(2*nA) */ + } + s = fact / sqrt(2.0 * nA); /* sqrt(2.0*nA)/(2*nA) */ + if (Ai == NULL) + { + Ar[0] *= s0; + for (i = 1; i < nA; i++) + { + Ar[i * iA] *= s; + } + } + else + { + Ar[0] *= s0; + Ai[0] *= s0; + for (i = 1; i < nA; i++) + { + Ar[i * iA] *= s; + Ai[i * iA] *= s; + } + + } +} + + + +void dct_scale_2D_array(double *Ar, double *Ai, int mA, int iA, int nA, int jA, int isn, double fact) +{ + int j = 0; /* loop variables */ + double s, s0; + s = fact / sqrt(2 * nA); + s0 = fact / sqrt(nA); + if (isn == -1) + { + s0 *= 0.5; + } + + /* first column */ + dct_scale_1D_array(Ar, Ai, mA, iA, isn, s0); + /* other columns */ + if (Ai == NULL) + { + for (j = 1; j < nA; j++) + { + dct_scale_1D_array(&Ar[j * jA], NULL, mA, iA, isn, s); + } + } + else + { + for (j = 1; j < nA; j++) + { + dct_scale_1D_array(&Ar[j * jA], &Ai[j * jA], mA, iA, isn, s); + } + } +} + +int dct_scale_ND_array(double *Ar, double *Ai, int ndims, int *dims, int *incr, int isn, double fact) +{ + int i = 0; + double s = 1.0, s0 = 1.0; + + if (ndims == 2) + { + dct_scale_2D_array(Ar, Ai, dims[0], incr[0], dims[1], incr[1], isn, fact); + } + else if (ndims == 1) + { + dct_scale_1D_array(Ar, Ai, dims[0], incr[0], isn, fact); + } + else + { + /* Decompose recursively along the first array dimension + A_scaled(i,:,...,:)=s1(i)*scale(A(i,:,...,:)) + with + s1(1) = 1/(2*sqrt(n1) and s1(i>1) = 1/(sqrt(2*n1) + */ + s = fact / sqrt(2.0 * dims[0]); + s0 = fact / sqrt(dims[0]); + if (isn == -1) + { + s0 *= 0.5; + } + + if (Ai == NULL) + { + /* first index: s1(1)*/ + dct_scale_ND_array(Ar, Ai, ndims - 1, dims + 1, incr + 1, isn, s0); + /* next indexes: s1(i>1)*/ + for (i = 1; i < dims[0]; i++) + { + dct_scale_ND_array(&Ar[i * incr[0]], NULL, ndims - 1, dims + 1, incr + 1, isn, s); + } + } + else + { + dct_scale_ND_array(Ar, Ai, ndims - 1, dims + 1, incr + 1, isn, s0); + + for (i = 1; i < dims[0]; i++) + { + dct_scale_ND_array(&Ar[i * incr[0]], &Ai[i * incr[0]], ndims - 1, dims + 1, incr + 1, isn, s); + } + } + } + return 0; + +} + + +int dct_scale_array(double *Ar, double *Ai, guru_dim_struct gdim, int isn) +{ + int * dims = NULL; + int * incr = NULL; + int *dims1 = NULL; + int *incr1 = NULL; + + int i = 0, j = 0, k = 0; + if (gdim.howmany_rank == 0) + { + switch (gdim.rank) + { + case 1: + dct_scale_1D_array(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is, isn, (double)1.0); + return 0; + case 2: + dct_scale_2D_array(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is, isn, (double)1.0); + return 0; + default: /*general N-D case*/ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + for (i = 0; i < gdim.rank; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + dct_scale_ND_array(Ar, Ai, gdim.rank, dims, incr, isn, (double)1.0); + } + } + else + { + int m = 0; + int hrank = gdim.howmany_rank; + if ((dims1 = (int *)MALLOC(sizeof(int) * hrank)) == NULL) + { + goto ERR; + } + dims1[0] = gdim.howmany_dims[0].n; + for (i = 1; i < hrank; i++) + { + dims1[i] = dims1[i - 1] * gdim.howmany_dims[i].n; + } + m = dims1[gdim.howmany_rank - 1]; + + if ((incr1 = (int *)MALLOC(sizeof(int) * hrank)) == NULL) + { + goto ERR; + } + + incr1[0] = gdim.howmany_dims[0].n * gdim.howmany_dims[0].is; + for (i = 1; i < hrank; i++) + { + incr1[i] = incr1[i - 1] + (gdim.howmany_dims[i].n - 1) * gdim.howmany_dims[i].is;; + } + switch (gdim.rank) + { + case 1: /* multiple 1D dct */ + if (Ai == NULL) + { + j = 0; + for (i = 1; i <= m; i++) + { + dct_scale_1D_array(Ar + j, NULL, gdim.dims[0].n, gdim.dims[0].is, isn, (double)1.0); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + else + { + j = 0; + for (i = 1; i <= m; i++) + { + dct_scale_1D_array(Ar + j, Ai + j, gdim.dims[0].n, gdim.dims[0].is, isn, (double)1.0); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + break; + case 2: /* multiple 2D dct */ + if (Ai == NULL) + { + j = 0; + for (i = 1; i <= m; i++) + { + dct_scale_2D_array(&Ar[j], NULL, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is, isn, (double)1.0); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + + else + { + j = 0; + for (i = 1; i <= m; i++) + { + dct_scale_2D_array(&Ar[j], &Ai[j], gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is, isn, (double)1.0); + + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + break; + default: /* multiple ND dct */ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + + for (i = 0; i < gdim.rank; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + j = 0; + for (i = 1; i <= m; i++) + { + if (Ai == NULL) + { + dct_scale_ND_array(Ar + j, NULL, gdim.rank, dims, incr, isn, (double)1.0); + } + else + { + dct_scale_ND_array(Ar + j, Ai + j, gdim.rank, dims, incr, isn, (double)1.0); + } + + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + + } + FREE(dims); + FREE(incr); + FREE(dims1); + FREE(incr1); + return 0; + +ERR: + FREE(dims); + FREE(incr); + FREE(dims1); + FREE(incr1); + return -1; +} + +void dst_scale_1D_array(double *Ar, double *Ai, int nA, int iA, int isn, double fact) +{ + /* fact: multiplication factor for all terms but the first one*/ + double s = fact / (1.0 + nA); + int i = 0; + + if (Ai == NULL) + { + for (i = 0; i < nA; i++) + { + Ar[i * iA] *= s; + } + } + else + { + for (i = 0; i < nA; i++) + { + Ar[i * iA] *= s; + Ai[i * iA] *= s; + } + + } +} + + +void dst_scale_2D_array(double *Ar, double *Ai, int mA, int iA, int nA, int jA, int isn, double fact) +{ + int j = 0; /* loop variables */ + double s = fact / (1.0 + nA); + + if (Ai == NULL) + { + for (j = 0; j < nA; j++) + { + dst_scale_1D_array(&Ar[j * jA], NULL, mA, iA, isn, s); + } + } + else + { + for (j = 0; j < nA; j++) + { + dst_scale_1D_array(&Ar[j * jA], &Ai[j * jA], mA, iA, isn, s); + } + } +} + +int dst_scale_ND_array(double *Ar, double *Ai, int ndims, int *dims, int *incr, int isn, double fact) +{ + int i = 0; + double s = 1.0; + + if (ndims == 2) + { + dst_scale_2D_array(Ar, Ai, dims[0], incr[0], dims[1], incr[1], isn, fact); + } + else if (ndims == 1) + { + dst_scale_1D_array(Ar, Ai, dims[0], incr[0], isn, fact); + } + else + { + /* Decompose recursively along the first array dimension + A_scaled(i,:,...,:)=s1*scale(A(i,:,...,:)) + with + s1 = 1/(n+1) + */ + + s = fact / (1.0 + dims[0]); + + if (Ai == NULL) + { + /* next indexes: s1(i>1)*/ + for (i = 0; i < dims[0]; i++) + { + dst_scale_ND_array(&Ar[i * incr[0]], NULL, ndims - 1, dims + 1, incr + 1, isn, s); + } + } + else + { + for (i = 0; i < dims[0]; i++) + { + dst_scale_ND_array(&Ar[i * incr[0]], &Ai[i * incr[0]], ndims - 1, dims + 1, incr + 1, isn, s); + } + } + } + return 0; +} + + +int dst_scale_array(double *Ar, double *Ai, guru_dim_struct gdim, int isn) +{ + int * dims = NULL; + int * incr = NULL; + int *dims1 = NULL; + int *incr1 = NULL; + + int i = 0, j = 0, k = 0; + if (gdim.howmany_rank == 0) + { + switch (gdim.rank) + { + case 1: + dst_scale_1D_array(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is, isn, (double)1.0); + return 0; + case 2: + dst_scale_2D_array(Ar, Ai, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is, isn, (double)1.0); + return 0; + default: /*general N-D case*/ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + for (i = 0; i < gdim.rank; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + dst_scale_ND_array(Ar, Ai, gdim.rank, dims, incr, isn, (double)1.0); + } + } + else + { + int m = 0; + int hrank = gdim.howmany_rank; + + if ((dims1 = (int *)MALLOC(sizeof(int) * hrank)) == NULL) + { + goto ERR; + } + dims1[0] = gdim.howmany_dims[0].n; + for (i = 1; i < hrank; i++) + { + dims1[i] = dims1[i - 1] * gdim.howmany_dims[i].n; + } + m = dims1[gdim.howmany_rank - 1]; + + if ((incr1 = (int *)MALLOC(sizeof(int) * hrank)) == NULL) + { + goto ERR; + } + + incr1[0] = gdim.howmany_dims[0].n * gdim.howmany_dims[0].is; + for (i = 1; i < hrank; i++) + { + incr1[i] = incr1[i - 1] + (gdim.howmany_dims[i].n - 1) * gdim.howmany_dims[i].is;; + } + + switch (gdim.rank) + { + case 1: /* multiple 1D dst */ + if (Ai == NULL) + { + j = 0; + for (i = 1; i <= m; i++) + { + dst_scale_1D_array(Ar + j, NULL, gdim.dims[0].n, gdim.dims[0].is, isn, (double)1.0); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + else + { + j = 0; + for (i = 1; i <= m; i++) + { + dst_scale_1D_array(Ar + j, Ai + j, gdim.dims[0].n, gdim.dims[0].is, isn, (double)1.0); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + break; + case 2: /* multiple 2D dst */ + if (Ai == NULL) + { + j = 0; + for (i = 1; i <= m; i++) + { + dst_scale_2D_array(&Ar[j], NULL, gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is, isn, (double)1.0); + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + + else + { + j = 0; + for (i = 1; i <= m; i++) + { + dst_scale_2D_array(&Ar[j], &Ai[j], gdim.dims[0].n, gdim.dims[0].is, gdim.dims[1].n, gdim.dims[1].is, isn, (double)1.0); + + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + break; + default: /* multiple ND dst */ + if ((dims = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + if ((incr = (int *)MALLOC(sizeof(int) * gdim.rank)) == NULL) + { + goto ERR; + } + + for (i = 0; i < gdim.rank; i++) + { + dims[i] = gdim.dims[i].n; + incr[i] = gdim.dims[i].is; + } + j = 0; + for (i = 1; i <= m; i++) + { + if (Ai == NULL) + { + dst_scale_ND_array(Ar + j, NULL, gdim.rank, dims, incr, isn, (double)1.0); + } + else + { + dst_scale_ND_array(Ar + j, Ai + j, gdim.rank, dims, incr, isn, (double)1.0); + } + + j += gdim.howmany_dims[0].is; + for (k = hrank - 2; k >= 0; k--) + { + if (i % dims1[k] == 0) + { + j += -incr1[k] + gdim.howmany_dims[k + 1].is; + break; + } + } + } + } + + } + FREE(dims); + FREE(incr); + FREE(dims1); + FREE(incr1); + return 0; + +ERR: + FREE(dims); + FREE(incr); + FREE(dims1); + FREE(incr1); + return -1; +} diff --git a/modules/fftw/src/c/fftw_utilities.h b/modules/fftw/src/c/fftw_utilities.h new file mode 100755 index 000000000..70e6027a0 --- /dev/null +++ b/modules/fftw/src/c/fftw_utilities.h @@ -0,0 +1,78 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2006/2007 - INRIA - Alan Layec +* Copyright (C) 2008 - INRIA - Allan CORNET +* Copyright (C) 2012 - INRIA - Serge STEER +* +* 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 __FFTW_UTILITIES__ +#define __FFTW_UTILITIES__ + +#include <string.h> +#include <stdio.h> +#include "fftw3.h" + + +/* definiton of a guru_dim structure type */ +typedef struct guru_dim_st +{ + int rank; + fftw_iodim *dims; + int howmany_rank; + fftw_iodim *howmany_dims; +} guru_dim_struct; + +enum Plan_Type +{ + C2C_PLAN = 0, + R2C_PLAN = 1, + C2R_PLAN = 2, + R2R_PLAN = 3 +}; + +/* definition of a FFTW_Plan structure type */ +typedef struct fftw_plan_st +{ + /* stored parameters of fftw_plan_guru_split_dft function */ + enum Plan_Type plan_type; + fftw_plan p; + guru_dim_struct gdim; + unsigned flags; + fftw_r2r_kind *kind; +} FFTW_Plan_struct; + + + +/* prototypes of utilities functions */ +fftw_plan GetFFTWPlan(enum Plan_Type type, guru_dim_struct *gdim, + double *ri, double *ii, + double *ro, double *io, + unsigned flags, int isn, fftw_r2r_kind *kind, int *errflag); + +int FreeFFTWPlan(FFTW_Plan_struct *Sci_Plan); + +int CheckGuruDims(guru_dim_struct *gdim1, guru_dim_struct *gdim2); +int CheckKindArray(fftw_r2r_kind *kind1, fftw_r2r_kind *kind2, int rank); + +void ExecuteFFTWPlan(enum Plan_Type type, const fftw_plan p, double *ri, double *ii, double *ro, double *io); + +int is_real(double *Ar, double *Ai, int ndims, int *dims); +int check_array_symmetry(double *Ar, double *Ai, guru_dim_struct gdim); +int complete_array(double *Ar, double *Ai, guru_dim_struct gdim); +int dct_scale_array(double *Ar, double *Ai, guru_dim_struct gdim, int isn); +int dst_scale_array(double *Ar, double *Ai, guru_dim_struct gdim, int isn); + +unsigned int getCurrentFftwFlags(void); +void setCurrentFftwFlags(unsigned int newFftwFlags); + +FFTW_Plan_struct *getSci_Backward_Plan(void); +FFTW_Plan_struct *getSci_Forward_Plan(void); + +#endif /* __FFTW_UTILITIES__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/c/fftwlibname.c b/modules/fftw/src/c/fftwlibname.c new file mode 100755 index 000000000..cb20a9697 --- /dev/null +++ b/modules/fftw/src/c/fftwlibname.c @@ -0,0 +1,55 @@ +/* + * 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 + * + */ +#include <string.h> +#include "stdlib.h" +#include "fftwlibname.h" +#include "MALLOC.h" +#ifdef _MSC_VER +#include "strdup_windows.h" +#endif +/*--------------------------------------------------------------------------*/ +static char *fftwlibname = NULL; +/*--------------------------------------------------------------------------*/ +void setfftwlibname(char *libname) +{ + if (libname) + { + if (fftwlibname) + { + FREE(fftwlibname); + fftwlibname = NULL; + } + fftwlibname = strdup(libname); + } +} +/*--------------------------------------------------------------------------*/ +char *getfftwlibname(void) +{ + char *name = NULL; + + if (fftwlibname) + { + name = strdup(fftwlibname); + } + + return name; +} +/*--------------------------------------------------------------------------*/ +void freefftwlibname(void) +{ + if (fftwlibname) + { + FREE(fftwlibname); + fftwlibname = NULL; + } +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/c/fftwlibname.h b/modules/fftw/src/c/fftwlibname.h new file mode 100755 index 000000000..060f481b1 --- /dev/null +++ b/modules/fftw/src/c/fftwlibname.h @@ -0,0 +1,21 @@ +/* + * 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 __FFTWLIBNAME_H__ +#define __FFTWLIBNAME_H__ +/*--------------------------------------------------------------------------*/ + +void setfftwlibname(char *libname); +char *getfftwlibname(void); +void freefftwlibname(void); + +#endif /*__FFTWLIBNAME_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/c/libscifftw_algo_la-callfftw.lo b/modules/fftw/src/c/libscifftw_algo_la-callfftw.lo new file mode 100755 index 000000000..bbae15089 --- /dev/null +++ b/modules/fftw/src/c/libscifftw_algo_la-callfftw.lo @@ -0,0 +1,12 @@ +# src/c/libscifftw_algo_la-callfftw.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscifftw_algo_la-callfftw.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/fftw/src/c/libscifftw_algo_la-fftw_utilities.lo b/modules/fftw/src/c/libscifftw_algo_la-fftw_utilities.lo new file mode 100755 index 000000000..5b0472ac2 --- /dev/null +++ b/modules/fftw/src/c/libscifftw_algo_la-fftw_utilities.lo @@ -0,0 +1,12 @@ +# src/c/libscifftw_algo_la-fftw_utilities.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscifftw_algo_la-fftw_utilities.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/fftw/src/c/libscifftw_algo_la-fftwlibname.lo b/modules/fftw/src/c/libscifftw_algo_la-fftwlibname.lo new file mode 100755 index 000000000..c7dc028ce --- /dev/null +++ b/modules/fftw/src/c/libscifftw_algo_la-fftwlibname.lo @@ -0,0 +1,12 @@ +# src/c/libscifftw_algo_la-fftwlibname.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscifftw_algo_la-fftwlibname.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/fftw/src/c/libscifftw_algo_la-sci_data_utilities.lo b/modules/fftw/src/c/libscifftw_algo_la-sci_data_utilities.lo new file mode 100755 index 000000000..db64b48f1 --- /dev/null +++ b/modules/fftw/src/c/libscifftw_algo_la-sci_data_utilities.lo @@ -0,0 +1,12 @@ +# src/c/libscifftw_algo_la-sci_data_utilities.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscifftw_algo_la-sci_data_utilities.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/fftw/src/c/libscifftw_algo_la-with_fftw.lo b/modules/fftw/src/c/libscifftw_algo_la-with_fftw.lo new file mode 100755 index 000000000..94fb5ecf7 --- /dev/null +++ b/modules/fftw/src/c/libscifftw_algo_la-with_fftw.lo @@ -0,0 +1,12 @@ +# src/c/libscifftw_algo_la-with_fftw.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscifftw_algo_la-with_fftw.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/fftw/src/c/sci_data_utilities.c b/modules/fftw/src/c/sci_data_utilities.c new file mode 100755 index 000000000..9463546b2 --- /dev/null +++ b/modules/fftw/src/c/sci_data_utilities.c @@ -0,0 +1,484 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - INRIA - Serge STEER +* +* 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 +* +*/ +#include "stack-c.h" +#include "MALLOC.h" +#include "api_scilab.h" +#include "localization.h" +#include "Scierror.h" +/*--------------------------------------------------------------------------*/ +int getArrayOfDouble(void* _pvCtx, int *piAddr, int *ndims, int **dims, double **Ar, double **Ai) +{ + SciErr sciErr; + int *piAddrChild = NULL; + int *piOffset = NULL; + int *piData = NULL; + int nItems = 0; + int iRows = 0; + int iCols = 0; + int iType = 0; + + sciErr = getVarType(_pvCtx, piAddr, &iType); + if (iType == sci_matrix) + { + *ndims = 2; + *dims = &(piAddr[1]); + if (isVarComplex(_pvCtx, piAddr)) + { + getComplexMatrixOfDouble(_pvCtx, piAddr, &iRows, &iCols, Ar, Ai); + } + else + { + getMatrixOfDouble(_pvCtx, piAddr, &iRows, &iCols, Ar); + *Ai = NULL; + } + return 1; + } + else if (iType == sci_mlist) + { + sciErr = getListItemNumber(_pvCtx, piAddr, &nItems); + if (nItems != 3) + { + return 0; + } + /*Check if first item is ["hm","dims","entries"] */ + sciErr = getListItemAddress(_pvCtx, piAddr, 1, &piAddrChild); + sciErr = getVarType(_pvCtx, piAddrChild, &iType); + if (iType != sci_strings) + { + return 0; + } + sciErr = getVarDimension(_pvCtx, piAddrChild, &iRows, &iCols); + if (iRows*iCols != 3) + { + return 0; + } + /* Check if first entry of the first item is "hm" */ + piOffset = piAddrChild + 4; + if (piOffset[1] - piOffset[0] != 2) + { + return 0; + } + piData = piOffset + iRows * iCols + 1; + if (piData[0] != 17 || piData[1] != 22) + { + return 0; /* check "hm" */ + } + /* Get second item dims */ + sciErr = getListItemAddress(_pvCtx, piAddr, 2, &piAddrChild); + sciErr = getVarType(_pvCtx, piAddrChild, &iType); + if (iType != sci_ints) + { + return 0; + } + sciErr = getMatrixOfInteger32(_pvCtx, piAddrChild, &iRows, &iCols, dims); + if (sciErr.iErr) + { + return 0; + } + *ndims = iRows * iCols; + /* Get thirds item entries */ + sciErr = getListItemAddress(_pvCtx, piAddr, 3, &piAddrChild); + sciErr = getVarType(_pvCtx, piAddrChild, &iType); + if (iType != sci_matrix) + { + return 0; + } + if (isVarComplex(_pvCtx, piAddrChild)) + { + getComplexMatrixOfDouble(_pvCtx, piAddrChild, &iRows, &iCols, Ar, Ai); + } + else + { + getMatrixOfDouble(_pvCtx, piAddrChild, &iRows, &iCols, Ar); + *Ai = NULL; + } + return 1; + } + else + { + return 0; + } +} + +SciErr allocComplexArrayOfDouble(void* _pvCtx, int _iVar, int ndims, int *dims, double **Ar, double **Ai) +{ + SciErr sciErr; + int *piAddr = NULL; + + if (ndims == 2) + { + sciErr = allocComplexMatrixOfDouble( _pvCtx, _iVar, dims[0], dims[1], Ar, Ai); + if (sciErr.iErr) + { + return sciErr; + } + } + else + { + int i = 0; + int n = 1; + const char * hmType[] = {"hm", "dims", "entries"}; + + for (i = 0; i < ndims; i++) + { + n *= dims[i]; + } + + sciErr = createMList(_pvCtx, _iVar, 3, &piAddr); + if (sciErr.iErr) + { + return sciErr; + } + + sciErr = createMatrixOfStringInList(_pvCtx, _iVar, piAddr, 1, 1, 3, hmType); + if (sciErr.iErr) + { + return sciErr; + } + sciErr = createMatrixOfInteger32InList(_pvCtx, _iVar, piAddr, 2, 1, ndims, dims); + if (sciErr.iErr) + { + return sciErr; + } + + sciErr = allocComplexMatrixOfDoubleInList(_pvCtx, _iVar, piAddr, 3, n, 1, Ar, Ai); + if (sciErr.iErr) + { + return sciErr; + } + } + return sciErr; +} + +SciErr allocArrayOfDouble(void* _pvCtx, int _iVar, int ndims, int *dims, double **Ar) +{ + SciErr sciErr; + int *piAddr = NULL; + + + if (ndims == 2) + { + sciErr = allocMatrixOfDouble( _pvCtx, _iVar, dims[0], dims[1], Ar); + if (sciErr.iErr) + { + return sciErr; + } + } + else + { + int i = 0; + int n = 1; + const char * hmType[] = {"hm", "dims", "entries"}; + + for (i = 0; i < ndims; i++) + { + n *= dims[i]; + } + + sciErr = createMList(_pvCtx, _iVar, 3, &piAddr); + if (sciErr.iErr) + { + return sciErr; + } + sciErr = createMatrixOfStringInList(_pvCtx, _iVar, piAddr, 1, 1, 3, hmType); + if (sciErr.iErr) + { + return sciErr; + } + sciErr = createMatrixOfInteger32InList(_pvCtx, _iVar, piAddr, 2, 1, ndims, dims); + if (sciErr.iErr) + { + return sciErr; + } + + sciErr = allocMatrixOfDoubleInList(_pvCtx, _iVar, piAddr, 3, n, 1, Ar); + if (sciErr.iErr) + { + return sciErr; + } + } + return sciErr; +} + +SciErr getScalarIntArg(void* _pvCtx, int _iVar, char *fname, int *value) +{ + SciErr sciErr; + int *piAddr = NULL; + int iType = 0; + int iPrec = 0; + double t_d = 0.0; + char t_c = 0; + unsigned char t_uc = 0; + short t_s = 0; + unsigned short t_us = 0; + int t_i = 0; + unsigned int t_ui = 0; + sciErr.iErr = 0; + sciErr.iMsgCount = 0; + + sciErr = getVarAddressFromPosition(_pvCtx, _iVar, &piAddr); + if (sciErr.iErr) + { + addErrorMessage(&sciErr, API_ERROR_GET_STRING, _("%s: Can not read input argument #%d.\n"), fname, _iVar); + return sciErr; + } + + //check type + sciErr = getVarType(_pvCtx, piAddr, &iType); + if (sciErr.iErr) + { + addErrorMessage(&sciErr, API_ERROR_GET_INT, _("%s: Can not read input argument #%d.\n"), fname, _iVar); + return sciErr; + } + + if (!isScalar(_pvCtx, piAddr)) + { + addErrorMessage(&sciErr, API_ERROR_GET_INT, _("%s: Wrong size for input argument #%d: A scalar expected.\n"), fname, _iVar); + return sciErr; + } + + if (iType == sci_matrix) + { + getScalarDouble(_pvCtx, piAddr, &t_d); + *value = (int)t_d; + } + else if (iType == sci_ints) + { + sciErr = getMatrixOfIntegerPrecision(_pvCtx, piAddr, &iPrec); + if (sciErr.iErr) + { + addErrorMessage(&sciErr, API_ERROR_GET_INT, _("%s: Can not read input argument #%d.\n"), fname, _iVar); + return sciErr; + } + + switch (iPrec) + { + case SCI_INT8 : + { + getScalarInteger8(_pvCtx, piAddr, &t_c); + *value = (int)t_c; + } + case SCI_INT16 : + { + getScalarInteger16(_pvCtx, piAddr, &t_s); + *value = (int)t_s; + } + case SCI_INT32 : + { + getScalarInteger32(_pvCtx, piAddr, &t_i); + *value = (int)t_i; + } + case SCI_UINT8 : + { + getScalarUnsignedInteger8(_pvCtx, piAddr, &t_uc); + *value = (int)t_uc; + } + case SCI_UINT16 : + { + getScalarUnsignedInteger16(_pvCtx, piAddr, &t_us); + *value = (int)t_us; + } + case SCI_UINT32 : + { + getScalarUnsignedInteger32(_pvCtx, piAddr, &t_ui); + *value = (int)t_ui; + } + } + } + else + { + addErrorMessage(&sciErr, API_ERROR_GET_INT, + _("%s: Wrong type for argument #%d: An integer or a floating point number expected.\n"), + fname, _iVar); + return sciErr; + } + return sciErr; +} + +SciErr getVectorIntArg(void* _pvCtx, int _iVar, char *fname, int *pndims, int **pDim) +{ + SciErr sciErr; + int *piAddr = NULL; + int iType = 0; + int iPrec = 0; + int mDim = 0; + int nDim = 0; + int *Dim = NULL; + int ndims = 0; + + double* p_d = NULL; + char* p_c = NULL; + unsigned char* p_uc = NULL; + short* p_s = NULL; + unsigned short* p_us = NULL; + int* p_i = NULL; + unsigned int* p_ui = NULL; + int i = 0; + + sciErr.iErr = 0; + sciErr.iMsgCount = 0; + + getVarAddressFromPosition(_pvCtx, _iVar, &piAddr); + + //check type + getVarType(_pvCtx, piAddr, &iType); + + if (isVarMatrixType(_pvCtx, piAddr) == 0) + { + addErrorMessage(&sciErr, API_ERROR_GET_INT, _("%s: Wrong type for input argument #%d.\n"), fname, _iVar); + return sciErr; + } + + getVarDimension(_pvCtx, piAddr, &mDim, &nDim); + + ndims = mDim * nDim; + *pndims = ndims; + if (ndims <= 0) + { + addErrorMessage(&sciErr, API_ERROR_GET_INT, + _("%s: Wrong size for input argument #%d.\n"), fname, _iVar); + return sciErr; + } + if ((Dim = (int *)MALLOC(ndims * sizeof(int))) == NULL) + { + addErrorMessage(&sciErr, API_ERROR_GET_INT, + _("%s: Cannot allocate more memory.\n"), fname); + return sciErr; + } + *pDim = Dim; + if (iType == sci_matrix) + { + sciErr = getMatrixOfDouble(_pvCtx, piAddr, &mDim, &nDim, &p_d); + for (i = 0; i < ndims; i++) + { + Dim[i] = (int)(p_d[i]); + } + } + else if (iType == sci_ints) + { + getMatrixOfIntegerPrecision(_pvCtx, piAddr, &iPrec); + switch (iPrec) + { + case SCI_INT8 : + getMatrixOfInteger8(_pvCtx, piAddr, &mDim, &nDim, &p_c); + for (i = 0; i < ndims; i++) + { + Dim[i] = (int)(p_c[i]); + } + break; + case SCI_INT16 : + getMatrixOfInteger16(_pvCtx, piAddr, &mDim, &nDim, &p_s); + for (i = 0; i < ndims; i++) + { + Dim[i] = (int)(p_s[i]); + } + break; + case SCI_INT32 : + getMatrixOfInteger32(_pvCtx, piAddr, &mDim, &nDim, &p_i); + for (i = 0; i < ndims; i++) + { + Dim[i] = (int)(p_i[i]); + } + break; + case SCI_UINT8 : + getMatrixOfUnsignedInteger8(_pvCtx, piAddr, &mDim, &nDim, &p_uc); + for (i = 0; i < ndims; i++) + { + Dim[i] = (int)(p_uc[i]); + } + break; + case SCI_UINT16 : + getMatrixOfUnsignedInteger16(_pvCtx, piAddr, &mDim, &nDim, &p_us); + for (i = 0; i < ndims; i++) + { + Dim[i] = (int) p_us[i]; + } + break; + case SCI_UINT32 : + getMatrixOfUnsignedInteger32(_pvCtx, piAddr, &mDim, &nDim, &p_ui); + for (i = 0; i < ndims; i++) + { + Dim[i] = (int)(p_ui[i]); + } + break; + } + } + else + { + FREE(Dim); + Dim = NULL; + addErrorMessage(&sciErr, API_ERROR_GET_INT, + _("%s: Wrong type for argument #%d: An array of floating point or integer numbers expected.\n"), fname, _iVar); + return sciErr; + } + return sciErr; +} + +BOOL isHyperMatrixMlist(void* _pvCtx, int *piAddressVar) +{ + char **fields = NULL; + SciErr sciErr; + int iType = 0; + int m = 0, n = 0; + + if (piAddressVar == NULL) + { + return FALSE; + } + + sciErr = getVarType(_pvCtx, piAddressVar, &iType); + if (sciErr.iErr) + { + return FALSE; + } + + if (iType == sci_mlist) + { + int* piAddrChild = NULL; + int iItem = 0; + + sciErr = getListItemNumber(pvApiCtx, piAddressVar, &iItem); + if (sciErr.iErr) + { + return FALSE; + } + + sciErr = getListItemAddress(pvApiCtx, piAddressVar, 1, &piAddrChild); + if (sciErr.iErr) + { + return FALSE; + } + + if (!isStringType(_pvCtx, piAddrChild)) + { + return FALSE; + } + + if (getAllocatedMatrixOfString(_pvCtx, piAddrChild, &m, &n , &fields) == 0) + { + if (strcmp(fields[0], "hm") != 0) + { + freeAllocatedMatrixOfString(m, n, fields); + fields = NULL; + return FALSE; + } + freeAllocatedMatrixOfString(m, n, fields); + fields = NULL; + } + else + { + return FALSE; + } + return TRUE; + } + return FALSE; +} diff --git a/modules/fftw/src/c/sci_data_utilities.h b/modules/fftw/src/c/sci_data_utilities.h new file mode 100755 index 000000000..92d0e6465 --- /dev/null +++ b/modules/fftw/src/c/sci_data_utilities.h @@ -0,0 +1,27 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - INRIA - Serge STEER +* +* 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 +* +*/ +#include "api_scilab.h" +#ifndef __SCI_DATA_UTILITIES__ +#define __SCI_DATA_UTILITIES__ +int getArrayOfDouble(void* pvApiCtx, int *piAddr, int *ndims, int **dims, double **Ar, double **Ai); + +SciErr allocArrayOfDouble(void* _pvCtx, int _iVar, int ndims, int *dims, double **Ar); + +SciErr allocComplexArrayOfDouble(void* _pvCtx, int _iVar, int ndims, int *dims, double **Ar, double **Ai); + +SciErr getScalarIntArg(void* _pvCtx, int _iVar, char *fname, int *value); + +SciErr getVectorIntArg(void* _pvCtx, int _iVar, char *fname, int *pndims, int **pDim); + +BOOL isHyperMatrixMlist(void* _pvCtx, int *piAddressVar); +#endif /* __SCI_DATA_UTILITIES__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/c/with_fftw.c b/modules/fftw/src/c/with_fftw.c new file mode 100755 index 000000000..51bbadde5 --- /dev/null +++ b/modules/fftw/src/c/with_fftw.c @@ -0,0 +1,25 @@ +/* +* 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 +* +*/ + +#include "with_fftw.h" +/*--------------------------------------------------------------------------*/ +int C2F(withfftw)(int *rep) +{ + *rep = 1; + return 0; +} +/*--------------------------------------------------------------------------*/ +BOOL withfftw(void) +{ + return TRUE; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/nofftw/.deps/libscifftw_algo_la-nofftw.Plo b/modules/fftw/src/nofftw/.deps/libscifftw_algo_la-nofftw.Plo new file mode 100755 index 000000000..9ce06a81e --- /dev/null +++ b/modules/fftw/src/nofftw/.deps/libscifftw_algo_la-nofftw.Plo @@ -0,0 +1 @@ +# dummy diff --git a/modules/fftw/src/nofftw/.deps/libscifftw_la-nofftw.Plo b/modules/fftw/src/nofftw/.deps/libscifftw_la-nofftw.Plo new file mode 100755 index 000000000..9ce06a81e --- /dev/null +++ b/modules/fftw/src/nofftw/.deps/libscifftw_la-nofftw.Plo @@ -0,0 +1 @@ +# dummy diff --git a/modules/fftw/src/nofftw/nofftw.c b/modules/fftw/src/nofftw/nofftw.c new file mode 100755 index 000000000..92482d952 --- /dev/null +++ b/modules/fftw/src/nofftw/nofftw.c @@ -0,0 +1,35 @@ +/* + * 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 + * + */ +#include "machine.h" /* C2F */ +#include "BOOL.h" +#include "Scierror.h" +#include "localization.h" +#include "gw_fftw.h" +#include "with_fftw.h" +/*--------------------------------------------------------------------------*/ +int gw_fftw(void) +{ + Scierror(999, _("Scilab FFTW module not installed.\n")); + return 0; +} +/*--------------------------------------------------------------------------*/ +BOOL withfftw(void) +{ + return FALSE; +} +/*--------------------------------------------------------------------------*/ +int C2F(withfftw)(int *rep) +{ + *rep = 0; + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/fftw/src/nofftw/nofftw.rc b/modules/fftw/src/nofftw/nofftw.rc new file mode 100755 index 000000000..9d8515efe --- /dev/null +++ b/modules/fftw/src/nofftw/nofftw.rc @@ -0,0 +1,97 @@ +// Microsoft Visual C++ generated resource script. +// + + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +//#include "afxres.h" +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// French (France) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 5,5,2,0 + PRODUCTVERSION 5,5,2,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040c04b0" + BEGIN + VALUE "FileDescription", "nofftw module" + VALUE "FileVersion", "5, 5, 2, 0" + VALUE "InternalName", "nofftw module" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "nofftw.dll" + VALUE "ProductName", " nofftw" + VALUE "ProductVersion", "5, 5, 2, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x40c, 1200 + END +END + +#endif // French (France) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/modules/fftw/src/nofftw/nofftw.vcxproj b/modules/fftw/src/nofftw/nofftw.vcxproj new file mode 100755 index 000000000..8e5c51ca2 --- /dev/null +++ b/modules/fftw/src/nofftw/nofftw.vcxproj @@ -0,0 +1,195 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{7D4C4BE5-62F7-4886-9E59-645017329A22}</ProjectGuid> + <RootNamespace>nofftw</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>false</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>false</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;FFTW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;FFTW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;FFTW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;FFTW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="nofftw.c" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="nofftw.rc" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj"> + <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\..\..\localization\src\localization.vcxproj"> + <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj"> + <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/modules/fftw/src/nofftw/nofftw.vcxproj.filters b/modules/fftw/src/nofftw/nofftw.vcxproj.filters new file mode 100755 index 000000000..02506883e --- /dev/null +++ b/modules/fftw/src/nofftw/nofftw.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + <Filter Include="Libraries Dependencies"> + <UniqueIdentifier>{7fd5a762-9543-4248-b628-38b21c807518}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="nofftw.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="nofftw.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file |