This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 3.9.6) | |
project(testapp) | |
find_package(fltk REQUIRED) | |
add_executable(testapp test.cpp) | |
target_link_libraries(testapp fltk::fltk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 3.9.6) | |
project(testapp) | |
find_package(fltk REQUIRED) | |
add_executable(testapp test.cpp) | |
target_link_libraries(testapp fltk::fltk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
import numpy as np | |
import numba.cuda as cuda | |
import cuda.cudart as curt | |
# source: https://numba.discourse.group/t/cuda-opengl-interop/1898 | |
class OpenglBufferInCuda: | |
"""A mapping of OpenGL buffer into CUDA device memory.""" | |
def __init__(self, glbuf): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python3 | |
import os, sys, glob, re, argparse, shutil | |
from os import path | |
# Note: Python 3.5 or later is required ! | |
def concat_files(in_files, out_file): | |
with open(out_file, 'wb') as wfd: | |
for f in in_files: | |
with open(f, 'rb') as fd: | |
shutil.copyfileobj(fd, wfd, 1024*1024*10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <algorithm> | |
#include <vector> | |
//======================== Perfect hash generator ========================= | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stddef.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <algorithm> | |
#ifndef NO_CPP11 | |
#include <type_traits> | |
#endif | |
// This is a prototype of intrusive SharedPtr + WeakPtr combo. | |
// It is not thread-safe yet, and it relies on rather unsafe things. |