Skip to content
Snippets Groups Projects
Commit c34d6607 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing CUDIFY

parent c5421090
No related branches found
No related tags found
No related merge requests found
Pipeline #4113 passed
openfpm_devices @ 281ac44b
Subproject commit f25b793eac62f4e543d3045e0445ef4cae1f5aee Subproject commit 281ac44b94959df24aa5168c7488e434806e4f99
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#ifndef GRID_DIST_ID_ITERATOR_DEC_GPU_CUH_ #ifndef GRID_DIST_ID_ITERATOR_DEC_GPU_CUH_
#define GRID_DIST_ID_ITERATOR_DEC_GPU_CUH_ #define GRID_DIST_ID_ITERATOR_DEC_GPU_CUH_
#include "config.h"
#include "Grid/Iterators/grid_dist_id_iterator.hpp" #include "Grid/Iterators/grid_dist_id_iterator.hpp"
#include "Grid/grid_dist_util.hpp" #include "Grid/grid_dist_util.hpp"
#include "Grid/Iterators/grid_dist_id_iterator_util.hpp" #include "Grid/Iterators/grid_dist_id_iterator_util.hpp"
...@@ -30,7 +30,11 @@ struct launch_call_impl<1> ...@@ -30,7 +30,11 @@ struct launch_call_impl<1>
template<typename loc_grid_type, typename ite_type, typename itd_type, typename functor_type,typename ... argsT> template<typename loc_grid_type, typename ite_type, typename itd_type, typename functor_type,typename ... argsT>
inline static void call(loc_grid_type & loc_grid, ite_type & ite, itd_type & itd, functor_type f, argsT ... args) inline static void call(loc_grid_type & loc_grid, ite_type & ite, itd_type & itd, functor_type f, argsT ... args)
{ {
#ifdef CUDIFY_USE_CUDA
CUDA_LAUNCH(grid_apply_functor_shared_bool,ite,loc_grid.toKernel(), itd, f, args... );
#else
auto g = loc_grid.toKernel(); auto g = loc_grid.toKernel();
auto lamb = [g,itd,f,args ...] __device__ () mutable auto lamb = [g,itd,f,args ...] __device__ () mutable
...@@ -41,6 +45,7 @@ struct launch_call_impl<1> ...@@ -41,6 +45,7 @@ struct launch_call_impl<1>
}; };
CUDA_LAUNCH_LAMBDA_TLS(ite,lamb); CUDA_LAUNCH_LAMBDA_TLS(ite,lamb);
#endif
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment