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

Function Int8Tensor

tensorflow/c/c_test_util.cc:53–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values) {
54 int64_t num_values = 1;
55 for (int i = 0; i < num_dims; ++i) {
56 num_values *= dims[i];
57 }
58 TF_Tensor* t =
59 TF_AllocateTensor(TF_INT8, dims, num_dims, sizeof(char) * num_values);
60 memcpy(TF_TensorData(t), values, sizeof(char) * num_values);
61 return t;
62}
63
64TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims,
65 const int32_t* values) {

Callers 2

TESTFunction · 0.85
TEST_FFunction · 0.85

Calls 2

TF_AllocateTensorFunction · 0.85
TF_TensorDataFunction · 0.85

Tested by

no test coverage detected