Commit 40682d36 authored by incardon's avatar incardon
Browse files

Fixing compilation without Fiber and context

parent 5d43d83f
Pipeline #2515 failed with stages
in 11 seconds
......@@ -32,6 +32,12 @@ if (BOOST_FOUND)
set(DEFINE_HAVE_BOOST_IOSTREAMS "#define HAVE_BOOST_IOSTREAMS")
set(DEFINE_HAVE_BOOST_PROGRAM_OPTIONS "#define HAVE_BOOST_PROGRAM_OPTIONS")
set(DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK "#define HAVE_BOOST_UNIT_TEST_FRAMEWORK")
if (Boost_CONTEXT_FOUND)
set(DEFINE_HAVE_BOOST_CONTEXT "#define HAVE_BOOST_CONTEXT")
endif()
if (Boost_FIBER_FOUND)
set(DEFINE_HAVE_BOOST_FIBER "#define HAVE_BOOST_FIBER")
endif()
endif()
if (ALPAKA_ROOT)
......
......@@ -32,6 +32,12 @@ ${DEFINE_HAVE_BOOST_PROGRAM_OPTIONS} /**/
/* define if the Boost::Unit_Test_Framework library is available */
${DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK} /**/
/* define if the Boost::Context library is available */
${DEFINE_HAVE_BOOST_CONTEXT} /**/
/* define if the Boost::Fiber library is available */
${DEFINE_HAVE_BOOST_FIBER} /**/
/* Have clock time */
${DEFINE_HAVE_CLOCK_GETTIME} /**/
......
......@@ -2,6 +2,7 @@
#define CUDIFY_HPP_
#ifdef CUDIFY_USE_ALPAKA
#include "cudify_alpaka.hpp"
#else
#include "cudify_sequencial.hpp"
#endif
......
#ifndef CUDIFY_SEQUENCIAL_HPP_
#define CUDIFY_SEQUENCIAL_HPP_
#ifdef BOOST_HAVE_CONTEXT
#define CUDIFY_ACTiVE
#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
#include <vector>
#include <string.h>
#ifndef CUDIFY_BOOST_CONTEXT_STACK_SIZE
#define CUDIFY_BOOST_CONTEXT_STACK_SIZE 8192
#endif
......@@ -536,4 +543,6 @@ static void exe_kernel_no_sync(lambda_f f, ite_type & ite)
#endif
#endif
#endif
\ No newline at end of file
......@@ -6,7 +6,7 @@
#include "util/cuda_launch.hpp"
#include "memory/CudaMemory.cuh"
#ifdef CUDA_ON_CPU
#if defined(CUDA_ON_CPU) && defined(CUDIFY_ACTIVE)
BOOST_AUTO_TEST_SUITE( cudify_tests )
......
#include "config.h"
#include "cudify_hardware_common.hpp"
#ifdef HAVE_BOOST_CONTEXT
#include <boost/context/continuation.hpp>
#endif
#include <vector>
#ifdef HAVE_ALPAKA
......@@ -18,9 +20,10 @@ dim3 gridDim;
int vct_atomic_add;
int vct_atomic_rem;
#ifdef HAVE_BOOST_CONTEXT
std::vector<void *> mem_stack;
std::vector<boost::context::detail::fcontext_t> contexts;
int cur_fib;
void * par_glob;
boost::context::detail::fcontext_t main_ctx;
\ No newline at end of file
boost::context::detail::fcontext_t main_ctx;
#endif
\ No newline at end of file
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