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

Function DoubleTestMatrixTensorHandle3X2

tensorflow/c/eager/c_api_test_util.cc:106–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106TFE_TensorHandle* DoubleTestMatrixTensorHandle3X2() {
107 int64_t dims[] = {3, 2};
108 double data[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0};
109 TF_Tensor* t = TF_AllocateTensor(
110 TF_FLOAT, &dims[0], sizeof(dims) / sizeof(int64_t), sizeof(data));
111 memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t));
112 TF_Status* status = TF_NewStatus();
113 TFE_TensorHandle* th = TFE_NewTensorHandle(t, status);
114 CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
115 TF_DeleteTensor(t);
116 TF_DeleteStatus(status);
117 return th;
118}
119
120TFE_TensorHandle* TestMatrixTensorHandle3X2() {
121 int64_t dims[] = {3, 2};

Callers 1

Calls 9

TF_AllocateTensorFunction · 0.85
TF_TensorDataFunction · 0.85
TF_TensorByteSizeFunction · 0.85
TF_NewStatusFunction · 0.85
TFE_NewTensorHandleFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
TF_DeleteTensorFunction · 0.85
TF_DeleteStatusFunction · 0.85

Tested by

no test coverage detected