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

Function ThresholdVarShapeInto

python/mod_cvcuda/operators/OpThreshold.cpp:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60ImageBatchVarShape ThresholdVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, Tensor &thresh,
61 Tensor &maxval, uint32_t type, std::optional<Stream> pstream)
62{
63 if (!pstream)
64 {
65 pstream = Stream::Current();
66 }
67
68 auto threshold = CreateOperator<cvcuda::Threshold>(type, input.numImages());
69
70 ResourceGuard guard(*pstream);
71 guard.add(LockMode::LOCK_MODE_READ, {input, thresh, maxval});
72 guard.add(LockMode::LOCK_MODE_WRITE, {output});
73 guard.add(LockMode::LOCK_MODE_READWRITE, {*threshold});
74
75 threshold->submit(pstream->cudaHandle(), input, output, thresh, maxval);
76
77 return output;
78}
79
80ImageBatchVarShape ThresholdVarShape(ImageBatchVarShape &input, Tensor &thresh, Tensor &maxval, uint32_t type,
81 std::optional<Stream> pstream)

Callers 1

ThresholdVarShapeFunction · 0.85

Calls 4

cudaHandleMethod · 0.80
numImagesMethod · 0.45
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected