MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DoubleTensor

Function DoubleTensor

tensorflow/c/c_test_util.cc:89–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89TF_Tensor* DoubleTensor(double v) {
90 const int num_bytes = sizeof(double);
91 double* values = new double[1];
92 values[0] = v;
93 return TF_NewTensor(TF_DOUBLE, nullptr, 0, values, num_bytes,
94 &DoubleDeallocator, nullptr);
95}
96
97TF_Tensor* FloatTensor(float v) {
98 const int num_bytes = sizeof(float);

Callers 1

ScalarConstFunction · 0.85

Calls 1

TF_NewTensorFunction · 0.85

Tested by

no test coverage detected