git-svn-id: svn://db.shs.com.ru/pip@349 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -35,7 +35,8 @@ option(ICU "Unicode support" 1)
|
|||||||
option(USB "USB support" 0)
|
option(USB "USB support" 0)
|
||||||
option(STL "Building with STL containers" 0)
|
option(STL "Building with STL containers" 0)
|
||||||
option(CRYPT "Crypt support" 0)
|
option(CRYPT "Crypt support" 0)
|
||||||
option(FFTW "fftw3 support for PIFFT" 1)
|
option(FFTW "fftw3 support for PIFFT" 0)
|
||||||
|
option(FFTW_THREADS "fftw3 support for threadsave" 1)
|
||||||
option(INTROSPECTION_CONTAINERS "Build with containers introspection" 0)
|
option(INTROSPECTION_CONTAINERS "Build with containers introspection" 0)
|
||||||
option(INTROSPECTION_THREADS "Build with threads introspection" 0)
|
option(INTROSPECTION_THREADS "Build with threads introspection" 0)
|
||||||
option(LIB "System install" 1)
|
option(LIB "System install" 1)
|
||||||
@@ -70,37 +71,38 @@ CHECK_FUNCTION_EXISTS(y0 PIP_MATH_Y0)
|
|||||||
CHECK_FUNCTION_EXISTS(y1 PIP_MATH_Y1)
|
CHECK_FUNCTION_EXISTS(y1 PIP_MATH_Y1)
|
||||||
CHECK_FUNCTION_EXISTS(yn PIP_MATH_YN)
|
CHECK_FUNCTION_EXISTS(yn PIP_MATH_YN)
|
||||||
if(PIP_MATH_J0)
|
if(PIP_MATH_J0)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_MATH_J0")
|
add_definitions(-DPIP_MATH_J0)
|
||||||
endif()
|
endif()
|
||||||
if(PIP_MATH_J1)
|
if(PIP_MATH_J1)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_MATH_J1")
|
add_definitions(-DPIP_MATH_J1)
|
||||||
endif()
|
endif()
|
||||||
if(PIP_MATH_JN)
|
if(PIP_MATH_JN)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_MATH_JN")
|
add_definitions(-DPIP_MATH_JN)
|
||||||
endif()
|
endif()
|
||||||
if(PIP_MATH_Y0)
|
if(PIP_MATH_Y0)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_MATH_Y0")
|
add_definitions(-DPIP_MATH_Y0)
|
||||||
endif()
|
endif()
|
||||||
if(PIP_MATH_Y1)
|
if(PIP_MATH_Y1)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_MATH_Y1")
|
add_definitions(-DPIP_MATH_Y1)
|
||||||
endif()
|
endif()
|
||||||
if(PIP_MATH_YN)
|
if(PIP_MATH_YN)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_MATH_YN")
|
add_definitions(-DPIP_MATH_YN)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIB})
|
||||||
|
endif()
|
||||||
|
|
||||||
# Check if RT timers exists
|
# Check if RT timers exists
|
||||||
set(CMAKE_REQUIRED_INCLUDES time.h)
|
set(CMAKE_REQUIRED_INCLUDES time.h)
|
||||||
if (DEFINED ENV{QNX_HOST})
|
if(NOT DEFINED ENV{QNX_HOST} AND NOT APPLE AND NOT WIN32)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES )
|
list(APPEND LIBS rt)
|
||||||
else ()
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES rt)
|
|
||||||
endif()
|
endif()
|
||||||
CHECK_FUNCTION_EXISTS(timer_create PIP_TIMER_RT_0)
|
CHECK_FUNCTION_EXISTS(timer_create PIP_TIMER_RT_0)
|
||||||
CHECK_FUNCTION_EXISTS(timer_settime PIP_TIMER_RT_1)
|
CHECK_FUNCTION_EXISTS(timer_settime PIP_TIMER_RT_1)
|
||||||
CHECK_FUNCTION_EXISTS(timer_delete PIP_TIMER_RT_2)
|
CHECK_FUNCTION_EXISTS(timer_delete PIP_TIMER_RT_2)
|
||||||
if(PIP_TIMER_RT_0 AND PIP_TIMER_RT_1 AND PIP_TIMER_RT_2)
|
if(PIP_TIMER_RT_0 AND PIP_TIMER_RT_1 AND PIP_TIMER_RT_2)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_TIMER_RT")
|
add_definitions(-DPIP_TIMER_RT)
|
||||||
message(STATUS "Available timers: Thread, ThreadRT, Pool")
|
message(STATUS "Available timers: Thread, ThreadRT, Pool")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Available timers: Thread, Pool")
|
message(STATUS "Available timers: Thread, Pool")
|
||||||
@@ -110,7 +112,7 @@ endif ()
|
|||||||
# Check if USB is on (to enable use "-DUSB=" argument of cmake)
|
# Check if USB is on (to enable use "-DUSB=" argument of cmake)
|
||||||
if(USB)
|
if(USB)
|
||||||
message(STATUS "Building with USB support")
|
message(STATUS "Building with USB support")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_USB")
|
add_definitions(-DPIP_USB)
|
||||||
list(APPEND LIBS usb)
|
list(APPEND LIBS usb)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building without USB support")
|
message(STATUS "Building without USB support")
|
||||||
@@ -120,7 +122,7 @@ endif ()
|
|||||||
# Check if STL containers is on (to enable use "-DSTL=" argument of cmake)
|
# Check if STL containers is on (to enable use "-DSTL=" argument of cmake)
|
||||||
if(STL)
|
if(STL)
|
||||||
message(STATUS "Building with STL containers")
|
message(STATUS "Building with STL containers")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_CONTAINERS_STL")
|
add_definitions(-DPIP_CONTAINERS_STL)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building with PIP containers")
|
message(STATUS "Building with PIP containers")
|
||||||
endif()
|
endif()
|
||||||
@@ -129,7 +131,7 @@ endif ()
|
|||||||
# Check if ICU used for PIString and PIChar
|
# Check if ICU used for PIString and PIChar
|
||||||
if(ICU)
|
if(ICU)
|
||||||
message(STATUS "Building with ICU")
|
message(STATUS "Building with ICU")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_ICU")
|
add_definitions(-DPIP_ICU)
|
||||||
list(APPEND LIBS icuuc)
|
list(APPEND LIBS icuuc)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building without ICU, attention!")
|
message(STATUS "Building without ICU, attention!")
|
||||||
@@ -139,7 +141,7 @@ endif ()
|
|||||||
# Check if PIP support cryptographic encryption/decryption by using sodium library
|
# Check if PIP support cryptographic encryption/decryption by using sodium library
|
||||||
if(CRYPT)
|
if(CRYPT)
|
||||||
message(STATUS "Building with crypt support")
|
message(STATUS "Building with crypt support")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_CRYPT")
|
add_definitions(-DPIP_CRYPT)
|
||||||
list(APPEND LIBS sodium)
|
list(APPEND LIBS sodium)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building without crypt support")
|
message(STATUS "Building without crypt support")
|
||||||
@@ -149,11 +151,16 @@ endif ()
|
|||||||
# Check if PIP support fftw3 for PIFFT using in math module
|
# Check if PIP support fftw3 for PIFFT using in math module
|
||||||
if(FFTW)
|
if(FFTW)
|
||||||
message(STATUS "Building with fftw3 support")
|
message(STATUS "Building with fftw3 support")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_FFTW")
|
add_definitions(-DPIP_FFTW)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
add_definitions(-DPIP_FFTW_THREADSAFE)
|
||||||
list(APPEND LIBS fftw3-3 fftw3f-3 fftw3l-3)
|
list(APPEND LIBS fftw3-3 fftw3f-3 fftw3l-3)
|
||||||
else()
|
else()
|
||||||
list(APPEND LIBS fftw3 fftw3f fftw3_threads fftw3f_threads)
|
list(APPEND LIBS fftw3 fftw3f)
|
||||||
|
if(FFTW_THREADS)
|
||||||
|
add_definitions(-DPIP_FFTW_THREADSAFE)
|
||||||
|
list(APPEND LIBS fftw3_threads fftw3f_threads)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building without fftw3 support")
|
message(STATUS "Building without fftw3 support")
|
||||||
@@ -163,7 +170,7 @@ endif ()
|
|||||||
# Check if PIP should be built with containers introspection
|
# Check if PIP should be built with containers introspection
|
||||||
if(INTROSPECTION_CONTAINERS)
|
if(INTROSPECTION_CONTAINERS)
|
||||||
message(STATUS "Building with containers introspection")
|
message(STATUS "Building with containers introspection")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_INTROSPECTION_CONTAINERS")
|
add_definitions(-DPIP_INTROSPECTION_CONTAINERS)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building without containers introspection")
|
message(STATUS "Building without containers introspection")
|
||||||
endif()
|
endif()
|
||||||
@@ -172,7 +179,7 @@ endif ()
|
|||||||
# Check if PIP should be built with threads introspection
|
# Check if PIP should be built with threads introspection
|
||||||
if(INTROSPECTION_THREADS)
|
if(INTROSPECTION_THREADS)
|
||||||
message(STATUS "Building with threads introspection")
|
message(STATUS "Building with threads introspection")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPIP_INTROSPECTION_THREADS")
|
add_definitions(-DPIP_INTROSPECTION_THREADS)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building without threads introspection")
|
message(STATUS "Building without threads introspection")
|
||||||
endif()
|
endif()
|
||||||
@@ -184,29 +191,43 @@ if (APPLE)
|
|||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND LIBS ws2_32 iphlpapi psapi)
|
list(APPEND LIBS ws2_32 iphlpapi psapi)
|
||||||
|
else()
|
||||||
|
list(APPEND LIBS dl)
|
||||||
|
if(DEFINED ENV{QNX_HOST})
|
||||||
|
list(APPEND LIBS socket)
|
||||||
|
else()
|
||||||
|
list(APPEND LIBS pthread util)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
foreach(LIB_ ${LIBS})
|
||||||
|
find_library("${LIB_}_FOUND" ${LIB_})
|
||||||
|
message(STATUS "Check the ${LIB_} is installed: " ${${LIB_}_FOUND})
|
||||||
|
if("${${LIB_}_FOUND}" STREQUAL "${LIB_}_FOUND-NOTFOUND")
|
||||||
|
message(WARNING "library ${LIB_} not found, please install it")
|
||||||
|
else()
|
||||||
|
list(APPEND LIBS ${LIB_})
|
||||||
|
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIB_})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
if(WIN32)
|
||||||
list(APPEND CPPS "pip_resource_win.rc")
|
list(APPEND CPPS "pip_resource_win.rc")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPSAPI_VERSION=1")
|
add_definitions(-DPSAPI_VERSION=1)
|
||||||
add_library(pip SHARED ${CPPS} ${HDRS} ${PHDRS})
|
add_library(pip SHARED ${CPPS} ${HDRS} ${PHDRS})
|
||||||
if(${CMAKE_C_COMPILER} STREQUAL "cl")
|
if(${CMAKE_C_COMPILER} STREQUAL "cl")
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
generate_export_header(pip)
|
generate_export_header(pip)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /Ob2 /Ot")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /Ob2 /Ot")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} -O3 -fPIC")
|
set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} -O3 -fPIC")
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||||
if(DEFINED ENV{QNX_HOST})
|
if(DEFINED ENV{QNX_HOST})
|
||||||
list(APPEND LIBS socket dl)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
||||||
add_library(pip STATIC ${CPPS})
|
add_library(pip STATIC ${CPPS})
|
||||||
else()
|
else()
|
||||||
list(APPEND LIBS pthread dl util)
|
|
||||||
if (NOT APPLE)
|
|
||||||
list(APPEND LIBS rt)
|
|
||||||
endif()
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||||
add_library(pip SHARED ${CPPS})
|
add_library(pip SHARED ${CPPS})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ const char hash_def_key[] = "_picrypt_";
|
|||||||
|
|
||||||
PICrypt::PICrypt() {
|
PICrypt::PICrypt() {
|
||||||
#ifdef PIP_CRYPT
|
#ifdef PIP_CRYPT
|
||||||
int ret;
|
sodium_init();
|
||||||
ret = sodium_init();
|
|
||||||
nonce_.resize(crypto_secretbox_NONCEBYTES);
|
nonce_.resize(crypto_secretbox_NONCEBYTES);
|
||||||
key_.resize(crypto_secretbox_KEYBYTES);
|
key_.resize(crypto_secretbox_KEYBYTES);
|
||||||
randombytes_buf(key_.data(), key_.size());
|
randombytes_buf(key_.data(), key_.size());
|
||||||
@@ -78,8 +77,7 @@ PIByteArray PICrypt::crypt(const PIByteArray & data, PIByteArray key) {
|
|||||||
if (key.size() != crypto_secretbox_KEYBYTES)
|
if (key.size() != crypto_secretbox_KEYBYTES)
|
||||||
key.resize(crypto_secretbox_KEYBYTES, ' ');
|
key.resize(crypto_secretbox_KEYBYTES, ' ');
|
||||||
//return PIByteArray();
|
//return PIByteArray();
|
||||||
int ret;
|
sodium_init();
|
||||||
ret = sodium_init();
|
|
||||||
PIByteArray n;
|
PIByteArray n;
|
||||||
retba.resize(data.size() + crypto_secretbox_MACBYTES);
|
retba.resize(data.size() + crypto_secretbox_MACBYTES);
|
||||||
n.resize(crypto_secretbox_NONCEBYTES);
|
n.resize(crypto_secretbox_NONCEBYTES);
|
||||||
@@ -125,8 +123,7 @@ PIByteArray PICrypt::decrypt(const PIByteArray & crypt_data, PIByteArray key, bo
|
|||||||
if (ok) *ok = false;
|
if (ok) *ok = false;
|
||||||
return PIByteArray();
|
return PIByteArray();
|
||||||
}
|
}
|
||||||
int ret;
|
sodium_init();
|
||||||
ret = sodium_init();
|
|
||||||
PIByteArray n;
|
PIByteArray n;
|
||||||
n.resize(crypto_secretbox_NONCEBYTES);
|
n.resize(crypto_secretbox_NONCEBYTES);
|
||||||
retba.resize(crypt_data.size() - n.size() - crypto_secretbox_MACBYTES);
|
retba.resize(crypt_data.size() - n.size() - crypto_secretbox_MACBYTES);
|
||||||
@@ -147,8 +144,7 @@ PIByteArray PICrypt::decrypt(const PIByteArray & crypt_data, PIByteArray key, bo
|
|||||||
PIByteArray PICrypt::hash(const PIString & secret) {
|
PIByteArray PICrypt::hash(const PIString & secret) {
|
||||||
PIByteArray hash;
|
PIByteArray hash;
|
||||||
#ifdef PIP_CRYPT
|
#ifdef PIP_CRYPT
|
||||||
int ret;
|
sodium_init();
|
||||||
ret = sodium_init();
|
|
||||||
hash.resize(crypto_generichash_BYTES);
|
hash.resize(crypto_generichash_BYTES);
|
||||||
PIByteArray s(secret.data(), secret.size());
|
PIByteArray s(secret.data(), secret.size());
|
||||||
crypto_generichash(hash.data(), hash.size(), s.data(), s.size(), (const uchar*)hash_def_key, sizeof(hash_def_key) - 1);
|
crypto_generichash(hash.data(), hash.size(), s.data(), s.size(), (const uchar*)hash_def_key, sizeof(hash_def_key) - 1);
|
||||||
@@ -163,8 +159,7 @@ ullong PICrypt::shorthash(const PIString& s, PIByteArray key) {
|
|||||||
ullong hash = 0;
|
ullong hash = 0;
|
||||||
#ifdef PIP_CRYPT
|
#ifdef PIP_CRYPT
|
||||||
if (crypto_shorthash_BYTES != sizeof(hash)) piCout << "[PICrypt]" << "internal error: bad hash size";
|
if (crypto_shorthash_BYTES != sizeof(hash)) piCout << "[PICrypt]" << "internal error: bad hash size";
|
||||||
int ret;
|
sodium_init();
|
||||||
ret = sodium_init();
|
|
||||||
if (key.size() != crypto_shorthash_KEYBYTES) {
|
if (key.size() != crypto_shorthash_KEYBYTES) {
|
||||||
piCout << "[PICrypt]" << "invalid key size" << key.size() << ", shoud be" << crypto_shorthash_KEYBYTES << ", filled zeros";
|
piCout << "[PICrypt]" << "invalid key size" << key.size() << ", shoud be" << crypto_shorthash_KEYBYTES << ", filled zeros";
|
||||||
key.resize(crypto_shorthash_KEYBYTES, 0);
|
key.resize(crypto_shorthash_KEYBYTES, 0);
|
||||||
@@ -181,8 +176,7 @@ ullong PICrypt::shorthash(const PIString& s, PIByteArray key) {
|
|||||||
PIByteArray PICrypt::generateKey() {
|
PIByteArray PICrypt::generateKey() {
|
||||||
PIByteArray hash;
|
PIByteArray hash;
|
||||||
#ifdef PIP_CRYPT
|
#ifdef PIP_CRYPT
|
||||||
int ret;
|
sodium_init();
|
||||||
ret = sodium_init();
|
|
||||||
hash.resize(crypto_secretbox_KEYBYTES);
|
hash.resize(crypto_secretbox_KEYBYTES);
|
||||||
randombytes_buf(hash.data(), hash.size());
|
randombytes_buf(hash.data(), hash.size());
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -168,7 +168,9 @@ template<> inline void PIFFTW_Private<float>::p_executePlan(void * plan) {fftwf_
|
|||||||
template<> inline void PIFFTW_Private<float>::p_executePlan_c2c(void * plan, const void * in, void * out) {fftwf_execute_dft((fftwf_plan)plan, (fftwf_complex *)in, (fftwf_complex *)out);}
|
template<> inline void PIFFTW_Private<float>::p_executePlan_c2c(void * plan, const void * in, void * out) {fftwf_execute_dft((fftwf_plan)plan, (fftwf_complex *)in, (fftwf_complex *)out);}
|
||||||
template<> inline void PIFFTW_Private<float>::p_executePlan_r2c(void * plan, const void * in, void * out) {fftwf_execute_dft_r2c((fftwf_plan)plan, (float *)in, (fftwf_complex *)out);}
|
template<> inline void PIFFTW_Private<float>::p_executePlan_r2c(void * plan, const void * in, void * out) {fftwf_execute_dft_r2c((fftwf_plan)plan, (float *)in, (fftwf_complex *)out);}
|
||||||
template<> inline void PIFFTW_Private<float>::p_destroyPlan(void *& plan) {if (plan) fftwf_destroy_plan((fftwf_plan)plan); plan = 0;}
|
template<> inline void PIFFTW_Private<float>::p_destroyPlan(void *& plan) {if (plan) fftwf_destroy_plan((fftwf_plan)plan); plan = 0;}
|
||||||
|
#ifdef PIP_FFTW_THREADSAFE
|
||||||
template<> inline void PIFFTW_Private<float>::p_makeThreadSafe() {fftwf_make_planner_thread_safe();}
|
template<> inline void PIFFTW_Private<float>::p_makeThreadSafe() {fftwf_make_planner_thread_safe();}
|
||||||
|
#endif
|
||||||
|
|
||||||
template<> inline void PIFFTW_Private<double>::p_createPlan_c2c_1d(void *& plan, int size, const void * in, void * out, int dir, int flags) {
|
template<> inline void PIFFTW_Private<double>::p_createPlan_c2c_1d(void *& plan, int size, const void * in, void * out, int dir, int flags) {
|
||||||
plan = fftw_plan_dft_1d(size, (fftw_complex *)in, (fftw_complex *)out, dir, flags);}
|
plan = fftw_plan_dft_1d(size, (fftw_complex *)in, (fftw_complex *)out, dir, flags);}
|
||||||
@@ -178,7 +180,9 @@ template<> inline void PIFFTW_Private<double>::p_executePlan(void * plan) {fftw_
|
|||||||
template<> inline void PIFFTW_Private<double>::p_executePlan_c2c(void * plan, const void * in, void * out) {fftw_execute_dft((fftw_plan)plan, (fftw_complex *)in, (fftw_complex *)out);}
|
template<> inline void PIFFTW_Private<double>::p_executePlan_c2c(void * plan, const void * in, void * out) {fftw_execute_dft((fftw_plan)plan, (fftw_complex *)in, (fftw_complex *)out);}
|
||||||
template<> inline void PIFFTW_Private<double>::p_executePlan_r2c(void * plan, const void * in, void * out) {fftw_execute_dft_r2c((fftw_plan)plan, (double *)in, (fftw_complex *)out);}
|
template<> inline void PIFFTW_Private<double>::p_executePlan_r2c(void * plan, const void * in, void * out) {fftw_execute_dft_r2c((fftw_plan)plan, (double *)in, (fftw_complex *)out);}
|
||||||
template<> inline void PIFFTW_Private<double>::p_destroyPlan(void *& plan) {if (plan) fftw_destroy_plan((fftw_plan)plan); plan = 0;}
|
template<> inline void PIFFTW_Private<double>::p_destroyPlan(void *& plan) {if (plan) fftw_destroy_plan((fftw_plan)plan); plan = 0;}
|
||||||
|
#ifdef PIP_FFTW_THREADSAFE
|
||||||
template<> inline void PIFFTW_Private<double>::p_makeThreadSafe() {fftw_make_planner_thread_safe();}
|
template<> inline void PIFFTW_Private<double>::p_makeThreadSafe() {fftw_make_planner_thread_safe();}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
template<> inline void PIFFTW_Private<ldouble>::p_createPlan_c2c_1d(void *& plan, int size, const void * in, void * out, int dir, int flags) {
|
template<> inline void PIFFTW_Private<ldouble>::p_createPlan_c2c_1d(void *& plan, int size, const void * in, void * out, int dir, int flags) {
|
||||||
@@ -189,7 +193,9 @@ template<> inline void PIFFTW_Private<ldouble>::p_executePlan(void * plan) {fftw
|
|||||||
template<> inline void PIFFTW_Private<ldouble>::p_executePlan_c2c(void * plan, const void * in, void * out) {fftwl_execute_dft((fftwl_plan)plan, (fftwl_complex *)in, (fftwl_complex *)out);}
|
template<> inline void PIFFTW_Private<ldouble>::p_executePlan_c2c(void * plan, const void * in, void * out) {fftwl_execute_dft((fftwl_plan)plan, (fftwl_complex *)in, (fftwl_complex *)out);}
|
||||||
template<> inline void PIFFTW_Private<ldouble>::p_executePlan_r2c(void * plan, const void * in, void * out) {fftwl_execute_dft_r2c((fftwl_plan)plan, (ldouble *)in, (fftwl_complex *)out);}
|
template<> inline void PIFFTW_Private<ldouble>::p_executePlan_r2c(void * plan, const void * in, void * out) {fftwl_execute_dft_r2c((fftwl_plan)plan, (ldouble *)in, (fftwl_complex *)out);}
|
||||||
template<> inline void PIFFTW_Private<ldouble>::p_destroyPlan(void *& plan) {if (plan) fftwl_destroy_plan((fftwl_plan)plan); plan = 0;}
|
template<> inline void PIFFTW_Private<ldouble>::p_destroyPlan(void *& plan) {if (plan) fftwl_destroy_plan((fftwl_plan)plan); plan = 0;}
|
||||||
|
#ifdef PIP_FFTW_THREADSAFE
|
||||||
template<> inline void PIFFTW_Private<ldouble>::p_makeThreadSafe() {fftwl_make_planner_thread_safe();}
|
template<> inline void PIFFTW_Private<ldouble>::p_makeThreadSafe() {fftwl_make_planner_thread_safe();}
|
||||||
|
#endif
|
||||||
#endif // WINDOWS
|
#endif // WINDOWS
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user