8월, 2015의 게시물 표시

OpenCL Vector type 간 비교

OpenCL에는 벡터 형 자료가 있다. 아래 표는  https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/ 에서 긁어왔다. Type in OpenCL Language Description API type for application char n A vector of  n  8-bit signed two's complement integer values. cl_char n uchar n A vector of  n  8-bit unsigned integer values. cl_uchar n short n A vector of  n  16-bit signed two's complement  integer values. cl_short n ushort n A vector of  n  16-bit unsigned integer values. cl_ushort n int n A vector of  n  32-bit signed two's complement integer values. cl_int n uint n A vector of  n  32-bit unsigned integer values. cl_uint n long n A vector of  n  64-bit signed two's complement  integer values. cl_long n ulong n A vector of  n  64-bit unsigned integer values. cl_ulong n float n A vector of  n  32-bit floating-point values. cl_float n double n A vector of  n  64-bit floating-point values. cl_double n 정말 편한게 벡터간에 연산이 가능하고  실제로 HW에서 벡터연산을 지원하는 경우가 많으므로 벡터연산을 하면 성능이 향상된다. 벡터간