Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 38505f3d authored by hhakim's avatar hhakim
Browse files

Add to pyfaust the support of float on GPU (not tested yet).

parent 347fe2b2
Branches
Tags
No related merge requests found
......@@ -599,6 +599,16 @@ if(USE_GPU_MOD)
set(GPU_MOD_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/gpu_mod/src) # fallback to submodule directory in case find_package didn't work
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GPU_MOD_CFLAGS} -I${GPU_MOD_INCLUDE_DIR} -DUSE_GPU_MOD")
# TODO: set a function or a foreach to factorize the code configuration
set(FAUST_SCALAR_FOR_GM float)
set(GM_SCALAR float)
set(GM_REINTERPRET_CAST_SCALAR float)
configure_file(${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_MatDense_gpu.cpp.in ${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_MatDense_gpu_float.cpp)
configure_file(${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_MatSparse_gpu.cpp.in ${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_MatSparse_gpu_float.cpp)
configure_file(${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_Transform_gpu.cpp.in ${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_Transform_gpu_float.cpp)
configure_file(${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_Vect_gpu.cpp.in ${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/faust_Vect_gpu_float.cpp)
set(FAUST_SCALAR_FOR_GM double)
set(GM_SCALAR double)
set(GM_REINTERPRET_CAST_SCALAR double)
......
......@@ -88,12 +88,18 @@ foreach(PROC IN LISTS PROC_LIST)
endforeach()
endforeach()
# TODO: support complex float and GPU (when ok put this in the foreach loop above)
# TODO: support complex float (when ok put this in the foreach loop above)
if(BUILD_FLOAT_PYX)
set(TYPE_NAME float)
set(PROC CPU)
set(TYPE float)
configure_file(${FAUST_PYTHON_SRC_SRC_DIR}/FaustCoreCpp${PROC}.cpp.in ${FAUST_PYTHON_BIN_DIR}/FaustCoreCpp${PROC}${TYPE_NAME}.cpp)
if(USE_GPU_MOD)
set(TYPE_NAME float)
set(PROC GPU)
set(TYPE float)
configure_file(${FAUST_PYTHON_SRC_SRC_DIR}/FaustCoreCpp${PROC}.cpp.in ${FAUST_PYTHON_BIN_DIR}/FaustCoreCpp${PROC}${TYPE_NAME}.cpp)
endif()
endif()
......@@ -269,6 +275,9 @@ endforeach()
# TODO: support complex float and GPU (when ok put this in the foreach loop above)
if(BUILD_FLOAT_PYX)
Generate_pyx(Flt float Flt float CPU flt "" flt)
if(USE_GPU_MOD)
Generate_pyx(Flt float Flt float GPU flt "" flt)
endif()
endif()
if(NOT REMOTE_DATA_URL OR NOT REMOTE_DATA_FILE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment