Here is a semi-organized list of things I have worked on:https://chrisgreendevelopmentblog.wordpress.com/about/ Here is a link to an AMA i started if anyone has questions: https://www.reddit.com/r/AMA/comments/1uyk4wf/ama_retired_from_game_and_tech_industry_after_45/. I recently came around to thinking that not working full time at age 60 after a 45 year career didn t make me a slacker and that I…
A very useful system to have, especially in large codebases (including in game development) is an automated unique symbol generator. A unique symbol is a mapping from a textual identifier that has the following properties: These can be thought of as corresponding to either LISP style symbols (which are represented as unique pointers) or magically Continue reading Approaches for efficient unique…
Custom programming language implementation I ve had some programming language design ideas rattling around for a while. Since I had an unexpected Saturday with no plans I decided to implement something I could play with. I have implemented various compilers and interpreters before, and I really wanted to be able to sprint towards being able to Continue reading From zero to self-hosted in an…
This article benchmarks a few different implementation possibilities for this pattern: I use Intel TBB on both Windows and Linux, but also have lots of my own thread code to draw on. This experiment was spurred by some numeric code I was working on. It uses the simplest TBB idiom to solve this problem, a Continue reading Performance measurements for a parallel work queue
C++11 added both standardized support for simple mutexes (std::mutex) and read/write mutexes (std::shared_mutex). My benchmarks have shown them competitive performance-wise with both Intel TBB s mutex implementations, and also pthread s mutexes (which presumably the std:: ones are built upon) under linux, though which one wins is dependent upon usage pattern and whether or not a spin Continue…
A common scenario in large-scale C++ development is having top-level classes (or functions) which expose rich API interfaces with a lot of settable parameters and options. These aren t your lowest level classes but are the crowns that you have built out of them. For example, you might have a 3d rendering engine object, which supports Continue reading C++ : Non-positional parameters for rich…
I have an application that involves voxellizing meshes into a large 3d array of floats and then performing image-processing type operations on the resultant 3d array of floats. I do this on systems with a lot of cores (44, 48, and 128) and a lot of memory, so these operations run really fast, even including Continue reading Fun with large memory allocations. Well, not really fun at all.
In my application, I need to find interactions between curves defined over time. In particular, I need to be able to find the time at which 2 curves come within a certain distance of each other. So, given two curves in space f(t), and g(t), I wish to find the first point along t for Continue reading Using SIMD for solving nonlinear equations
I needed to write a basic worker thread pool implementation. I needed a simple system that let me queue jobs, have those jobs executed by worker threads, and wait on job completion. I looked at a few public ones, including the intel TBB library, and some fairly simple portable c++11 versions. I ended up writing Continue reading Thread pools and Windows processor groups
One of the first pieces of code that is usually required early in a project are some functions for simply printing messages and formatting program data into human-readable text form. Generally these functions build on top of those already in the c++ library, but add more features. For instance: Even a simple text-based program that Continue reading Printing and data formatting functions