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

Function TEST

test/TestTensor.cpp:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "kompute/logger/Logger.hpp"
7
8TEST(TestTensor, ConstructorData)
9{
10 kp::Manager mgr;
11 std::vector<float> vec{ 0, 1, 2 };
12 std::shared_ptr<kp::TensorT<float>> tensor = mgr.tensor(vec);
13 EXPECT_EQ(tensor->size(), vec.size());
14 EXPECT_EQ(tensor->dataTypeMemorySize(), sizeof(float));
15 EXPECT_EQ(tensor->vector(), vec);
16}
17
18TEST(TestTensor, DataTypes)
19{

Callers

nothing calls this directly

Calls 6

tensorMethod · 0.80
sizeMethod · 0.80
dataTypeMemorySizeMethod · 0.80
dataTypeMethod · 0.80
tensorTMethod · 0.80
vectorMethod · 0.45

Tested by

no test coverage detected