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
// Pipeline base class | |
template <typename T, typename F> | |
class Pipeline | |
{ | |
public: | |
typedef std::function<F> Func; | |
Pipeline() = default; |
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 <cstdio> | |
#include <string> | |
#include <sstream> | |
#include <stdexcept> | |
#ifdef _MSC_VER | |
#include <Windows.h> | |
#include <direct.h> | |
#else | |
#include <dlfcn.h> |
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
; Increase maximum hotkeys (needed for scrolling to work) | |
#HotkeyInterval 250 | |
; Alt-3 for Hash/Pound | |
!3:: | |
Send {#} | |
Return | |
; Invert scrolling direction (OS X Lion behaviour) | |
WheelUp:: |
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
# Project management (proj command) | |
export PROJ_ROOT=$HOME/projects | |
export PROJ_CONF=.proj.conf | |
_proj_complete () | |
{ | |
local suggest=$(compgen -d $PROJ_ROOT/${COMP_WORDS[COMP_CWORD]} | awk -F "/" '{print $NF}') | |
if [[ $(echo $suggest | wc -w | grep -o '[0-9]') == 1 && -d $PROJ_ROOT/$suggest ]]; then | |
COMPREPLY=$suggest | |
else | |
unset COMPREPLY |
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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": "src", | |
"name": "Source", | |
}, | |
{ | |
"path": ".", | |
"name": "Miscelaneous", |
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 <cstdio> | |
#include <cassert> | |
#include <cuda.h> | |
#include <cuda_profiler_api.h> | |
#include "juliaset.h" | |
// Zn + 1 = Zn^2 * C | |
// Helper function | |
static __device__ float julia(uint16_t x, uint16_t y, uint16_t w, uint16_t h, float cr, float ci) |
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
# Use -DBUILD_DOCUMENTATION=ON to enable Doxygen at build-time | |
option (BUILD_DOCUMENTATION | |
"Use Doxygen to create the HTML based API documentation" OFF) | |
# Build Doxygen HTML docs | |
if (BUILD_DOCUMENTATION) | |
FIND_PACKAGE(Doxygen) | |
if (NOT DOXYGEN_FOUND) | |
message (FATAL_ERROR | |
"Doxygen not found on system, cannot build documentation") |
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
# Protobuf setup, these should be set to your project's directories, and currently assumes | |
# that everything is relative to CMAKE_SOURCE_DIR (the directory CMake is run from) | |
set (PROTO_IN_DIR ${CMAKE_SOURCE_DIR}/proto) | |
set (PROTO_OUT_DIR ${CMAKE_SOURCE_DIR}/build/proto) | |
set (PROTOC_BIN ${CMAKE_SOURCE_DIR}/thirdparty/protobuf/bin/protoc) | |
set (PROTOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/protobuf/include) | |
set (PROTOC_LIB_DIR ${CMAKE_SOURCE_DIR}/thirdparty/protobuf/lib | |
# Protobuf files | |
set (PROTO_FILES |
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
#!/bin/bash | |
usage () | |
{ | |
echo "CMake build script wrapper..." | |
echo " Usage: $0 [-h -t <debug/release> -c]" | |
echo | |
echo " -h : Display this message" | |
echo " -t : Specify build configuration (default: debug)" | |
echo " -c : Perform clean of configuration specified in the -r parameter" |
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 <cassert> | |
#include <cstdlib> | |
#include <cstring> | |
#include <cerrno> | |
#include <string> | |
#include <sstream> | |
#include <stdexcept> | |
#include <sys/socket.h> | |
#include <unistd.h> |
NewerOlder