GPL + CeCILL Header change
[scilab.git] / scilab / modules / fftw / sci_gateway / cpp / fftw_gw.cpp
1 /*
2 *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 *  Copyright (C) 2014 - Scialb Enterprises - Antoine ELIAS
4 *
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13  * === LICENSE_END ===
14 *
15 */
16
17 #include "fftw_gw.hxx"
18 #include "context.hxx"
19 #include "overload.hxx"
20
21 #define MODULE_NAME L"fftw"
22 extern "C"
23 {
24 #include "gw_fftw.h"
25 }
26
27 int FFTWModule::Load()
28 {
29     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"loadfftwlibrary", &sci_loadfftwlibrary, MODULE_NAME));
30     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"disposefftwlibrary", &sci_disposefftwlibrary, MODULE_NAME));
31     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"fftwlibraryisloaded", &sci_fftwlibraryisloaded, MODULE_NAME));
32     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"fftw", &sci_fftw, MODULE_NAME));
33     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"fftw_flags", &sci_fftw_flags, MODULE_NAME));
34     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"get_fftw_wisdom", &sci_get_fftw_wisdom, MODULE_NAME));
35     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"set_fftw_wisdom", &sci_set_fftw_wisdom, MODULE_NAME));
36     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"fftw_forget_wisdom", &sci_fftw_forget_wisdom, MODULE_NAME));
37     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"dct", &sci_dct, MODULE_NAME));
38     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"dst", &sci_dst, MODULE_NAME));
39     return 1;
40 }