Host-to-Device Transfers
Uploading input data to the GPU.
Two Memories, One Goal
Your data starts in host RAM, but the GPU can only crunch numbers that live in its own device memory. First you must move it across. 🚚
Meet cudaMemcpy
The cudaMemcpy function is your delivery truck: it copies a block of bytes from one address to another, host or device.
cudaMemcpy(dst, src, bytes, kind);All lessons in this course
- Host-to-Device Transfers
- Device-to-Host Transfers
- The Copy Direction Enum
- The PCIe Transfer Bottleneck