Skip to content

Instantly share code, notes, and snippets.

@stephanlachnit
stephanlachnit / cl_devices.cpp
Last active November 17, 2018 21:51 — forked from dogukancagatay/Makefile
List OpenCL devices and platforms using C++
#include <iostream>
#include <CL/cl.hpp>
int main(int argc, char *argv[]) {
std::vector<cl::Platform> platforms;
cl::Platform::get(&platforms);
int platform_id = 0;
int device_id = 0;