Commit 3bba7a22 authored by incardon's avatar incardon
Browse files

Fixing Macro mess

parent 73abd647
Pipeline #2594 passed with stages
in 15 seconds
......@@ -29,6 +29,10 @@ if(CUDA_FOUND)
set(CUDA_SOURCES memory/CudaMemory.cu)
endif()
if(CUDA_ON_CPU)
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
if (BOOST_FOUND)
set(DEFINE_HAVE_BOOST "#define HAVE_BOOST")
set(DEFINE_HAVE_BOOST_IOSTREAMS "#define HAVE_BOOST_IOSTREAMS")
......
if(CUDA_FOUND OR CUDA_ON_CPU)
set(CUDA_SOURCES memory/CudaMemory.cu util/cudify/cudify_unit_test.cu)
set(CUDA_SOURCES memory/CudaMemory.cu)
else()
set(CUDA_SOURCES )
endif()
......@@ -7,13 +7,13 @@ endif()
if (CUDA_ON_CPU)
add_definitions(-DCUDA_ON_CPU)
set_source_files_properties(${CUDA_SOURCES} PROPERTIES LANGUAGE CXX)
set_source_files_properties(${CUDA_SOURCES} PROPERTIES COMPILE_FLAGS "-D__NVCC__ -DCUDA_GPU -DCUDART_VERSION=11000")
set_source_files_properties(${CUDA_SOURCES} PROPERTIES COMPILE_FLAGS "-D__NVCC__ -DCUDART_VERSION=11000")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_definitions("-x c++")
endif()
endif()
add_executable(mem main.cpp memory/HeapMemory.cpp util/cudify/cudify_vars.cpp ${CUDA_SOURCES})
add_executable(mem main.cpp memory/HeapMemory.cpp util/cudify/cudify_vars.cpp util/cudify/cudify_unit_test.cu ${CUDA_SOURCES})
add_library(ofpmmemory STATIC memory/HeapMemory.cpp util/cudify/cudify_vars.cpp memory/PtrMemory.cpp ${CUDA_SOURCES})
add_library(ofpmmemory_dl SHARED memory/HeapMemory.cpp util/cudify/cudify_vars.cpp memory/PtrMemory.cpp ${CUDA_SOURCES})
......@@ -74,13 +74,28 @@ install(FILES memory/ExtPreAlloc.hpp
util/util_unit_tests.hpp
DESTINATION openfpm_devices/include/memory)
install(FILES memory/ExtPreAlloc.hpp
memory/BHeapMemory.hpp
memory/HeapMemory.hpp
memory/memory.hpp
memory/PtrMemory.hpp
memory/CudaMemory.cuh
util/util_unit_tests.hpp
DESTINATION openfpm_devices/include/memory)
install(FILES util/print_stack.hpp
util/cuda_launch.hpp
util/se_util.hpp
util/cuda_util.hpp
util/cuda_kernel_error_checker.hpp
DESTINATION openfpm_devices/include/util)
install(FILES util/se_util.hpp
util/cuda_util.hpp
DESTINATION openfpm_devices/include/util)
install(FILES util/cudify/cudify_alpaka.hpp
util/cudify/cudify_hardware_alpaka.hpp
util/cudify/cudify_hardware_common.hpp
util/cudify/cudify_sequencial.hpp
util/cudify/cudify.hpp
DESTINATION openfpm_devices/include/util/cudify)
install(FILES ptr_info.hpp
DESTINATION openfpm_devices/include)
......
#ifndef CUDIFY_HARDWARE_COMMON_HPP_
#define CUDIFY_HARDWARE_COMMON_HPP_
#include <initializer_list>
#ifdef CUDA_ON_CPU
struct uint3
{
unsigned int x, y, z;
......@@ -31,4 +34,6 @@ struct dim3
}
};
#endif
#endif
\ No newline at end of file
......@@ -3,6 +3,10 @@
#include "config.h"
#ifdef CUDA_ON_CPU
#include "cudify_hardware_common.hpp"
#ifdef HAVE_BOOST_CONTEXT
#define CUDIFY_ACTIVE
......@@ -10,7 +14,6 @@
#include "util/cuda_util.hpp"
#include "boost/bind.hpp"
#include <type_traits>
#include "cudify_hardware_common.hpp"
#ifdef HAVE_BOOST_CONTEXT
#include <boost/context/continuation.hpp>
#endif
......@@ -547,4 +550,6 @@ static void exe_kernel_no_sync(lambda_f f, ite_type & ite)
#endif
#endif
#endif
\ No newline at end of file
......@@ -4,6 +4,7 @@
#include <boost/context/continuation.hpp>
#endif
#include <vector>
#include "cudify_hardware_common.hpp"
#ifdef HAVE_ALPAKA
#include "cudify_hardware_alpaka.hpp"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment