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

Function Product

include/singa/core/tensor.h:314–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}; // end of tensor class
313
314inline size_t Product(const Shape &shape, int start = 0, size_t len = 0) {
315 if (len == 0) len = shape.size();
316 if (len == 0) return 0;
317 CHECK_LE(len, shape.size());
318 size_t v = 1;
319 for (unsigned int i = start; i < len; i++) v *= shape[i];
320 return v;
321}
322
323inline void CheckDataTypeAndLang(const Tensor &in1, const Tensor &in2) {
324 CHECK_EQ(in1.data_type(), in2.data_type());

Callers 15

TESTFunction · 0.85
TensorMethod · 0.85
tensor.ccFile · 0.85
FromProtoMethod · 0.85
to_protoMethod · 0.85
RepeatMethod · 0.85
RepeatDataToFromFunction · 0.85
traverse_unaryFunction · 0.85
traverse_binaryFunction · 0.85
generate_strides_cudaFunction · 0.85
Cuda>Method · 0.85

Calls 1

sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68