CellularAutomata
Loading...
Searching...
No Matches
cuda.cuh
Go to the documentation of this file.
1
3#pragma once
4
5#include "../core/common.hpp"
6
7namespace CellularAutomata
8{
9 namespace cuda
10 {
18 void allocateCUDA(void** arrayPtr, size_t bytes);
19
28 void allocateHost(void** arrayPtr, size_t bytes);
29
36 void freeCUDA(void* array);
37
46 void freeHost(void* array);
47
60 void copyCUDA(void* src, Device from, void* dst, Device to, size_t bytes);
61
77 template <typename T, typename Activation>
78 void epoch(
79 T* input, T* kernel, T* output, Activation fn,
80 const unsigned int h, const unsigned int w, const unsigned int s, const bool r);
81 }
82}
83
84#include "cuda.inl"
void copyCUDA(void *src, Device from, void *dst, Device to, size_t bytes)
Memcopy between devices and host.
Definition cuda.inl:165
void allocateHost(void **arrayPtr, size_t bytes)
Allocated memory on the host device (CPU)
Definition cuda.inl:150
void allocateCUDA(void **arrayPtr, size_t bytes)
Allocated memory on a CUDA device.
Definition cuda.inl:145
void freeCUDA(void *array)
Frees memory on a CUDA device.
Definition cuda.inl:155
void freeHost(void *array)
Frees memory on the host device (CPU)
Definition cuda.inl:160
Main namespace.
Definition common.hpp:33
Device
Computational device.
Definition common.hpp:39