Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_devices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_devices
Commits
b07228a1
Commit
b07228a1
authored
6 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Small changes
parent
5dec602a
No related branches found
No related tags found
No related merge requests found
Pipeline
#990
failed
6 years ago
Stage: build
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/CMakeLists.txt
+1
-0
1 addition, 0 deletions
src/CMakeLists.txt
src/memory/CudaMemory.cu
+0
-1
0 additions, 1 deletion
src/memory/CudaMemory.cu
src/memory/CudaMemory.cuh
+8
-0
8 additions, 0 deletions
src/memory/CudaMemory.cuh
src/util/cuda_util.hpp
+50
-0
50 additions, 0 deletions
src/util/cuda_util.hpp
with
59 additions
and
1 deletion
src/CMakeLists.txt
+
1
−
0
View file @
b07228a1
...
...
@@ -16,6 +16,7 @@ if (CUDA_FOUND)
target_compile_options
(
mem PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe
"--display_error_number --diag_suppress=2885 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111"
--expt-extended-lambda>
)
endif
()
target_include_directories
(
mem PUBLIC
${
CUDA_INCLUDE_DIRS
}
)
target_include_directories
(
mem PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
)
target_include_directories
(
mem PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
/config
)
target_include_directories
(
mem PUBLIC
${
Boost_INCLUDE_DIRS
}
)
...
...
This diff is collapsed.
Click to expand it.
src/memory/CudaMemory.cu
+
0
−
1
View file @
b07228a1
#include
"config.h"
#include
<cstddef>
#include
<cuda_runtime.h>
#include
"CudaMemory.cuh"
#include
"cuda_macro.h"
#include
<cstring>
...
...
This diff is collapsed.
Click to expand it.
src/memory/CudaMemory.cuh
+
8
−
0
View file @
b07228a1
...
...
@@ -40,6 +40,13 @@
#include
"Memleak_check.hpp"
#endif
#ifdef CUDA_GPU
#include
<cuda_runtime.h>
//! Is an array to report general error can happen in CUDA
static
__device__
unsigned
char
global_cuda_error_array
[
256
];
class
CudaMemory
:
public
memory
{
//! Is the host memory synchronized with the GPU memory
...
...
@@ -210,4 +217,5 @@ public:
};
#endif
#endif
This diff is collapsed.
Click to expand it.
src/util/cuda_util.hpp
0 → 100644
+
50
−
0
View file @
b07228a1
/*
* cuda_util.hpp
*
* Created on: Jun 13, 2018
* Author: i-bird
*/
#ifndef OPENFPM_DATA_SRC_UTIL_CUDA_UTIL_HPP_
#define OPENFPM_DATA_SRC_UTIL_CUDA_UTIL_HPP_
#include
"config.h"
#ifdef CUDA_GPU
#include
<cuda_runtime.h>
#endif
#ifdef CUDA_GPU
#ifndef __NVCC__
#else
#ifndef __host__
#define __host__
#define __device__
#endif
#define CUDA_SAFE(cuda_call) \
cuda_call; \
{\
cudaError_t e = cudaPeekAtLastError();\
if (e != cudaSuccess)\
{\
std::string error = cudaGetErrorString(e);\
std::cout << "Cuda Error in: " << __FILE__ << ":" << __LINE__ << " " << error << std::endl;\
}\
}
#endif
#else
#ifndef __host__
#define __host__
#define __device__
#endif
#endif
#endif
/* OPENFPM_DATA_SRC_UTIL_CUDA_UTIL_HPP_ */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment