Which of the following statements is/are TRUE? 1. OpenCL commands are sent to a device through a command queue 2. All concurrent programs are parallel programs 3. A GPU can be used as an OpenCL host Select one: a. b. 1 only 2 and 3 c. 1 and 3 d. 1 and 2 e. 2 only Clear my choice Given the following snippet of code: __kernel void something(int a, int b,_global int*c,_global int4* d) ( } In host code: int i = 0; std::vector(16); for(i=0; i<16; i++) { j[0] = i; } cl::Buffer bf = cl::Buffer(context, CL_MEM_READ_ONLY, sizeof(cl_int)*16); kernel.setArg(0, i); kernel.setArg(1, j[0]); kernel.setArg(2, bf); kernel.setArg(3, bf); // line A // line B //line C // line D Which of the following statements is TRUE? Select one: a. Line D will produce an error b. Line A will produce an error c. None of the lines will produce an error d. Line B will produce an error e. Line C will produce an error Which of the following statements about data in OpenCL is/are FALSE?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Provide simple explanation

Which of the following statements is/are TRUE?
1. OpenCL commands are sent to a device through a command queue
2. All concurrent programs are parallel programs
3. A GPU can be used as an OpenCL host
Select one:
a. 1 only
b.
2 and 3
c. 1 and 3
d. 1 and 2
e. 2 only
Clear my choice
Given the following snippet of code:
__kernel void something(int a, int b,_global int* c, _global int4* d)
{
...
}
In host code:
int i = 0;
std::vector<cl_int>(16);
for(i=0; i<16; i++) {
j0=;;
}
cl::Buffer bf = cl::Buffer(context, CL_MEM_READ_ONLY, sizeof(cl_int)*16);
kernel.setArg(0, i);
kernel.setArg(1, j[0]);
kernel.setArg(2, bf);
kernel.setArg(3, bf);
Which of the following statements is TRUE?
Select one:
a. Line D will produce an error
b. Line A will produce an error
c. None of the lines will produce an error
d. Line B will produce an error
e. Line C will produce an error
Which of the following statements about data in OpenCL is/are FALSE?
1. Local memory can be reserved from the host
2. The host can access data in local memory
3. All work-items can access constant memory
Select one:
// line A
// line B
// line C
// line D
a. 2 only
b. 1 and 3
c. 1 only
d. 1 and 2
e. 2 and 3
Clear my choice
Transcribed Image Text:Which of the following statements is/are TRUE? 1. OpenCL commands are sent to a device through a command queue 2. All concurrent programs are parallel programs 3. A GPU can be used as an OpenCL host Select one: a. 1 only b. 2 and 3 c. 1 and 3 d. 1 and 2 e. 2 only Clear my choice Given the following snippet of code: __kernel void something(int a, int b,_global int* c, _global int4* d) { ... } In host code: int i = 0; std::vector<cl_int>(16); for(i=0; i<16; i++) { j0=;; } cl::Buffer bf = cl::Buffer(context, CL_MEM_READ_ONLY, sizeof(cl_int)*16); kernel.setArg(0, i); kernel.setArg(1, j[0]); kernel.setArg(2, bf); kernel.setArg(3, bf); Which of the following statements is TRUE? Select one: a. Line D will produce an error b. Line A will produce an error c. None of the lines will produce an error d. Line B will produce an error e. Line C will produce an error Which of the following statements about data in OpenCL is/are FALSE? 1. Local memory can be reserved from the host 2. The host can access data in local memory 3. All work-items can access constant memory Select one: // line A // line B // line C // line D a. 2 only b. 1 and 3 c. 1 only d. 1 and 2 e. 2 and 3 Clear my choice
Given the following snippet of code:
std::vector<cl_int> data(100);
for(int i = 0; i < 100; i++) {
data[i] = i+1;
}
cl::Buffer bf = cl::Buffer(context, CL_MEM_WRITE_ONLY, sizeof(int) *16);
Which of the following statements is TRUE?
Select one:
a. bf will be created but will not contain any values
b.
bf will contain values from 0 to 99
c. bf will contain values from 1 to 16
d.
bf will contain values from 1 to 100
e. The code will not work
Clear my choice
Which of the following definitions is not part of Flynn's taxonomy of computer architectures?
Select one:
a. Multiple Instruction Single Data (MISD)
b. Single Instruction Single Data (SISD)
Multiple Program Single Data (MPSD)
C.
d. Multiple Instruction Multiple Data (MIMD)
e. Single Instruction Multiple Data (SIMD)
Clear my choice
Transcribed Image Text:Given the following snippet of code: std::vector<cl_int> data(100); for(int i = 0; i < 100; i++) { data[i] = i+1; } cl::Buffer bf = cl::Buffer(context, CL_MEM_WRITE_ONLY, sizeof(int) *16); Which of the following statements is TRUE? Select one: a. bf will be created but will not contain any values b. bf will contain values from 0 to 99 c. bf will contain values from 1 to 16 d. bf will contain values from 1 to 100 e. The code will not work Clear my choice Which of the following definitions is not part of Flynn's taxonomy of computer architectures? Select one: a. Multiple Instruction Single Data (MISD) b. Single Instruction Single Data (SISD) Multiple Program Single Data (MPSD) C. d. Multiple Instruction Multiple Data (MIMD) e. Single Instruction Multiple Data (SIMD) Clear my choice
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education