Q.

If variable a is host variable and dev_a is a device (GPU) variable, to copy input from variable a to variable dev_a select correct statement:

A. memcpy( dev_a, &a, size);
B. cudamemcpy( dev_a, &a, size, cudamemcpyhosttodevice );
C. memcpy( (void*) dev_a, &a, size);
D. cudamemcpy( (void*) &dev_a, &a, size, cudamemcpydevicetohost );
Answer» B. cudamemcpy( dev_a, &a, size, cudamemcpyhosttodevice );
1.9k
0
Do you find this helpful?
1

Discussion

No comments yet