This sample demonstrates the __device__ qualifier.
More...
#include "../include/mycuda.h"Go to the source code of this file.
Functions | |
| __device__ float | XplusY_dev (float x, float y) |
| Device function (called by kernel). More... | |
| __global__ void | XplusY () |
CUDA Kernel. Uses global device variables x_d, y_d, and z_d. More... | |
| int | main () |
Variables | |
| const int | n =8192 |
| Size of device vectors (needed for static allocations). More... | |
| __device__ float | x_d [n] |
| Static allocation of global device variable. More... | |
| __device__ float | y_d [n] |
| Static allocation of global device variable. More... | |
| __device__ float | z_d [n] |
| Static allocation of global device variable. More... | |
This sample demonstrates the __device__ qualifier.
__device__ variables__device__ functions. Definition in file deviceQualifier.cu.
| int main | ( | void | ) |
Definition at line 37 of file deviceQualifier.cu.
| __global__ void XplusY | ( | ) |
CUDA Kernel. Uses global device variables x_d, y_d, and z_d.
Definition at line 27 of file deviceQualifier.cu.
| __device__ float XplusY_dev | ( | float | x, |
| float | y | ||
| ) |
Device function (called by kernel).
Definition at line 20 of file deviceQualifier.cu.
| const int n =8192 |
Size of device vectors (needed for static allocations).
Definition at line 11 of file deviceQualifier.cu.
| __device__ float x_d[n] |
Static allocation of global device variable.
Definition at line 13 of file deviceQualifier.cu.
| __device__ float y_d[n] |
Static allocation of global device variable.
Definition at line 14 of file deviceQualifier.cu.
| __device__ float z_d[n] |
Static allocation of global device variable.
Definition at line 15 of file deviceQualifier.cu.
1.8.4