
58 Designing Scientific Applications on GPUs
GPU card→
Image size↓ C2070 GTX280
512 × 512 0.148 0.161
1024 × 1024 0.435 0.536
2048 × 2048 1.530 3.039
4096 × 4096 5.882 12.431
TABLE 5.3. Time cost of data transfers between CPU and GPU memories,
on C2070 and GTX280 cards (in milliseconds).
5.3.2 Using parameterizable masks
To further improve the above implementation, it becomes necessary to free
ourselves from the hard-coding constraint. To achieve this, as was the case
with input image storing, several memory options are available, but, since the
amount of data involved in processing a mask is quite small and constant, we
considered it relevant to copy data ...