Hello,
I wrote the following simple code and ran it on TX2:
#define N_ELEMENTS 1000
err=cudaDriverGetVersion (&version); //version=9000
err=cudaSetDevice (0); //err=0
Npp8u *pDevice = nppsMalloc_8u (N_ELEMENTS);
Npp8u *pHost = (Npp8u *)malloc (N_ELEMENTS);
stat = nppsSet_8u (5, pDevice, N_ELEMENTS); //stat=NPP_SUCCESS
stat = nppsAddC_8u_ISfs (1, pDevice, N_ELEMENTS, 1); //stat=NPP_SUCCESS
cudaMemcpy (pHost, pDevice, N_ELEMENTS, cudaMemcpyDeviceToHost);
I expected the cells in pHost to contain: {6,6,6,6,…}
But pHost contains: {5,5,5,5,…}
Can you please explain why ?
Thank you,
Zvika