Skip to content

Instantly share code, notes, and snippets.

@jrprice
jrprice / oclc.c
Created Apr 14, 2015
Simple command-line OpenCL C compiler.
View oclc.c
#include <CL/cl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
cl_int err;
cl_platform_id platform;
cl_device_id device;
@jrprice
jrprice / strided_buffer_to_image.c
Last active Sep 1, 2017
Benchmark for different methods of copying strided data from a buffer to an image using OpenCL
View strided_buffer_to_image.c
#include <assert.h>
#include <stdio.h>
#include <sys/time.h>
#include <CL/cl.h>
// Platform and device indices to use
#define PLATFORM 0
#define DEVICE 0