mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-25 01:28:50 -05:00
CUDA: Update all tests to support NPPIF CUDA 13 deprecations
This commit is contained in:
committed by
Brad King
parent
503ab73ee4
commit
f25982c422
@@ -69,9 +69,18 @@ EXPORT int nppif_main()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// copy src to dst
|
// copy src to dst
|
||||||
NppStatus ret =
|
NppStatus ret;
|
||||||
nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI, d_pKernel,
|
#if CUDART_VERSION >= 13000
|
||||||
nMaskSize, nAnchor, nDivisor);
|
NppStreamContext context;
|
||||||
|
context.hStream = 0; // execute on the default stream
|
||||||
|
ret =
|
||||||
|
nppiFilterRow_8u_C1R_Ctx(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor, context);
|
||||||
|
|
||||||
|
#else
|
||||||
|
ret = nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor);
|
||||||
|
#endif
|
||||||
assert(ret == NPP_NO_ERROR);
|
assert(ret == NPP_NO_ERROR);
|
||||||
Npp8u* h_imgres = new Npp8u[dimgpix];
|
Npp8u* h_imgres = new Npp8u[dimgpix];
|
||||||
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
||||||
|
|||||||
@@ -69,9 +69,18 @@ EXPORT int nppif_main()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// copy src to dst
|
// copy src to dst
|
||||||
NppStatus ret =
|
NppStatus ret;
|
||||||
nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI, d_pKernel,
|
#if CUDART_VERSION >= 13000
|
||||||
nMaskSize, nAnchor, nDivisor);
|
NppStreamContext context;
|
||||||
|
context.hStream = 0; // execute on the default stream
|
||||||
|
ret =
|
||||||
|
nppiFilterRow_8u_C1R_Ctx(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor, context);
|
||||||
|
|
||||||
|
#else
|
||||||
|
ret = nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor);
|
||||||
|
#endif
|
||||||
assert(ret == NPP_NO_ERROR);
|
assert(ret == NPP_NO_ERROR);
|
||||||
Npp8u* h_imgres = new Npp8u[dimgpix];
|
Npp8u* h_imgres = new Npp8u[dimgpix];
|
||||||
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
||||||
|
|||||||
@@ -69,9 +69,18 @@ EXPORT int nppif_main()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// copy src to dst
|
// copy src to dst
|
||||||
NppStatus ret =
|
NppStatus ret;
|
||||||
nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI, d_pKernel,
|
#if CUDART_VERSION >= 13000
|
||||||
nMaskSize, nAnchor, nDivisor);
|
NppStreamContext context;
|
||||||
|
context.hStream = 0; // execute on the default stream
|
||||||
|
ret =
|
||||||
|
nppiFilterRow_8u_C1R_Ctx(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor, context);
|
||||||
|
|
||||||
|
#else
|
||||||
|
ret = nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor);
|
||||||
|
#endif
|
||||||
assert(ret == NPP_NO_ERROR);
|
assert(ret == NPP_NO_ERROR);
|
||||||
Npp8u* h_imgres = new Npp8u[dimgpix];
|
Npp8u* h_imgres = new Npp8u[dimgpix];
|
||||||
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
||||||
|
|||||||
@@ -69,9 +69,18 @@ EXPORT int nppif_main()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// copy src to dst
|
// copy src to dst
|
||||||
NppStatus ret =
|
NppStatus ret;
|
||||||
nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI, d_pKernel,
|
#if CUDART_VERSION >= 13000
|
||||||
nMaskSize, nAnchor, nDivisor);
|
NppStreamContext context;
|
||||||
|
context.hStream = 0; // execute on the default stream
|
||||||
|
ret =
|
||||||
|
nppiFilterRow_8u_C1R_Ctx(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor, context);
|
||||||
|
|
||||||
|
#else
|
||||||
|
ret = nppiFilterRow_8u_C1R(d_pSrc, nSrcStep, d_pDst, nDstStep, oROI,
|
||||||
|
d_pKernel, nMaskSize, nAnchor, nDivisor);
|
||||||
|
#endif
|
||||||
assert(ret == NPP_NO_ERROR);
|
assert(ret == NPP_NO_ERROR);
|
||||||
Npp8u* h_imgres = new Npp8u[dimgpix];
|
Npp8u* h_imgres = new Npp8u[dimgpix];
|
||||||
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
err = cudaMemcpy(h_imgres, d_pDst, dimgsize, cudaMemcpyDeviceToHost);
|
||||||
|
|||||||
Reference in New Issue
Block a user