-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'v2/main'
- Loading branch information
Showing
16 changed files
with
3,463 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: build_and_test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
# 3 am Tuesdays and Fridays | ||
- cron: 0 3 * * 2,5 | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.worfklow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
# The CMake configure and build commands are platform agnostic and should work equally | ||
# well on Windows or Mac. You can convert this to a matrix build if you need | ||
# cross-platform coverage. | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 12 | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: devtools/conda_envs/distopia_${{ matrix.os }}.yaml | ||
environment-name: distopia | ||
create-args: >- | ||
python==${{ matrix.python-version }} | ||
- name: Build | ||
# Execute the build. You can specify a specific target with "--target <NAME>" | ||
run: python setup.py build | ||
|
||
- name: Test | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest --test-dir _skbuild/*/cmake-build/libdistopia | ||
|
||
|
||
pip-install: | ||
# A pure Python install, which relies purely on pyproject.toml contents | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# for now windows pip install builds seem to fail for some reason | ||
os: [ubuntu-latest, macos-13] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: check_env | ||
run: | | ||
which python | ||
python -m pip list | ||
- name: build | ||
run: python -m pip install . -vvv | ||
|
||
- name: test | ||
run: ctest --test-dir _skbuild/*/cmake-build/libdistopia | ||
|
||
- name: install_pytest | ||
run: pip install pytest | ||
|
||
- name: python_test | ||
# run python API tests | ||
run: pytest distopia/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: distopia | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- cmake | ||
- make | ||
- pip | ||
- python >= 3.9 | ||
- cython | ||
- numpy | ||
- ninja | ||
- pytest | ||
- scikit-build | ||
- compilers | ||
- libxcrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: distopia | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- cmake | ||
- make | ||
- pip | ||
- python >= 3.9 | ||
- cython | ||
- numpy | ||
- ninja | ||
- pytest | ||
- scikit-build | ||
- compilers | ||
- libxcrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: distopia | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- cmake | ||
- make | ||
- pip | ||
- python >= 3.9 | ||
- cython | ||
- numpy | ||
- ninja | ||
- pytest | ||
- scikit-build | ||
- compilers |
Submodule googlebench
added at
ca8d0f
Submodule googletest
added at
2dd1c1
Submodule highway
added at
457c89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// Created by richard on 13/08/23. | ||
// | ||
|
||
#include <vector> | ||
#include <string> | ||
|
||
#ifndef DISTOPIA2_THE_HIGHWAY_WARRIOR_DISTOPIA_H | ||
#define DISTOPIA2_THE_HIGHWAY_WARRIOR_DISTOPIA_H | ||
|
||
|
||
// set EMU 128 to broken so that HWY_SCALAR is the baseline dispatch target | ||
#define HWY_BROKEN_EMU128 1 | ||
// compile all attainable targets | ||
#define HWY_COMPILE_ALL_ATTAINABLE | ||
|
||
|
||
namespace distopia { | ||
template <typename T> void CalcBondsNoBox(const T *a, const T *b, int n, T *out); | ||
template <typename T> void CalcBondsOrtho(const T *a, const T *b, int n, const T *box, T *out); | ||
template <typename T> void CalcBondsTriclinic(const T *a, const T *b, int n, const T *box, T *out); | ||
template <typename T> void CalcAnglesNoBox(const T *a, const T *b, const T *c, int n, T *out); | ||
template <typename T> void CalcAnglesOrtho(const T *a, const T *b, const T *c, int n, const T *box, T *out); | ||
template <typename T> void CalcAnglesTriclinic(const T *a, const T *b, const T *c, int n, const T *box, T *out); | ||
template <typename T> void CalcDihedralsNoBox(const T *a, const T *b, const T *c, const T *d, int n, T *out); | ||
template <typename T> void CalcDihedralsOrtho(const T *a, const T *b, const T *c, const T *d, int n, const T *box, T *out); | ||
template <typename T> void CalcDihedralsTriclinic(const T *a, const T *b, const T *c, const T *d, int n, const T *box, T *out); | ||
template <typename T> void CalcDistanceArrayNoBox(const T *a, const T *b, int na, int nb, T *out); | ||
template <typename T> void CalcDistanceArrayOrtho(const T *a, const T *b, int na, int nb, const T *box, T *out); | ||
template <typename T> void CalcDistanceArrayTriclinic(const T *a, const T *b, int na, int nb, const T *box, T *out); | ||
template <typename T> void CalcSelfDistanceArrayNoBox(const T *a, int n, T *out); | ||
template <typename T> void CalcSelfDistanceArrayOrtho(const T *a, int n, const T *box, T *out); | ||
template <typename T> void CalcSelfDistanceArrayTriclinic(const T *a, int n, const T *box, T *out); | ||
int GetNFloatLanes(); | ||
int GetNDoubleLanes(); | ||
std::vector<std::string> DistopiaSupportedAndGeneratedTargets(); | ||
} | ||
|
||
#endif //DISTOPIA2_THE_HIGHWAY_WARRIOR_DISTOPIA_H |
Oops, something went wrong.