Skip to content

Commit

Permalink
grid: Allow using Cuda without __GRID_CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Nov 16, 2020
1 parent e71fdbc commit 094422a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/grid/gpu/grid_gpu_collocate.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
/* */
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*----------------------------------------------------------------------------*/

#ifdef __GRID_CUDA

#include <algorithm>
#include <assert.h>
#include <cuda.h>
Expand Down Expand Up @@ -782,4 +785,5 @@ void grid_gpu_collocate_one_grid_level(
}
}

#endif // __GRID_CUDA
// EOF
4 changes: 3 additions & 1 deletion src/grid/gpu/grid_gpu_collocate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef GRID_GPU_COLLOCATE_H
#define GRID_GPU_COLLOCATE_H

#ifdef __GRID_CUDA

#include "grid_gpu_task_list.h"
#include <cuda_runtime.h>

Expand All @@ -29,6 +31,6 @@ void grid_gpu_collocate_one_grid_level(
}
#endif

#endif // __GRID_CUDA
#endif

// EOF
3 changes: 3 additions & 0 deletions src/grid/gpu/grid_gpu_task_list.cu
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*----------------------------------------------------------------------------*/

#ifdef __GRID_CUDA

#include <cuda_runtime.h>

#include <assert.h>
Expand Down Expand Up @@ -305,4 +307,5 @@ void grid_gpu_collocate_task_list(const grid_gpu_task_list *task_list,
CHECK(cudaDeviceSynchronize());
}

#endif // __GRID_CUDA
// EOF

0 comments on commit 094422a

Please sign in to comment.