Skip to content

Instantly share code, notes, and snippets.

Avatar

Raaj soulslicer

  • Carnegie Mellon University Robotics Institute
View GitHub Profile
anonymous
anonymous / gist:de6b81c556b5dc7cdc8b
Created Feb 20, 2015
Kernel panic in latest OS X in 10 lines of C
View gist:de6b81c556b5dc7cdc8b
#include <unistd.h>
#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <mach-o/dyld.h>
int
main (int argc, char * argv[])
{
volatile char * library;
const mach_vm_size_t page_size = getpagesize ();
@atinfinity
atinfinity / oclMat_custom_kernel.cpp
Last active Sep 23, 2020
sample code to execute custom OpenCL kernel on OpenCV 2.4.9
View oclMat_custom_kernel.cpp
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/ocl/ocl.hpp>
// cl_mem構造体を参照するためにインクルード
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif