mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-12-22 22:34:22 +00:00
WIP Implement Tensor constructor and destructor
This commit is contained in:
@@ -23,9 +23,6 @@ public:
|
||||
Tensor(Shape shape, DType dtype, IBackend* backend);
|
||||
~Tensor();
|
||||
|
||||
void* allocate();
|
||||
void deallocate();
|
||||
|
||||
size_t size() const;
|
||||
size_t numel() const;
|
||||
|
||||
@@ -38,6 +35,10 @@ public:
|
||||
private:
|
||||
Shape shape;
|
||||
DType dtype;
|
||||
|
||||
size_t total_elms;
|
||||
size_t total_size;
|
||||
|
||||
IBackend* backend;
|
||||
void* d_ptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user