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

Function RotateInto

python/mod_cvcuda/operators/OpRotate.cpp:34–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33namespace {
34Tensor RotateInto(Tensor &output, Tensor &input, double angleDeg, const std::tuple<double, double> &shift,
35 NVCVInterpolationType interpolation, std::optional<Stream> pstream)
36{
37 if (!pstream)
38 {
39 pstream = Stream::Current();
40 }
41
42 auto rotate = CreateOperator<cvcuda::Rotate>(0);
43
44 ResourceGuard guard(*pstream);
45 guard.add(LockMode::LOCK_MODE_READ, {input});
46 guard.add(LockMode::LOCK_MODE_WRITE, {output});
47 guard.add(LockMode::LOCK_MODE_READWRITE, {*rotate});
48
49 double2 shiftArg{std::get<0>(shift), std::get<1>(shift)};
50
51 rotate->submit(pstream->cudaHandle(), input, output, angleDeg, shiftArg, interpolation);
52
53 return output;
54}
55
56Tensor Rotate(Tensor &input, double angleDeg, const std::tuple<double, double> &shift,
57 const NVCVInterpolationType interpolation, std::optional<Stream> pstream)

Callers 1

RotateFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected