- allocate and populate CPU memory \textbf{h\_in}\;\\
- allocate CPU pinned-memory \textbf{h\_out}\;\\
- allocate GPU global memory \textbf{d\_out}\;\\
- declare GPU texture reference \textbf{tex\_img\_in}\;\\
- allocate GPU array in global memory \textbf{array\_img\_in}\;\\
- bind GPU array \textbf{array\_img\_in} to texture \textbf{tex\_img\_in}\;\\
- copy data from \textbf{h\_in} to \textbf{array\_img\_in}\label{algo:memcopy:H2D}\;\\
- kernel\kl gridDim,blockDim\kr()\tcc*[f]{outputs to d\_out}\label{algo:memcopy:kernel}\;\\
- copy data from \textbf{d\_out} to \textbf{h\_out} \label{algo:memcopy:D2H}\;\\
+ allocate and populate CPU memory \textbf{h\_in}\;
+ allocate CPU pinned-memory \textbf{h\_out}\;
+ allocate GPU global memory \textbf{d\_out}\;
+ declare GPU texture reference \textbf{tex\_img\_in}\;
+ allocate GPU array in global memory \textbf{array\_img\_in}\;
+ bind GPU array \textbf{array\_img\_in} to texture \textbf{tex\_img\_in}\;
+ copy data from \textbf{h\_in} to \textbf{array\_img\_in}\label{algo:memcopy:H2D}\;
+ kernel\kl gridDim,blockDim\kr()\tcc*[f]{outputs to d\_out}\label{algo:memcopy:kernel}\;
+ copy data from \textbf{d\_out} to \textbf{h\_out} \label{algo:memcopy:D2H}\;