2022-09-05 10:39:42 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
|
|
|
|
* All rights reserved. This file is part of MD-Bench.
|
|
|
|
* Use of this source code is governed by a LGPL-3.0
|
|
|
|
* license that can be found in the LICENSE file.
|
|
|
|
*/
|
2022-11-08 18:33:23 +01:00
|
|
|
#include <stddef.h>
|
|
|
|
//---
|
2022-08-09 18:53:53 +02:00
|
|
|
#include <atom.h>
|
|
|
|
#include <neighbor.h>
|
|
|
|
|
2022-08-12 18:12:29 +02:00
|
|
|
#ifndef __DEVICE_H_
|
|
|
|
#define __DEVICE_H_
|
|
|
|
|
|
|
|
#ifdef CUDA_TARGET
|
|
|
|
#include <cuda_runtime.h>
|
2022-08-12 04:19:38 +02:00
|
|
|
extern void cuda_assert(const char *msg, cudaError_t err);
|
2022-08-12 18:12:29 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void initDevice(Atom*, Neighbor*);
|
2022-08-12 04:19:38 +02:00
|
|
|
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);
|
2022-08-09 18:53:53 +02:00
|
|
|
#endif
|