Skip to content

Commit

Permalink
fix inconsistent define logic for raja + cuda, hip
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Oct 30, 2023
1 parent dfd6a2e commit 83dd8dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,21 @@ exec_dispatch_mcarray_component(const conduit::Node &node,
SerialExec exec;
res = exec_dispatch_mcarray_component(node, component, func, exec);
}
#if defined(ASCENT_OPENMP_ENABLED) && defined(ASCENT_RAJA_ENABLED)
#if defined(ASCENT_OPENMP_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "openmp")
{
OpenMPExec exec;
res = exec_dispatch_mcarray_component(node, component, func, exec);
}
#endif
#if defined(ASCENT_CUDA_ENABLED)
#if defined(ASCENT_CUDA_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "cuda")
{
CudaExec exec;
res = exec_dispatch_mcarray_component(node, component, func, exec);
}
#endif
#if defined(ASCENT_HIP_ENABLED)
#if defined(ASCENT_HIP_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "hip")
{
HipExec exec;
Expand Down Expand Up @@ -468,14 +468,14 @@ exec_dispatch_mesh(const conduit::Node &n_coords,
exec_dispatch_mesh(n_coords,n_topo, func, exec);
}
#endif
#if defined(ASCENT_CUDA_ENABLED)
#if defined(ASCENT_CUDA_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "cuda")
{
CudaExec exec;
exec_dispatch_mesh(n_coords,n_topo, func, exec);
}
#endif
#if defined(ASCENT_HIP_ENABLED)
#if defined(ASCENT_HIP_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "hip")
{
HipExec exec;
Expand Down Expand Up @@ -511,14 +511,14 @@ exec_dispatch_array(Array<T> &array, Function &func)
func(array, exec);
}
#endif
#if defined(ASCENT_CUDA_ENABLED)
#if defined(ASCENT_CUDA_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "cuda")
{
CudaExec exec;
func(array, exec);
}
#endif
#if defined(ASCENT_HIP_ENABLED)
#if defined(ASCENT_HIP_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "hip")
{
HipExec exec;
Expand Down Expand Up @@ -553,14 +553,14 @@ exec_dispatch_function(Function &func)
func(exec);
}
#endif
#if defined(ASCENT_CUDA_ENABLED)
#if defined(ASCENT_CUDA_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "cuda")
{
CudaExec exec;
func(exec);
}
#endif
#if defined(ASCENT_HIP_ENABLED)
#if defined(ASCENT_HIP_ENABLED) && defined(ASCENT_RAJA_ENABLED)
else if(exec_policy == "hip")
{
HipExec exec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
namespace ascent
{

#if defined(ASCENT_CUDA_ENABLED)
#if defined(ASCENT_CUDA_ENABLED) && defined(ASCENT_RAJA_ENABLED)
std::string CudaExec::memory_space = "device";
#endif

#if defined(ASCENT_HIP_ENABLED)
#if defined(ASCENT_HIP_ENABLED) && defined(ASCENT_RAJA_ENABLED)
std::string HipExec::memory_space = "device";
#endif

Expand Down

0 comments on commit 83dd8dc

Please sign in to comment.