Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
build:
strategy:
matrix:
os: [ macos-latest, ubuntu-22.04 ]
os: [ macos-latest, ubuntu-22.04, ubuntu-22.04-arm, windows-latest ]

runs-on: ${{ matrix.os }}
continue-on-error: true
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
echo "CXX=/usr/bin/g++-12" >> $GITHUB_ENV

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTING=ON
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_TESTING="ON"

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j
Expand All @@ -67,7 +67,7 @@ jobs:
needs: build
strategy:
matrix:
os: [ macos-latest, ubuntu-22.04 ]
os: [ macos-latest, ubuntu-22.04, ubuntu-22.04-arm, windows-latest ]

runs-on: ${{ matrix.os }}
continue-on-error: true
Expand All @@ -84,13 +84,13 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
chmod -R +rx ${{github.workspace}}/build
ctest -C ${{env.BUILD_TYPE}} --output-on-failure
ctest -C ${{env.BUILD_TYPE}} --output-on-failure -E "benchmark"

benchmark:
needs: build
strategy:
matrix:
os: [ macos-latest, ubuntu-22.04 ]
os: [ macos-latest, ubuntu-22.04, ubuntu-22.04-arm, windows-latest ]

runs-on: ${{ matrix.os }}
continue-on-error: true
Expand All @@ -104,6 +104,7 @@ jobs:
path: ${{github.workspace}}/build

- name: Benchmark
working-directory: ${{github.workspace}}/build
run: |
chmod +x ${{github.workspace}}/build/benchmark/timeq_benchmark
${{github.workspace}}/build/benchmark/timeq_benchmark
chmod -R +rx ${{github.workspace}}/build
ctest -C ${{env.BUILD_TYPE}} -R "benchmark" --verbose
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ intervals have elapsed since the last update.
## Requirements

- CMake 3.13 or newer
- A C++20 compiler (GCC, Clang, or Apple Clang)
- A C++20 compiler

When built as the top-level project, test and benchmark dependencies (GoogleTest and
Google Benchmark) are fetched automatically via [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake).
Expand Down
2 changes: 2 additions & 0 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ target_compile_options(timeq_benchmark PRIVATE
)

target_link_libraries(timeq_benchmark PRIVATE timeq benchmark::benchmark_main)

add_test(NAME timeq_benchmark COMMAND timeq_benchmark)
6 changes: 5 additions & 1 deletion include/timeq/fast_time_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
#include <vector>

namespace timeq {
#define FORCE_INLINE __attribute__((always_inline))
#ifdef _MSC_VER
#define FORCE_INLINE inline __forceinline
#else
#define FORCE_INLINE inline __attribute__((always_inline))
#endif

/**
* @brief Aging element FIFO queue.
Expand Down
6 changes: 5 additions & 1 deletion include/timeq/time_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
#include <vector>

namespace timeq {
#define FORCE_INLINE __attribute__((always_inline))
#ifdef _MSC_VER
#define FORCE_INLINE inline __forceinline
#else
#define FORCE_INLINE inline __attribute__((always_inline))
#endif

/**
* @brief Aging element FIFO queue.
Expand Down
Loading