File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1- ## TimSort [ ![ Build Status] ( https://travis-ci.org/timsort/cpp-TimSort.svg?branch=master )] ( https://travis-ci.org/timsort/cpp-TimSort )
1+ [ ![ Latest Release] ( https://img.shields.io/badge/release-cpp--TimSort%2F1.0.0-blue.svg )] ( https://github.com/timsort/cpp-TimSort/releases )
2+ [ ![ Build Status] ( https://travis-ci.org/timsort/cpp-TimSort.svg?branch=master )] ( https://travis-ci.org/timsort/cpp-TimSort )
3+ [ ![ License] ( https://img.shields.io/:license-mit-blue.svg )] ( https://doge.mit-license.org )
4+
5+ ## TimSort
26
37A C++ implementation of TimSort, an O(n log n) stable sorting algorithm, ported from Python's and OpenJDK's.
48
@@ -46,12 +50,21 @@ cd build
4650make install
4751```
4852
49- ## CONFIGURATION
53+ ## DIAGNOSTICS & INFORMATION
5054
5155A few configuration macros allow gfx::timsort to emit diagnostic, which might be helpful to diagnose issues:
5256* Defining ` GFX_TIMSORT_ENABLE_ASSERT ` inserts assertions in key locations in the algorithm to avoid logic errors.
5357* Defining ` GFX_TIMSORT_ENABLE_LOG ` inserts logs in key locations, which allow to follow more closely the flow of the algorithm.
5458
59+ ** cpp-TimSort** follows semantic versioning and provides the following macros to retrieve the current major, minor
60+ and patch versions:
61+
62+ ``` cpp
63+ GFX_TIMSORT_VERSION_MAJOR
64+ GFX_TIMSORT_VERSION_MINOR
65+ GFX_TIMSORT_VERSION_PATCH
66+ ```
67+
5568## TESTS
5669
5770The tests are written with Catch2 (branch 1.x) and can be compiled with CMake and run through CTest.
Original file line number Diff line number Diff line change 3535#include < iterator>
3636#include < vector>
3737
38+ // Semantic versioning macros
39+
40+ #define GFX_TIMSORT_VERSION_MAJOR 1
41+ #define GFX_TIMSORT_VERSION_MINOR 0
42+ #define GFX_TIMSORT_VERSION_PATCH 0
43+
44+ // Diagnostic selection macros
45+
3846#ifdef GFX_TIMSORT_ENABLE_ASSERT
3947# include < cassert>
4048# define GFX_TIMSORT_ASSERT (expr ) assert (expr)
You can’t perform that action at this time.
0 commit comments