Embed presentation
Downloaded 72 times

















![PGOpenCL Function DeclarationCREATE or REPLACE FUNCTION VectorAdd(IN a float[], IN B float[], OUT c float[])AS $BODY$#pragma PGOPENCL Platform : ATI Stream#pragma PGOPENCL Device : CPU__kernel __attribute__((reqd_work_group_size(64, 1, 1)))void VectorAdd( __global const float *a, __global const float *b, __global float *c) { int i = get_global_id(0); c[i] = a[i] + b[i]; }$BODY$Language PgOpenCL;](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2fpgopencl-120108014658-phpapp02%2f75%2fPostgreSQL-with-OpenCL-18-2048.jpg&f=jpg&w=240)












PgOpenCL is a new PostgreSQL procedural language that allows developers to write OpenCL kernels to harness the parallel processing power of GPUs. It introduces a new execution model where tables can be copied to arrays, passed to an OpenCL kernel for parallel operations on the GPU, and results copied back to tables. This unlock the potential for dramatically improved performance on compute-intensive database operations like joins, aggregations, and sorting.

















![PGOpenCL Function DeclarationCREATE or REPLACE FUNCTION VectorAdd(IN a float[], IN B float[], OUT c float[])AS $BODY$#pragma PGOPENCL Platform : ATI Stream#pragma PGOPENCL Device : CPU__kernel __attribute__((reqd_work_group_size(64, 1, 1)))void VectorAdd( __global const float *a, __global const float *b, __global float *c) { int i = get_global_id(0); c[i] = a[i] + b[i]; }$BODY$Language PgOpenCL;](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2fpgopencl-120108014658-phpapp02%2f75%2fPostgreSQL-with-OpenCL-18-2048.jpg&f=jpg&w=240)










