diff --git a/src/Image.cpp b/src/Image.cpp index 22575583..782fbf03 100644 --- a/src/Image.cpp +++ b/src/Image.cpp @@ -66,7 +66,8 @@ Image::~Image() void Image::reserve() { - KP_LOG_DEBUG("Reserving {} bytes for memory", this->mSize * this->mDataTypeMemorySize); + KP_LOG_DEBUG("Reserving {} bytes for memory", + this->mSize * this->mDataTypeMemorySize); if (this->mPrimaryImage || this->mPrimaryMemory) { KP_LOG_DEBUG( diff --git a/src/Memory.cpp b/src/Memory.cpp index b458c3ad..fce9d73b 100644 --- a/src/Memory.cpp +++ b/src/Memory.cpp @@ -200,7 +200,8 @@ Memory::unmapRawData() void Memory::updateRawData(void* data) { - if (this->memoryType() != Memory::MemoryTypes::eStorage && data != nullptr) { + if (this->memoryType() != Memory::MemoryTypes::eStorage && + data != nullptr) { this->mapRawData(); memcpy(this->mRawData, data, this->memorySize()); } diff --git a/src/Tensor.cpp b/src/Tensor.cpp index 6794794e..57463dc6 100644 --- a/src/Tensor.cpp +++ b/src/Tensor.cpp @@ -66,7 +66,8 @@ Tensor::~Tensor() void Tensor::reserve() { - KP_LOG_DEBUG("Reserving {} bytes for memory", this->mSize * this->mDataTypeMemorySize); + KP_LOG_DEBUG("Reserving {} bytes for memory", + this->mSize * this->mDataTypeMemorySize); if (this->mPrimaryBuffer || this->mPrimaryMemory) { KP_LOG_DEBUG( diff --git a/src/include/kompute/Manager.hpp b/src/include/kompute/Manager.hpp index 3d7a9f17..e101acdc 100644 --- a/src/include/kompute/Manager.hpp +++ b/src/include/kompute/Manager.hpp @@ -149,7 +149,7 @@ class Manager return tensor; } - std::shared_ptr tensor( + std::shared_ptr tensor( uint32_t elementTotalCount, uint32_t elementMemorySize, const Memory::DataTypes& dataType, @@ -321,7 +321,7 @@ class Manager { return this->imageT(width, height, numChannels, imageType); } - + std::shared_ptr image( void* data, size_t dataSize, @@ -422,7 +422,6 @@ class Manager return image; } - /** * Default non-template function that can be used to create algorithm * objects which provides default types to the push and spec constants as diff --git a/test/TestTensor.cpp b/test/TestTensor.cpp index b5989e2d..ac8aad39 100644 --- a/test/TestTensor.cpp +++ b/test/TestTensor.cpp @@ -18,8 +18,8 @@ TEST(TestTensor, ConstructorData) TEST(TestTensor, ConstructorNoData) { kp::Manager mgr; - std::shared_ptr tensor = mgr.tensor( - nullptr, 3, sizeof(float), kp::Memory::DataTypes::eFloat); + std::shared_ptr tensor = + mgr.tensor(nullptr, 3, sizeof(float), kp::Memory::DataTypes::eFloat); EXPECT_EQ(tensor->size(), 3); EXPECT_EQ(tensor->dataTypeMemorySize(), sizeof(float)); @@ -36,7 +36,8 @@ TEST(TestTensor, ConstructorNoData) TEST(TestTensor, ReserveData) { kp::Manager mgr; - std::shared_ptr tensor = mgr.tensor(3, sizeof(uint32_t), kp::Memory::DataTypes::eUnsignedInt); + std::shared_ptr tensor = + mgr.tensor(3, sizeof(uint32_t), kp::Memory::DataTypes::eUnsignedInt); EXPECT_EQ(tensor->size(), 0); EXPECT_EQ(tensor->dataTypeMemorySize(), sizeof(uint32_t)); }