Project Restructure and Refactor
Release 0.16.6
Project directory restructure
The most noticeable changes in this release is the better organised project directory structure and cleaner build system. Despite this fact, the API is untouched so there aren't many major changes to be made to the codebase.
- Tidy everything up with CMake's
source_group. - Separate
SuperAlgorithm+host and device library into two distinct file trees. This would require a tiny bit of modification to the include paths. - Refactor the build script a lot.
- Refactor the config file generation function.
- Make sure source and header file subdirectories are consistent.
- Suppress unwanted nvcc warnings.
General fixes and improvement
- In
STPTextureDatabase, usestd::string_viewdirectly rather thanstd::optional<std::string_view>for less verbosity. - Improve
STPCamerasubscriber, it can now automatically unsubscribe to avoid holding dangling pointer, and no longer requires listener to write user-defined copy/move constructor. - Remove
STPListenerErroras being unused. - Simplify exception message formatting implementation.
- nanobench is no longer downloaded automatically, and use CMake's install target instead, for the sake of compilation time. With that said, you will need to install this library manually on your computer.
- Put
STPLayerCachein header because there is no need to use PIMPL for such as small class. - Simplify naming for various objects in
STPSmartDeviceMemory. - Use type brace initialisation instead of explicit value initialisation in
STPSmartDeviceObject. - Rename functions in
STPObjectPoolfor better simplicity.
Biome
- Replace use of variadic template with
std::initializer_list. - Make behaviour of ascendant access when index is out of bound undefined.
- Refactor biome generator in the demo application. This includes:
- Move definitions from header to a separate source file.
- Rename variables for style consistency.
- Remove
usingfrom headers.
- Pass ascendant as reference rather than pointer for standardised representation.
- Rather than storing layers as an array of
std::unique_ptrof layer, we initialise all layers at once and store them in a structure, then store this structure as an array member. This significantly reducing the number of memory allocation and avoid memory fragmentation.
STPShaderManager
- Can now automatically scan the shader include directory and load all shader source files as required, thanks to std::filesystem.
- Remove redundant functions.
STPSingleHistogramFilter
- Improve signed integer arithmetic to avoid overflow.
- Replace bit casting implementation with compiler built-in. This change acts as a transition before C++20 thus is temporary.