Initial refactoring of CUDA code

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti
2022-08-12 04:19:38 +02:00
parent 959ff65126
commit 065b596074
9 changed files with 127 additions and 144 deletions

View File

@@ -6,5 +6,10 @@
#ifndef __CUDA_ATOM_H_
#define __CUDA_ATOM_H_
extern void initCuda(Atom*, Neighbor*, Atom*, Neighbor*);
extern void checkCUDAError(const char *msg, cudaError_t err);
extern void cuda_assert(const char *msg, cudaError_t err);
extern void *allocateGPU(size_t bytesize);
extern void *reallocateGPU(void *ptr, size_t new_bytesize);
extern void memcpyToGPU(void *d_ptr, void *h_ptr, size_t bytesize);
extern void memcpyFromGPU(void *h_ptr, void *d_ptr, size_t bytesize);
extern void memsetGPU(void *d_ptr, int value, size_t bytesize);
#endif