mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-12-22 14:24:22 +00:00
WIP Migrate vector utils to Tesnor
This commit is contained in:
@@ -26,19 +26,20 @@ public:
|
||||
void* allocate();
|
||||
void deallocate();
|
||||
|
||||
void toDevice(const void* hostPtr);
|
||||
void toHost(void* hostPtr);
|
||||
|
||||
size_t size() const;
|
||||
size_t numel() const;
|
||||
void* data() const;
|
||||
|
||||
template <typename T>
|
||||
const T* data() const;
|
||||
|
||||
template <typename T>
|
||||
T* data();
|
||||
|
||||
private:
|
||||
Shape shape;
|
||||
DType dtype;
|
||||
IBackend* backend;
|
||||
void* devicePtr;
|
||||
void* hostPtr;
|
||||
void* d_ptr;
|
||||
};
|
||||
|
||||
} // namespace CUDANet::Backend
|
||||
Reference in New Issue
Block a user