MCPcopy Create free account
hub / github.com/apache/singa / SetUp

Method SetUp

test/singa/test_tensor_math.cc:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27class TensorMath : public ::testing::Test {
28 protected:
29 virtual void SetUp() {
30 a.Resize(singa::Shape{6});
31 b.Resize(singa::Shape{6});
32 c.Resize(singa::Shape{6, 1});
33 d.Resize(singa::Shape{3, 2});
34 e.Resize(singa::Shape{3, 2});
35
36 a.CopyDataFromHostPtr<float>(dat1, 6);
37 b.CopyDataFromHostPtr<float>(dat2, 6);
38 e.CopyDataFromHostPtr<float>(dat1, 6);
39 }
40 Tensor a, b, c, d, e;
41 const float dat1[6] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f};
42 const float dat2[6] = {1.1f, 2.1f, 3.1f, 4.1f, 5.1f, 6.1f};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected