Skip to content
Open
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
27 changes: 27 additions & 0 deletions .github/workflows/pixi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Pixi
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
# Sample Pixi usage.
# It can be extended to run any configuration with major compilers/architectures.
name: Pixi ${{ matrix.sys.compiler }} - ${{ matrix.sys.preset }}
runs-on: ubuntu-latest
strategy:
matrix:
sys:
- { compiler: "gcc-15", preset: "dev-avx2" }
- { compiler: "clang-21", preset: "dev-sse2" }
steps:
- name: Checkout xsimd
uses: actions/checkout@v3
- uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: v0.59.0
cache: true
- name: Run test
run: pixi run -e ${{ matrix.sys.compiler }} test ${{ matrix.sys.preset }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ docs/build/
.cache/

# CLion / IDEA
.idea/
.idea/

# pixi environments
.pixi/*
!.pixi/config.toml
130 changes: 130 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"version": 5,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets": [
{
"name": "xsimd-all",
"cacheVariables": {
"ENABLE_XTL_COMPLEX" :"ON",
"BUILD_TESTS": "ON",
"BUILD_BENCHMARK": "ON"
}
},

{
"name": "debug-base",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE" :"Debug"
}
},
{
"name": "release-base",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE" :"Release"
}
},

{
"name": "native-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=native" }
},
{
"name": "sse2-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=x86-64 -msse2 -mno-sse3" }
},
{
"name": "sse3-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=x86-64 -msse3 -mno-ssse3" }
},
{
"name": "ssse3-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=x86-64 -mssse3 -mno-sse4.1" }
},
{
"name": "sse4.1-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=x86-64 -msse4.1 -mno-sse4.2" }
},
{
"name": "sse4.2-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=x86-64 -msse4.2 -mno-avx" }
},
{
"name": "avx-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=x86-64 -mavx -mno-avx2" }
},
{
"name": "avx2-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=x86-64 -mavx2 -mno-avx512f" }
},
{
"name": "neon-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=armv8-a" }
},
{
"name": "sve-base",
"hidden": true,
"cacheVariables": { "CMAKE_CXX_FLAGS": "$env{CXXFLAGS} -march=armv8.2-a+sve" }
},

{
"name": "dev-base",
"hidden": true,
"inherits": ["debug-base", "xsimd-all"]
},
{
"name": "dev-native",
"inherits": ["dev-base", "native-base"]
},
{
"name": "dev-sse2",
"inherits": ["dev-base", "sse2-base"]
},
{
"name": "dev-sse3",
"inherits": ["dev-base", "sse3-base"]
},
{
"name": "dev-ssse3",
"inherits": ["dev-base", "ssse3-base"]
},
{
"name": "dev-sse4.1",
"inherits": ["dev-base", "sse4.1-base"]
},
{
"name": "dev-sse4.2",
"inherits": ["dev-base", "sse4.2-base"]
},
{
"name": "dev-avx",
"inherits": ["dev-base", "avx-base"]
},
{
"name": "dev-avx2",
"inherits": ["dev-base", "avx2-base"]
},
{
"name": "dev-neon",
"inherits": ["dev-base", "neon-base"]
},
{
"name": "dev-sve",
"inherits": ["dev-base", "sve-base"]
}
]
}
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,24 @@ sure they work on all supported architectures, not only your favorite one!
We use a shared copyright model that enables all contributors to maintain the
copyright on their contributions. Stated otherwise, there's no copyright
assignment.

# Working locally with Pixi

An optional [Pixi](https://pixi.sh) configuration is available to setup dependencies
and run tasks in Conda environments.
It single executable is easily installable from system package managers or through
direct download.

The most useful task is `test`, which will automatically download packages and re-run
the build steps as needed.
It can run a a mix of configurations with different compilers (configured in different
environments) and target architectures (configured as CMake presets).
For instance, to test the SSE2 environment with the Clang 21 compiler:

```sh
pixi run -e clang-21 test dev-sse2
```

All available environments can be found with ``pixi info`` and are stored in the ``.pixi``
local folder.
All available tasks can be listed with ``pixi task list``.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ cmake . -DBUILD_TESTS=ON
make xtest
```

See also [CONTRIBUTING.md](CONTRIBUTING.md) for instruction to build and test automatically with Pixi.

## Building the HTML Documentation

xsimd's documentation is built with three tools
Expand Down Expand Up @@ -230,6 +232,8 @@ make html

from the `docs` subdirectory.

See also [CONTRIBUTING.md](CONTRIBUTING.md) for a Pixi task to build the doc.

## License

We use a shared copyright model that enables all contributors to maintain the
Expand Down
Loading