Quiz Questions CUDA ITCS 45145 Parallel Programming UNCCharlotte

  • Slides: 6
Download presentation
Quiz Questions CUDA ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson, 2013, Quiz. CUDA. ppt

Quiz Questions CUDA ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson, 2013, Quiz. CUDA. ppt Nov 12, 2014

In CUDA, what does the qualifier _global_ indicate when used with the declaration of

In CUDA, what does the qualifier _global_ indicate when used with the declaration of a routine? a) Indicates routine can only be called from host and only executed on the device. b) Indicates routine can only be called and executed on the device c) Indicates routine can be called by the host and the device and executed on either d) The routine is globally accessible e) None of the other answers 2

In CUDA, what does the qualifier __device__ indicate when used with the declaration of

In CUDA, what does the qualifier __device__ indicate when used with the declaration of a routine? a) Indicates routine can only be called from host and only executed on the device. b) Indicates routine can only be called and executed on the device c) Indicates routine can be called by the host and the device and executed on either d) The routine is for input/output devices e) None of the other answers 3

In CUDA, what does the qualifier __host__ indicate when used with the declaration of

In CUDA, what does the qualifier __host__ indicate when used with the declaration of a routine? a) Indicates routine can only be called from host and only executed on the device. b) Indicates routine can only be called and executed on the device c) Indicates routine can be called by the host and the device and executed on either d) Indicates routine can only be called by the host and executed on the host e) None of the other answers 4

In CUDA, what is dim 3? a) The dimensions of the grid and block.

In CUDA, what is dim 3? a) The dimensions of the grid and block. b) A CUDA data type, equivalent to a structure with three elements, x, y, and z. c) The third dimension of the grid or block d) None of the other answers 5

Suppose a kernel is called with a 1 -D grid and 1 -D blocks.

Suppose a kernel is called with a 1 -D grid and 1 -D blocks. What is the equation to compute a unique global index for each thread? a) block. Idx. x * block. Dim. x + thread. Idx. x b) block. Idx. x + block. Dim. x * thread. Idx. x c) block. Idx. x * block. Dim. x * thread. Idx. x d) block. Idx. x * thread. Idx. x + block. Dim. x e) None of the other answers 6