MCPcopy Create free account
hub / github.com/KomputeProject/kompute / Tensor

Method Tensor

src/Tensor.cpp:41–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41Tensor::Tensor(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
42 std::shared_ptr<vk::Device> device,
43 void* data,
44 uint32_t elementTotalCount,
45 uint32_t elementMemorySize,
46 const TensorDataTypes& dataType,
47 const TensorTypes& tensorType)
48{
49 KP_LOG_DEBUG("Kompute Tensor constructor data length: {}, and type: {}",
50 elementTotalCount,
51 Tensor::toString(tensorType));
52
53 this->mPhysicalDevice = physicalDevice;
54 this->mDevice = device;
55 this->mDataType = dataType;
56 this->mTensorType = tensorType;
57
58 this->rebuild(data, elementTotalCount, elementMemorySize);
59}
60
61Tensor::~Tensor()
62{

Callers

nothing calls this directly

Calls 1

rebuildMethod · 0.95

Tested by

no test coverage detected