MCPcopy Create free account
hub / github.com/apache/singa / ~Tensor

Method ~Tensor

src/core/tensor/tensor.cc:36–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34template float TypeCast(const int &x);
35
36Tensor::~Tensor() {
37 if (block_ != nullptr && block_->DecRefCount() == 0) {
38 device_->FreeBlock(block_);
39 }
40 block_ = nullptr;
41}
42
43Tensor::Tensor() {
44 device_ = defaultDevice;

Callers

nothing calls this directly

Calls 2

DecRefCountMethod · 0.80
FreeBlockMethod · 0.80

Tested by

no test coverage detected