60 likes | 76 Views
Quiz Questions CUDA. In CUDA, what does the qualifier _global_ indicate when used with the declaration of a routine?. Indicates routine can only be called from host and only executed on the device . Indicates routine can only be called and executed on the device
E N D
Quiz QuestionsCUDA ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson, 2013, QuizCUDA.ppt Nov 12, 2014
In CUDA, what does the qualifier _global_ indicate when used with the declaration of a routine? • Indicates routine can only be called from host and only executed on the device. • Indicates routine can only be called and executed on the device • Indicates routine can be called by the host and the device and executed on either • The routine is globally accessible • None of the other answers
In CUDA, what does the qualifier __device__ indicate when used with the declaration of a routine? • Indicates routine can only be called from host and only executed on the device. • Indicates routine can only be called and executed on the device • Indicates routine can be called by the host and the device and executed on either • The routine is for input/output devices • None of the other answers
In CUDA, what does the qualifier __host__ indicate when used with the declaration of a routine? • Indicates routine can only be called from host and only executed on the device. • Indicates routine can only be called and executed on the device • Indicates routine can be called by the host and the device and executed on either • Indicates routine can only be called by the host and executed on the host • None of the other answers
In CUDA, what is dim3? • The dimensions of the grid and block. • A CUDA data type, equivalent to a structure with three elements, x, y, and z. • The third dimension of the grid or block • None of the other answers
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? • blockIdx.x * blockDim.x + threadIdx.x • blockIdx.x + blockDim.x * threadIdx.x • blockIdx.x * blockDim.x * threadIdx.x • blockIdx.x * threadIdx.x + blockDim.x • None of the other answers