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

Function tensorAccess

python/mod_cvcuda/operators/OpSIFT.cpp:130–143  ·  view source on GitHub ↗

Auxiliary function to get tensor access for input tensor in

Source from the content-addressed store, hash-verified

128
129// Auxiliary function to get tensor access for input tensor in
130auto tensorAccess(Tensor &in)
131{
132 auto inData = in.exportData<nvcv::TensorDataStridedCuda>();
133 if (!inData)
134 {
135 throw nvcv::Exception(nvcv::Status::ERROR_INVALID_ARGUMENT, "Input must be a valid CUDA strided tensor");
136 }
137 auto inAccess = nvcv::TensorDataAccessStridedImagePlanar::Create(*inData);
138 if (!inAccess)
139 {
140 throw nvcv::Exception(nvcv::Status::ERROR_INVALID_ARGUMENT, "Input must be a valid image-based tensor");
141 }
142 return inAccess;
143}
144
145TupleTensor4 SIFTInto(Tensor &featCoords, Tensor &featMetadata, Tensor &featDescriptors, Tensor &numFeatures,
146 Tensor &in, int numOctaveLayers, float contrastThreshold, float edgeThreshold, float initSigma,

Callers 2

SIFTIntoFunction · 0.85
SIFTFunction · 0.85

Calls 1

ExceptionClass · 0.85

Tested by

no test coverage detected