Skip to content

Instantly share code, notes, and snippets.

Emanuele Ruffaldi eruffaldi

View GitHub Profile
@eruffaldi
eruffaldi / current_utc_time.c
Created Jan 28, 2017 — forked from jbenet/current_utc_time.c
work around lack of clock_gettime in os x
View current_utc_time.c
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@eruffaldi
eruffaldi / CMakeLists.txt
Last active May 27, 2016 — forked from allanmac/assert_cuda.c
A tiny example of CUDA + OpenGL interop with write-only surfaces and CUDA kernels. Uses GLFW+GLAD.
View CMakeLists.txt
#sudo pip install --upgrade git+https://github.com/dav1dde/glad.git#egg=glad
#python main.py --api gl=3.3 --generator=c --out-path=GL
find_package(CUDA)
find_package(GLFW)
include_directories(${GLFW_INCLUDE_DIRS})
include_directories(GL/include)
cuda_add_executable(main main.c assert_cuda.c interop.c GL/src/glad.c kernel.cu)
target_link_libraries(main ${GLFW_LIBRARY})
You can’t perform that action at this time.