45 lines
760 B
C++
45 lines
760 B
C++
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
// opencl
|
|
#include <CL/opencl.hpp>
|
|
// raylib
|
|
// #include <raylib.h>
|
|
// sqllite
|
|
//#include <sqlite3.h>
|
|
|
|
//#include "include/layers.hpp"
|
|
|
|
cl::Platform select_platform (){
|
|
|
|
std::vector<cl::Platform> all_platforms;
|
|
cl::Platform::get(&all_platforms);
|
|
if(all_platforms.size() == 0)
|
|
{
|
|
std::cout << "No Platforms found. Check OpenCl installation!\n";
|
|
exit(1);
|
|
}
|
|
|
|
return all_platforms[0];
|
|
}
|
|
|
|
|
|
int main(){
|
|
// import data
|
|
|
|
cl::Platform default_platform=select_platform();
|
|
std::cout << "Using platform: "<< default_platform.getInfo<CL_PLATFORM_NAME>() <<"\n";
|
|
|
|
return 0;
|
|
|
|
|
|
// setup raylib env
|
|
|
|
|
|
//while loop
|
|
// raylib thread (60fps)
|
|
// opencl sim (every 15 seconds) swap data every 15 seconds
|
|
}
|
|
|