#define NV_CC_CPP11 (__cplusplus > 199711L || _MSC_VER >= 1800)// Visual Studio 2013 has all the features we use, but doesn't advertise full C++11 support yet.
#else
#else
// @@ IC: This works in CLANG, about GCC?
// @@ IC: This works in CLANG, about GCC?
// @@ ES: Doesn't work in gcc. These 3 features are available in GCC >= 4.4.
// @@ ES: Doesn't work in gcc. These 3 features are available in GCC >= 4.4.
// The thread pool runs the same function in all worker threads, the idea is to use this as the foundation of a custom task scheduler.
// The thread pool runs the same function in all worker threads, the idea is to use this as the foundation of a custom task scheduler.
// When the thread pool starts, the main thread continues running, but the common use case is to inmmediately wait for the termination events of the worker threads.
// When the thread pool starts, the main thread continues running, but the common use case is to inmmediately wait for the termination events of the worker threads.
// @@ The start and wait methods could probably be merged.
// @@ The start and wait methods could probably be merged.
// It may be running the thread function on the invoking thread to avoid thread switches.
// IC: This does indeed happen. What does that mean? The best choice of m is above the available range. If this happened too often it would make sense to scale m in
// the pixel shader to allow for more accurate reconstruction. However, that scaling would reduce the precision over the [0-1] range. I haven't measured how much
// error is introduced by the clamping vs. how much the error would change with the increased range.