Skip to content

Commit e451bbb

Browse files
committed
Release 1.0.0
1 parent 6da604e commit e451bbb

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
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

37
A 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
4650
make install
4751
```
4852

49-
## CONFIGURATION
53+
## DIAGNOSTICS & INFORMATION
5054

5155
A 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

5770
The tests are written with Catch2 (branch 1.x) and can be compiled with CMake and run through CTest.

include/gfx/timsort.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@
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)

0 commit comments

Comments
 (0)