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

Function EraseVarShape

python/mod_cvcuda/operators/OpErase.cpp:95–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95ImageBatchVarShape EraseVarShape(ImageBatchVarShape &input, Tensor &anchor, Tensor &erasing, Tensor &values,
96 Tensor &imgIdx, bool random, unsigned int seed, std::optional<Stream> pstream)
97{
98 ImageBatchVarShape output = ImageBatchVarShape::Create(input.numImages());
99
100 auto format = input.uniqueFormat();
101 if (!format)
102 {
103 throw std::runtime_error("All images in input must have the same format.");
104 }
105
106 for (auto img = input.begin(); img != input.end(); ++img)
107 {
108 auto newimg = Image::Create(img->size(), format);
109 output.pushBack(newimg);
110 }
111
112 return EraseVarShapeInto(output, input, anchor, erasing, values, imgIdx, random, seed, pstream);
113}
114
115} // namespace
116

Callers

nothing calls this directly

Calls 7

EraseVarShapeIntoFunction · 0.85
numImagesMethod · 0.45
uniqueFormatMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
pushBackMethod · 0.45

Tested by

no test coverage detected