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
19 changes: 19 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,24 @@ AlignAfterOpenBracket: Align
AlignConsecutiveDeclarations: 'false'
BreakBeforeBraces: Allman
NamespaceIndentation: All
IncludeBlocks: Regroup
# First regex to match classifies the header into a group.
# Group are ordered in the source code by increasing priority.
IncludeCategories:
# Standard headers
- Regex: <[^\.]+>
Priority: 4
# Third party dependencies (prefer angle bracket over quotes)
- Regex: <.+\..+>
Priority: 3
# xsimd absolute headers (e.g. in tests)
- Regex: '["<]xsimd/.+[">]'
Priority: 2
# Relative header from project
- Regex: '"\.+.*"'
Priority: 1
# Not quoted header (anything else, avoid)
- Regex: '".*"'
Priority: 0

...
4 changes: 2 additions & 2 deletions benchmark/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/

#include "xsimd_benchmark.hpp"

#include <iostream>
#include <map>
#include <string>

#include "xsimd_benchmark.hpp"

void benchmark_operation()
{
// std::size_t size = 9984;
Expand Down
1 change: 1 addition & 0 deletions benchmark/xsimd_benchmark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "xsimd/arch/xsimd_scalar.hpp"
#include "xsimd/xsimd.hpp"

#include <chrono>
#include <string>
#include <vector>
Expand Down
8 changes: 4 additions & 4 deletions examples/mandelbrot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
// https://github.com/ospray/tsimd/blob/master/benchmarks/mandelbrot.cpp
// Author Jefferson Amstutz / intel

#include "pico_bench.hpp"

#include <xsimd/xsimd.hpp>

#include <cstdio>
#include <iostream>
#include <string>
#include <vector>

#include "pico_bench.hpp"

#include <xsimd/xsimd.hpp>

// helper function to write the rendered image as PPM file
inline void writePPM(const std::string& fileName,
const int sizeX,
Expand Down
6 changes: 3 additions & 3 deletions include/xsimd/arch/common/xsimd_common_arithmetic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#ifndef XSIMD_COMMON_ARITHMETIC_HPP
#define XSIMD_COMMON_ARITHMETIC_HPP

#include "../../types/xsimd_batch_constant.hpp"
#include "./xsimd_common_details.hpp"

#include <complex>
#include <limits>
#include <type_traits>

#include "../../types/xsimd_batch_constant.hpp"
#include "./xsimd_common_details.hpp"

namespace xsimd
{

Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/common/xsimd_common_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#ifndef XSIMD_COMMON_CAST_HPP
#define XSIMD_COMMON_CAST_HPP

#include <array>

#include "../../config/xsimd_macros.hpp"
#include "../../utils/xsimd_type_traits.hpp"

#include <array>

namespace xsimd
{
namespace kernel
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/common/xsimd_common_complex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#ifndef XSIMD_COMMON_COMPLEX_HPP
#define XSIMD_COMMON_COMPLEX_HPP

#include <complex>

#include "./xsimd_common_details.hpp"

#include <complex>

namespace xsimd
{

Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/common/xsimd_common_details.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#ifndef XSIMD_COMMON_DETAILS_HPP
#define XSIMD_COMMON_DETAILS_HPP

#include <complex>

#include "../../math/xsimd_rem_pio2.hpp"
#include "../../types/xsimd_common_arch.hpp"
#include "../../types/xsimd_utils.hpp"
#include "../xsimd_constants.hpp"

#include <complex>

namespace xsimd
{
// Forward declaration. Should we put them in a separate file?
Expand Down
6 changes: 3 additions & 3 deletions include/xsimd/arch/common/xsimd_common_memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#ifndef XSIMD_COMMON_MEMORY_HPP
#define XSIMD_COMMON_MEMORY_HPP

#include "../../types/xsimd_batch_constant.hpp"
#include "./xsimd_common_details.hpp"

#include <algorithm>
#include <array>
#include <complex>

#include "../../types/xsimd_batch_constant.hpp"
#include "./xsimd_common_details.hpp"

namespace xsimd
{
template <typename T, class A, T... Values>
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/common/xsimd_common_swizzle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#ifndef XSIMD_COMMON_SWIZZLE_HPP
#define XSIMD_COMMON_SWIZZLE_HPP

#include "../../config/xsimd_macros.hpp"

#include <cstddef>
#include <cstdint>
#include <type_traits>

#include "../../config/xsimd_macros.hpp"

namespace xsimd
{
template <typename T, class A, T... Values>
Expand Down
6 changes: 3 additions & 3 deletions include/xsimd/arch/xsimd_avx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
#ifndef XSIMD_AVX_HPP
#define XSIMD_AVX_HPP

#include "../types/xsimd_avx_register.hpp"
#include "../types/xsimd_batch_constant.hpp"

#include <complex>
#include <limits>
#include <type_traits>

#include "../types/xsimd_avx_register.hpp"
#include "../types/xsimd_batch_constant.hpp"

namespace xsimd
{
namespace kernel
Expand Down
5 changes: 2 additions & 3 deletions include/xsimd/arch/xsimd_avx2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
#ifndef XSIMD_AVX2_HPP
#define XSIMD_AVX2_HPP

#include <complex>
#include <type_traits>

#include "../types/xsimd_avx2_register.hpp"
#include "../types/xsimd_batch_constant.hpp"
#include "./utils/shifts.hpp"

#include <complex>
#include <limits>
#include <type_traits>

namespace xsimd
{
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/xsimd_avx2_128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#ifndef XSIMD_AVX2_128_HPP
#define XSIMD_AVX2_128_HPP

#include <type_traits>

#include "../types/xsimd_avx2_register.hpp"
#include "../types/xsimd_batch_constant.hpp"

#include <type_traits>

namespace xsimd
{
namespace kernel
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/xsimd_avx512bw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#ifndef XSIMD_AVX512BW_HPP
#define XSIMD_AVX512BW_HPP

#include "../types/xsimd_avx512bw_register.hpp"

#include <array>
#include <type_traits>

#include "../types/xsimd_avx512bw_register.hpp"

namespace xsimd
{

Expand Down
6 changes: 3 additions & 3 deletions include/xsimd/arch/xsimd_avx512f.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#ifndef XSIMD_AVX512F_HPP
#define XSIMD_AVX512F_HPP

#include "../types/xsimd_avx512f_register.hpp"
#include "../types/xsimd_batch_constant.hpp"

#include <complex>
#include <limits>
#include <type_traits>

#include "../types/xsimd_avx512f_register.hpp"
#include "../types/xsimd_batch_constant.hpp"

namespace xsimd
{

Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/xsimd_avx512vbmi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#ifndef XSIMD_AVX512VBMI_HPP
#define XSIMD_AVX512VBMI_HPP

#include <type_traits>

#include "../types/xsimd_avx512vbmi_register.hpp"

#include <type_traits>

namespace xsimd
{

Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/xsimd_avx512vbmi2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#ifndef XSIMD_AVX512VBMI2_HPP
#define XSIMD_AVX512VBMI2_HPP

#include <type_traits>

#include "../types/xsimd_avx512vbmi2_register.hpp"

#include <type_traits>

namespace xsimd
{

Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/xsimd_avx_128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#ifndef XSIMD_AVX_128_HPP
#define XSIMD_AVX_128_HPP

#include <type_traits>

#include "../types/xsimd_avx_register.hpp"
#include "../types/xsimd_batch_constant.hpp"

#include <type_traits>

namespace xsimd
{
namespace kernel
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/xsimd_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#ifndef XSIMD_NUMERICAL_CONSTANT_HPP
#define XSIMD_NUMERICAL_CONSTANT_HPP

#include <limits>

#include "../types/xsimd_utils.hpp"

#include <limits>

namespace xsimd
{

Expand Down
9 changes: 4 additions & 5 deletions include/xsimd/arch/xsimd_emulated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
#ifndef XSIMD_EMULATED_HPP
#define XSIMD_EMULATED_HPP

#include <complex>
#include <numeric>
#include <type_traits>

#include "../arch/xsimd_scalar.hpp"

#include "../types/xsimd_emulated_register.hpp"
#include "../types/xsimd_utils.hpp"

#include <complex>
#include <numeric>
#include <type_traits>

namespace xsimd
{
template <typename T, class A, bool... Values>
Expand Down
1 change: 0 additions & 1 deletion include/xsimd/arch/xsimd_isa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#define XSIMD_ISA_HPP

#include "../config/xsimd_arch.hpp"

#include "./xsimd_common_fwd.hpp"

#if XSIMD_WITH_EMULATED
Expand Down
12 changes: 6 additions & 6 deletions include/xsimd/arch/xsimd_neon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
#ifndef XSIMD_NEON_HPP
#define XSIMD_NEON_HPP

#include <algorithm>
#include <array>
#include <cassert>
#include <complex>
#include <type_traits>

#include "../types/xsimd_batch_fwd.hpp"
#include "../types/xsimd_neon_register.hpp"
#include "../types/xsimd_utils.hpp"
Expand All @@ -26,6 +20,12 @@
#include "./common/xsimd_common_cast.hpp"
#include "./xsimd_common_fwd.hpp"

#include <algorithm>
#include <array>
#include <cassert>
#include <complex>
#include <type_traits>

namespace xsimd
{
namespace kernel
Expand Down
8 changes: 4 additions & 4 deletions include/xsimd/arch/xsimd_neon64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
#ifndef XSIMD_NEON64_HPP
#define XSIMD_NEON64_HPP

#include "../types/xsimd_neon64_register.hpp"
#include "../types/xsimd_utils.hpp"
#include "./xsimd_neon.hpp"

#include <cassert>
#include <complex>
#include <cstddef>
#include <cstring>
#include <utility>

#include "../types/xsimd_neon64_register.hpp"
#include "../types/xsimd_utils.hpp"
#include "./xsimd_neon.hpp"

namespace xsimd
{
template <typename T, class A, bool... Values>
Expand Down
6 changes: 3 additions & 3 deletions include/xsimd/arch/xsimd_rvv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
#ifndef XSIMD_RVV_HPP
#define XSIMD_RVV_HPP

#include <complex>
#include <type_traits>

#include "../config/xsimd_macros.hpp"
#include "../types/xsimd_batch_constant.hpp"
#include "../types/xsimd_rvv_register.hpp"
#include "../types/xsimd_utils.hpp"
#include "../utils/xsimd_type_traits.hpp"
#include "./xsimd_constants.hpp"

#include <complex>
#include <type_traits>

// This set of macros allows the synthesis of identifiers using a template and
// variable macro arguments. A single template can then be used by multiple
// macros, or multiple instances of a macro to define the same logic for
Expand Down
Loading
Loading