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

Method OpenCL_TensorMath

test/singa/test_opencl.cc:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36class OpenCL_TensorMath : public ::testing::Test {
37 protected:
38 OpenCL_TensorMath() {
39 auto ocl_dev = std::make_shared<OpenclDevice>();
40
41 a = Tensor(Shape{6}, ocl_dev);
42 b = Tensor(Shape{6}, ocl_dev);
43 c = Tensor(Shape{6, 1}, ocl_dev);
44 d = Tensor(Shape{3, 2}, ocl_dev);
45 e = Tensor(Shape{3, 2}, ocl_dev);
46 empty10k = Tensor(Shape{10000}, ocl_dev);
47
48 a.CopyDataFromHostPtr<float>(dat1, 6);
49 b.CopyDataFromHostPtr<float>(dat2, 6);
50 e.CopyDataFromHostPtr<float>(dat1, 6);
51 }
52
53 Tensor a, b, c, d, e;
54 Tensor empty10k;

Callers

nothing calls this directly

Calls 1

TensorClass · 0.50

Tested by

no test coverage detected