mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-22 07:31:26 +08:00
Workaround for CUDA 12.6 tuple_size issue #3773.
This commit is contained in:
@@ -159,25 +159,15 @@ void cv::cuda::cartToPolar(InputArray _xy, OutputArray _mag, OutputArray _angle,
|
|||||||
GpuMat_<float> magc(mag);
|
GpuMat_<float> magc(mag);
|
||||||
GpuMat_<float> anglec(angle);
|
GpuMat_<float> anglec(angle);
|
||||||
|
|
||||||
|
gridTransformUnary(globPtr<float2>(xy), globPtr<float>(magc), magnitude_interleaved_func<float2>(), stream);
|
||||||
|
|
||||||
if (angleInDegrees)
|
if (angleInDegrees)
|
||||||
{
|
{
|
||||||
auto f1 = magnitude_interleaved_func<float2>();
|
gridTransformUnary(globPtr<float2>(xy), globPtr<float>(anglec), direction_interleaved_func<float2, true>(), stream);
|
||||||
auto f2 = direction_interleaved_func<float2, true>();
|
|
||||||
cv::cudev::tuple<decltype(f1), decltype(f2)> f12 = cv::cudev::make_tuple(f1, f2);
|
|
||||||
gridTransformTuple(globPtr<float2>(xy),
|
|
||||||
tie(magc, anglec),
|
|
||||||
f12,
|
|
||||||
stream);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto f1 = magnitude_interleaved_func<float2>();
|
gridTransformUnary(globPtr<float2>(xy), globPtr<float>(anglec), direction_interleaved_func<float2, false>(), stream);
|
||||||
auto f2 = direction_interleaved_func<float2, false>();
|
|
||||||
cv::cudev::tuple<decltype(f1), decltype(f2)> f12 = cv::cudev::make_tuple(f1, f2);
|
|
||||||
gridTransformTuple(globPtr<float2>(xy),
|
|
||||||
tie(magc, anglec),
|
|
||||||
f12,
|
|
||||||
stream);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
syncOutput(mag, _mag, stream);
|
syncOutput(mag, _mag, stream);
|
||||||
|
Reference in New Issue
Block a user