MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / CreateNVCVTensorShape

Function CreateNVCVTensorShape

python/mod_cvcuda/include/nvcv/python/Shape.hpp:47–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47inline nvcv::TensorShape CreateNVCVTensorShape(const Shape &shape, nvcv::TensorLayout layout = nvcv::TENSOR_NONE)
48{
49 std::vector<int64_t> dims;
50 dims.reserve(shape.size());
51 for (size_t i = 0; i < shape.size(); ++i)
52 {
53 dims.push_back(shape[i].cast<int64_t>());
54 }
55
56 return nvcv::TensorShape(dims.data(), dims.size(), layout);
57}
58
59inline int64_t LengthIf1D(const Shape &shape)
60{

Callers 3

CreateMethod · 0.85
ReshapeTensorMethod · 0.85
CreateMethod · 0.85

Calls 5

reserveMethod · 0.80
TensorShapeFunction · 0.50
sizeMethod · 0.45
push_backMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected