Skip to content

Instantly share code, notes, and snippets.

@jrandom
jrandom / CMakeLists.txt
Created November 11, 2018 22:46
OpenVR: Corrected src/CMakeLists.txt to allow building of static library using the instructions in src/README
# Project name.
project(openvr_api)
set( LIBNAME "openvr_api" )
# Set some properies for specific files.
if(APPLE)
set(CMAKE_MACOSX_RPATH 1)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set_source_files_properties(vrcommon/pathtools_public.cpp vrcommon/vrpathregistry_public.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++")
@jrandom
jrandom / Pool.h
Last active December 27, 2021 23:54
C++11/14 Thread Pool
//
// Pool.h
//
#ifndef Tools_Thread_Pool_h
#define Tools_Thread_Pool_h
// ================================================================================ Standard Includes
// Standard Includes
@jrandom
jrandom / Pool.h
Created January 6, 2017 01:52
Basic thread pool for c++11/14
//
// Pool.h
// Tools/Thread
//
#ifndef Tools_Thread_Pool_h
#define Tools_Thread_Pool_h
// ================================================================================ Standard Includes
@jrandom
jrandom / SmartObject.h
Created April 22, 2015 00:44
C++11 intrinsic refcounter / smartpointer example code
//
// SmartObject.h
//
#ifndef Tools_Core_SmartObject_h
#define Tools_Core_SmartObject_h
// ================================================================================ Standard Includes
// Standard Includes
@jrandom
jrandom / Mutatable_Value.h
Last active August 29, 2015 14:19
Mutatable Value Macro
//
// Mutatable_Value.h
// Tools/Genetics
//
#ifndef Tools_Genetics_Mutateable_Value_h
#define Tools_Genetics_Mutateable_Value_h
// ================================================================================ Standard Includes
@jrandom
jrandom / GeneticsTypesExample.hpp
Created March 22, 2015 14:57
Snippet showing type simplification via using statements
// -------------------------------------------------------------------- Types - Axon_Gene_Interface_Input_Fixed_t
using Axon_Gene_Interface_Input_Fixed_t =
NeuralNet::LSTM::Axon_Gene_Interface_Only
<
Mutatable_Index_t,
Mutatable_Weight_t,
NeuralNet::LSTM::Interface_Only_Mode_Select::Interface_Input_Only,
NeuralNet::LSTM::Interface_Only_Fixed::Yes
>;
//
// Axon_Gene.h
// Tools/NeuralNet/LSTM
//
#ifndef Tools_NeuralNet_LSTM_Axon_Gene_h
#define Tools_NeuralNet_LSTM_Axon_Gene_h
// ================================================================================ Tools Includes
@jrandom
jrandom / gist:b4dd0d0f8200217c44d1
Last active August 29, 2015 14:12
Bogosort.cpp
template < typename container_t >
void BogoSort( container_t & data )
{
using std::begin;
using std::end;
std::random_device rd;
std::mt19937 ung( rd() );
@jrandom
jrandom / Random.h
Last active November 9, 2015 23:20
//
// Random.h
//
#ifndef Tools_Random_h
#define Tools_Random_h
// ================================================================================ Standard Includes
// Standard Includes