Refactor Backend and Layer interfaces

This commit is contained in:
2025-11-18 18:27:57 +01:00
parent 25670f90c4
commit 6340b27055
23 changed files with 154 additions and 201 deletions

View File

@@ -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));
}