mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-12-24 23:34:24 +00:00
Refactor Backend and Layer interfaces
This commit is contained in:
@@ -28,12 +28,12 @@ cudaDeviceProp initializeCUDA() {
|
||||
|
||||
using namespace CUDANet::Backend;
|
||||
|
||||
void* CUDABackend::allocate(size_t bytes) {
|
||||
void* CUDA::allocate(size_t bytes) {
|
||||
void* d_ptr = nullptr;
|
||||
CUDA_CHECK(cudaMalloc(&d_ptr, bytes));
|
||||
return d_ptr;
|
||||
}
|
||||
|
||||
void CUDABackend::deallocate(void* ptr) {
|
||||
void CUDA::deallocate(void* ptr) {
|
||||
CUDA_CHECK(cudaFree(ptr));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user