5. The OpenCL Runtime
5.2 Memory Objects
(1) buffer objects: 1-dim: scalar, vector, user-defined structure
(2) image objects: 2-dims or 3-dims texture, frame buffer and image: image format
memory object的元素至少为1
buffer的结构是显式的,指针访问,类型一致;image的结构是隐式的,不能用指针访问,类型可以隐式转换
cl_mem_flag:
read_write/read_only/write_only buffer,
(1) use_host_ptr: mapping device memory ptr or pcie memory ptr to host ptr
(2) copy_host_ptr: allocate memory on device or pcie and then copy host_ptr's content to
(3) alloc_host_ptr: allocate memory on host memory
read/write buffer command should be enqueu