Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
hivert committed Oct 27, 2023
2 parents 9fa9d74 + a60d5e1 commit d050675
Show file tree
Hide file tree
Showing 16 changed files with 317 additions and 327 deletions.
90 changes: 82 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,103 @@ version: 2.1

jobs:
test:
parameters:
compiler:
type: string
version:
type: string
docker:
- image: reiniscirpons/hpcombi-env-arm64v8:v1
resource_class: arm.medium
steps:
- checkout
- run:
name: "Set up compiler"
environment:
COMPILER_NAME: << parameters.compiler >>
COMPILER_VERSION: << parameters.version >>
command: |
apt-get --yes update
mkdir -p workspace
if [ $COMPILER_NAME = "gcc" ]; then
apt-get install --yes gcc-$COMPILER_VERSION
apt-get install --yes g++-$COMPILER_VERSION
echo "export CC=gcc-$COMPILER_VERSION" >> workspace/new-env-vars
echo "export CXX=g++-$COMPILER_VERSION" >> workspace/new-env-vars
else
apt-get install --yes clang++-$COMPILER_VERSION
echo "export CC=clang-$COMPILER_VERSION" >> workspace/new-env-vars
echo "export CXX=clang++-$COMPILER_VERSION" >> workspace/new-env-vars
fi
- run:
name: Check compiler version
command: |
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
echo "CC"
echo $CC
echo "CXX"
echo $CXX
- checkout:
path: "./HPCombi"
- run:
name: Run cmake
command: |
mkdir build
cd build
cmake -DBUILD_TESTING=1 ..
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
mkdir -p ./HPCombi/build
cd ./HPCombi/build
cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX ..
- run:
name: Run make in tests folder
command: |
cd build/tests
make
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
cd ./HPCombi/build/tests
make -j2
- run:
name: Run tests
command: |
cd build/tests
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
cd ./HPCombi/build/tests
./test_all
workflows:
test:
jobs:
- test
- test:
name: "test-gcc-9"
compiler: "gcc"
version: "9"
# - test:
# name: "test-gcc-10"
# compiler: "gcc"
# version: "10"
# - test:
# name: "test-gcc-11"
# compiler: "gcc"
# version: "11"
- test:
name: "test-gcc-12"
compiler: "gcc"
version: "12"
- test:
name: "test-clang-11"
compiler: "clang"
version: "11"
# - test:
# name: "test-clang-12"
# compiler: "clang"
# version: "12"
# - test:
# name: "test-clang-13"
# compiler: "clang"
# version: "13"
# - test:
# name: "test-clang-14"
# compiler: "clang"
# version: "14"
- test:
name: "test-clang-15"
compiler: "clang"
version: "15"
14 changes: 1 addition & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ message(STATUS "**** Build type = ${CMAKE_BUILD_TYPE}")
################################
# General compiler configuration
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF) # -std=c++14 instead of -std=gnu++14

add_definitions(-DHPCOMBI_HAVE_CONFIG)
Expand All @@ -52,18 +52,6 @@ include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)
include(CheckCXXCompilerFlag)

## Check for static lcm
check_include_file_cxx("experimental/numeric" HPCOMBI_HAVE_EXPERIMENTAL_NUMERIC)
if (HPCOMBI_HAVE_EXPERIMENTAL_NUMERIC)
check_cxx_source_compiles(
"
#include <experimental/numeric>
static_assert(std::experimental::lcm(4, 6) == 12, \"Buggy lcm\");
int main() { }
"
HPCOMBI_HAVE_EXPERIMENTAL_NUMERIC_LCM)
endif (HPCOMBI_HAVE_EXPERIMENTAL_NUMERIC)

## Check for buggy constexpr support G++ 5.0
check_cxx_source_compiles(
"
Expand Down
3 changes: 3 additions & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set noparent
filter=-build/c++14,-build/include_subdir,-runtime/indentation_namespace,-runtime/references,-build/include,-readability/todo,-runtime/printf
linelength=80
6 changes: 5 additions & 1 deletion include/arch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
#define HPCOMBI_ARCH_HPP_INCLUDED

#if defined(SIMDE_ARCH_AMD64) && !defined(SIMDE_ARCH_X86_SSE4_1)
#error("x86_64 architecture without required compiler flags for SSE-4.1 instruction set. Did you forget to provide the flag -march=(native,avx,sse4.1) flag ?")
char const msg[] =
R("x86_64 architecture without required compiler flags for SSE-4.1 "
"instruction set. Did you forget to provide the flag -march="
"(native,avx,sse4.1) flag ?");
#error(msg)
#endif

#endif // HPCOMBI_ARCH_HPP_INCLUDED
33 changes: 16 additions & 17 deletions include/bmat8.hpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/******************************************************************************/
/* Copyright (C) 2018 Finn Smith <[email protected]> */
/* Copyright (C) 2018 James Mitchell <[email protected]> */
/* Copyright (C) 2018 Florent Hivert <[email protected]>, */
/* */
/* Distributed under the terms of the GNU General Public License (GPL) */
/* */
/* This code is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
/* General Public License for more details. */
/* */
/* The full text of the GPL is available at: */
/* */
/* http://www.gnu.org/licenses/ */
/******************************************************************************/
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2018 Finn Smith <[email protected]> //
// Copyright (C) 2018 James Mitchell <[email protected]> //
// Copyright (C) 2018 Florent Hivert <[email protected]>, //
// //
// Distributed under the terms of the GNU General Public License (GPL) //
// //
// This code is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
// General Public License for more details. //
// //
// The full text of the GPL is available at: //
// //
// http://www.gnu.org/licenses/ //
////////////////////////////////////////////////////////////////////////////////

// This file contains a declaration of fast boolean matrices up to dimension 8.

Expand All @@ -32,7 +32,6 @@
#include <vector> // for vector

#include "epu.hpp"

#include "perm16.hpp"

#ifndef HPCOMBI_ASSERT
Expand Down
Loading

0 comments on commit d050675

Please sign in to comment.