Git Product home page Git Product logo

eve's Introduction

EVE - the Expressive Vector Engine

Licence Discord

Purpose

EVE is a re-implementation of the old EVE SIMD library by Falcou et al. which for a while was named Boost.SIMD. It's a C++20 and onward implementation of a type based wrapper around SIMD extensions sets for most current architectures. It aims at showing how C++20 can be used to design and implement efficient, low level, high abstraction library suited for high performances.

It's a research project first and an open source library second. We reserve the right to change API and baseline compiler required until the first official 0.1 release. However, we'll try to minimize disruption. Semantic versioning will ensure API retro-compatibility if anything huge needs to change.

Getting Started

Video materials

SIMD in C++20: EVE of a new Era - CppCon 2021

SIMD in C++20: EVE of a new Era - CppCon 2021

SIMD Algorithms Design

Playlist by Denis Yaroshevskiy

Current status - Operationnal

EVE is considered operationnal: it's usable, has a large feature sets for a sensible amount of instructions sets but it's possible some values or performances issues may still remain. Don't hesitate to report any funky code-gen or bad optimizations so we can deliver the best performance around.

Current roster of supported Instructions Sets

In term of SIMD extension sets, we actively supports (ie code is optimized and regularly tested) the following:

Full support with tests:

  • Intel
    • SSE2, SSSE3, SSE3, SSE4.1, SSE4.2
    • AVX, AVX2, FMA3
    • AVX512 in SKylake-AVX512 mode (F, CD, VL, DQ, BW)
  • ARM
    • NEON A32 (64 & 128 bits)
    • NEON A64 (64 & 128 bits)
    • ASIMD
    • SVE with fixed sizes of 128, 256 and 512 bits registers.

Partial/In-progress support with minimal checks:

  • PowerPC
    • VMX
    • VSX

We do not support ARM SVE with dynamic size nor GPGPU, this is the job for another tool.

Current roster of supported compiler

EVE requires a C++ 20 compliant compiler. The main features from C++17/20 we require are:

  • Concepts and requires
  • Template lambdas
  • Inline variables
  • Non-Type Template Parameters
  • if constexpr
  • Functions from <bits>

Here is the current minimal compiler version supported:

Compiler Version
g++ 11 or above
clang++ 13 or above
Visual Studio TBD

Visual Studio support is currently being added. Help on the front of setting up appveyor properly is also welcome.

FAQ

  • Why C++20 ? Because we want to be able to use modern design components like Concepts, and later on, Modules. C++14 is for 2014. We fully know it may hinders adoption in some situation, but we're not running a race. We value proper design and API choice over complex retro-compatibility.

  • Why this instead of std::simd or any other libraries? EVE is a playground for testing proper design and implementation decisions for such libraries. Vc and its standard version are fine pieces of work but we aim at pushing the envelope in term of API and implementation without any standard restriction. We will try, however, to keep up with standard naming as much as possible.

  • Is this Boost.SIMD v42.69? Yes and no. This reimplementation is based on slightly different premises and some radical new ideas. All results exhibited by all our previous Boost.SIMD papers still hold and we'll try to improve upon.

  • I want to help! Good, we need tests on exotic configuration, maybe a stable PPC test machine. Write code, make it fail so we can improve for use cases we may have missed. Fork and hack away. We would also value input (even harsh ones) on how we use our CI infrastructure or how our CMake looks. We tried our best but those elements are complex all by themselves.

Bibliographic References

If you want to refer to EVE, you can currently use those papers (by order of preference in citation). A new, more up-to-date EVE specific journal paper is in the work atm.

  • Modern Generative Programming for Optimizing Small Matrix-Vector Multiplication, Jules Penuchot, Joel Falcou, Amal Khabou in HPCS 2018
  • Boost. simd: generic programming for portable simdization, Pierre Estérie, Joel Falcou, Mathias Gaunard, Jean-Thierry Lapresté, PACT 2012
  • EVE, an object oriented SIMD library, Joel Falcou, Jocelyn Serot in Scalable Computing: Practice and Experience 6 (4)

License

Boost Software License

Copyright : EVE Project Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

eve's People

Contributors

aguinet avatar chriselrod avatar denisyaroshevskiy avatar dpronin avatar hadrieng2 avatar jfalcou avatar jpenuchot avatar jtlap avatar justend29 avatar leha-bot avatar orao avatar panhaolin2001 avatar pauljurczak avatar simran-b avatar the-moisrex avatar toughengineer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eve's Issues

AVX2 equality comparison splits register in 2

After dissambing, found an issue:

Funciton:

auto test(eve::wide<char, eve::fixed<32>> x,
          eve::wide<char, eve::fixed<32>> y) {
  return x == y;
}

Assembly:

	vpcmpeqb	xmm2, xmm0, xmm1
	vextracti128	xmm0, ymm0, 1
	vextracti128	xmm1, ymm1, 1
	vpcmpeqb	xmm0, xmm0, xmm1
	vinserti128	ymm0, ymm2, xmm0, 1
	ret

Expected:

vpcmpeqb        ymm0, ymm0, ymm1

Compiler options:

clang++ -std=c++17 -O3 -DEVE_DISABLE_ASSERTS  -march=native

power

power works fine in avx2 and works all the way. But it has to be benched more thoroghly (in ssse4 for instance) to see if a convert from wide raw method to wide result + limits handling will not be faster than the direct implementation.

as_ status is unclear

multiple points:

  • [x ] Use as<T>()in place of as_<T>{} calls
  • we must provide shortcuts for specific type markup like single_, uchar_ etc...

saturate

bitwise_cast and wide_cast have the syntax xxx_cast(x,as())
saturate has saturate(as(),x)
perhaps we must change saturate parameter order to be consistent

scalaire pur

faut-il pouvoir tester eve sans aucun simd et si oui comment ?

negate negatenz

these functions had been forgotten and but be implemented

Support AVX512

New plan of actions:

  • Add support for detecting AVX512* ABI and related register type
  • Adapt logical to AVX512 types
  • Adapt internal operators
  • Optimize other functions

enforce_precision

g++-9 seems to have a flaw with combined -mavx2 and -mfma options that produce fast-math like
over-optimization as (x-c)+c evaluation to x in floating point computation.

this behaviour is like ub sensitive to code displacement or insered write orders and disappear with debug option

g++10 pb with avx2 fma

big_(sincos) simd have failures that only appear and not on all systems with -mfma -mavx2 for double.
Is it a compiler pb ? The failure seems difficult to isolate and write orders in the code often makes
it disappear.

Implement element_type

element_type<T> is value_type_t<T> except for types like logical and complex where it's identity

Eve doesn't disable asserts on clang -O3

I don't exaclty know how, but:

Given code:

using wide = eve::wide<char, eve::fixed<32>>;
eve::aligned_ptr<char, alignof(wide)> test(char* s) {
  return {s};
}

When I compile with:

clang++ -std=c++17 -O3  -march=native

I get

.L_Z4testPc$local:
	.cfi_startproc
# %bb.0:
	push	rax
	.cfi_def_cfa_offset 16
	mov	rsi, rdi
	mov	rdi, rsp
	call	_ZN3eve11aligned_ptrIcLm32EEC2EPc
	mov	rax, qword ptr [rsp]
	pop	rcx
	.cfi_def_cfa_offset 8
	ret
.Lfunc_end0:
... # lots of code with iostream

When I pass

clang++ -std=c++17 -DNDEBUG -O3  -march=native 

I get

.L_Z4testPc$local:
	.cfi_startproc
# %bb.0:
	mov	rax, rdi
	ret

which is what I'd expect.

Same for

clang++ -std=c++17 -DEVE_DISABLE_ASSERTS -O3  -march=native 

Could be a clang bug I don't know but still.

logical and bool

It will be good to add two overload to each of the binary logical operators logical_xxx, between a logical/bool and bool/logical

check() doesn't play nice with decorated functions

Apparently, the decoration mechanism has been implemented in a certain way while it was thought to be done otherwise. This leads to check() not interacting properly with decorated functions.

This needs to be solved without changing the semantic of decoration w/r to conditional functions

Implement `is_nez`

is_nez is is_not_equal(x,0) for arithmetic types and identity for logical

Issues when starting

Tried to do the setup:

Docs ==========================================
The big one at the moment is that docs are not readable as a generated web-page.
Read some top ones as markdown, looked through references

Potential typos

2 times scalar_value:

family if it satisfies the [scalar_value](reference/concepts.html#simd_value).

17 and forward?

**EVE** is a C++20 and forward implementation of a type based wrapper around for SIMD computations. It wraps SIMD instruction sets for most current architectures. It aims at showing how C++20 can be used to design and implement efficient, low level, high abstraction library suited for high performances.

Do you want to maybe add how to run tests?

Building library/verifying tests

cmake -G Ninja -DEVE_BUILD_TEST ..
Parse error in command line argument: -DEVE_BUILD_TEST
Should be: VAR:type=value
CMake Error: No cmake script provided.
CMake Error: Problem processing arguments. Aborting.

dyarosh@dyarosh-u:~/space/eve/build$ cmake -G Ninja  ..
-- The CXX compiler identification is Clang 11.0.0
-- Check for working CXX compiler: /usr/local/bin/clang++
-- Check for working CXX compiler: /usr/local/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [eve] Building  mode with: 
-- Found OpenMP_CXX: -fopenmp=libomp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dyarosh/space/eve/build/tts-download
-- Found OpenMP_CXX: -fopenmp=libomp (found version "4.5") 
-- [tts] TTS is used as a in-project dependency - No install targets available
-- [eve] Boost found in /usr/include - Boost dependent tests activated
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dyarosh/space/eve/build
dyarosh@dyarosh-u:~/space/eve/build$ ninja -j 8 tests
[12/16123] Building CXX object tts-build/src/CMakeFiles/tts.dir/info.cpp.o
FAILED: tts-build/src/CMakeFiles/tts.dir/info.cpp.o 
/usr/local/bin/clang++  -DTTS_API_EXPORTS=1 -Dtts_EXPORTS -Itts-src/include -Itts-src/src -fPIC   -Wall -fvisibility=hidden -std=gnu++17 -MD -MT tts-build/src/CMakeFiles/tts.dir/info.cpp.o -MF tts-build/src/CMakeFiles/tts.dir/info.cpp.o.d -o tts-build/src/CMakeFiles/tts.dir/info.cpp.o -c tts-src/src/info.cpp
tts-src/src/info.cpp:16:10: fatal error: 'filesystem' file not found
#include <filesystem>
         ^~~~~~~~~~~~
1 error generated.
[19/16123] Building CXX object tts-build/src/CMakeFiles/tts.dir/args.cpp.o
ninja: build stopped: subcommand failed.

filesystem was not found. I have file system in libc++ .

Unfortunately, the best I could find in terms of building with libc++ was:
cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ ..
Which breaks spy

dyarosh@dyarosh-u:~/space/eve/build$ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ ..
-- [eve] Building  mode with: -stdlib=libc++
-- Found OpenMP_CXX: -fopenmp=libomp  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dyarosh/space/eve/build/tts-download
-- Found OpenMP_CXX: -fopenmp=libomp  
-- [tts] TTS is used as a in-project dependency - No install targets available
-- [eve] Boost found in /usr/include - Boost dependent tests activated
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dyarosh/space/eve/build
dyarosh@dyarosh-u:~/space/eve/build$ ninja -j 8 tests
[1/16123] Building CXX object test/doc/constant/CMakeFiles/doc.constant.valmin.unit.dir/valmin.cpp.o
FAILED: test/doc/constant/CMakeFiles/doc.constant.valmin.unit.dir/valmin.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/constant/CMakeFiles/doc.constant.valmin.unit.dir/valmin.cpp.o -MF test/doc/constant/CMakeFiles/doc.constant.valmin.unit.dir/valmin.cpp.o.d -o test/doc/constant/CMakeFiles/doc.constant.valmin.unit.dir/valmin.cpp.o -c ../test/doc/constant/valmin.cpp
In file included from ../test/doc/constant/valmin.cpp:1:
In file included from ../include/eve/constant/valmin.hpp:13:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
[2/16123] Building CXX object test/doc/core/CMakeFiles/doc.core.sqrt.unit.dir/sqrt.cpp.o
FAILED: test/doc/core/CMakeFiles/doc.core.sqrt.unit.dir/sqrt.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/core/CMakeFiles/doc.core.sqrt.unit.dir/sqrt.cpp.o -MF test/doc/core/CMakeFiles/doc.core.sqrt.unit.dir/sqrt.cpp.o.d -o test/doc/core/CMakeFiles/doc.core.sqrt.unit.dir/sqrt.cpp.o -c ../test/doc/core/sqrt.cpp
In file included from ../test/doc/core/sqrt.cpp:1:
In file included from ../include/eve/function/sqrt.hpp:14:
In file included from ../include/eve/function/definition/sqrt.hpp:14:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
[3/16123] Building CXX object test/doc/core/CMakeFiles/doc.core.tofloat.unit.dir/tofloat.cpp.o
FAILED: test/doc/core/CMakeFiles/doc.core.tofloat.unit.dir/tofloat.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/core/CMakeFiles/doc.core.tofloat.unit.dir/tofloat.cpp.o -MF test/doc/core/CMakeFiles/doc.core.tofloat.unit.dir/tofloat.cpp.o.d -o test/doc/core/CMakeFiles/doc.core.tofloat.unit.dir/tofloat.cpp.o -c ../test/doc/core/tofloat.cpp
In file included from ../test/doc/core/tofloat.cpp:1:
In file included from ../include/eve/function/tofloat.hpp:14:
In file included from ../include/eve/function/definition/tofloat.hpp:14:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
[4/16123] Building CXX object test/doc/core/CMakeFiles/doc.core.sub.unit.dir/sub.cpp.o
FAILED: test/doc/core/CMakeFiles/doc.core.sub.unit.dir/sub.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/core/CMakeFiles/doc.core.sub.unit.dir/sub.cpp.o -MF test/doc/core/CMakeFiles/doc.core.sub.unit.dir/sub.cpp.o.d -o test/doc/core/CMakeFiles/doc.core.sub.unit.dir/sub.cpp.o -c ../test/doc/core/sub.cpp
In file included from ../test/doc/core/sub.cpp:1:
In file included from ../include/eve/function/sub.hpp:14:
In file included from ../include/eve/function/definition/sub.hpp:13:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
[5/16123] Building CXX object test/doc/core/CMakeFiles/doc.core.toint.unit.dir/toint.cpp.o
FAILED: test/doc/core/CMakeFiles/doc.core.toint.unit.dir/toint.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/core/CMakeFiles/doc.core.toint.unit.dir/toint.cpp.o -MF test/doc/core/CMakeFiles/doc.core.toint.unit.dir/toint.cpp.o.d -o test/doc/core/CMakeFiles/doc.core.toint.unit.dir/toint.cpp.o -c ../test/doc/core/toint.cpp
In file included from ../test/doc/core/toint.cpp:1:
In file included from ../include/eve/function/toint.hpp:14:
In file included from ../include/eve/function/definition/toint.hpp:14:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
[6/16123] Building CXX object test/doc/core/CMakeFiles/doc.core.ulpdist.unit.dir/ulpdist.cpp.o
FAILED: test/doc/core/CMakeFiles/doc.core.ulpdist.unit.dir/ulpdist.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/core/CMakeFiles/doc.core.ulpdist.unit.dir/ulpdist.cpp.o -MF test/doc/core/CMakeFiles/doc.core.ulpdist.unit.dir/ulpdist.cpp.o.d -o test/doc/core/CMakeFiles/doc.core.ulpdist.unit.dir/ulpdist.cpp.o -c ../test/doc/core/ulpdist.cpp
In file included from ../test/doc/core/ulpdist.cpp:1:
In file included from ../include/eve/function/ulpdist.hpp:14:
In file included from ../include/eve/function/definition/ulpdist.hpp:14:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
[7/16123] Building CXX object test/doc/core/CMakeFiles/doc.core.trunc.unit.dir/trunc.cpp.o
FAILED: test/doc/core/CMakeFiles/doc.core.trunc.unit.dir/trunc.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/core/CMakeFiles/doc.core.trunc.unit.dir/trunc.cpp.o -MF test/doc/core/CMakeFiles/doc.core.trunc.unit.dir/trunc.cpp.o.d -o test/doc/core/CMakeFiles/doc.core.trunc.unit.dir/trunc.cpp.o -c ../test/doc/core/trunc.cpp
In file included from ../test/doc/core/trunc.cpp:1:
In file included from ../include/eve/function/trunc.hpp:14:
In file included from ../include/eve/function/definition/trunc.hpp:14:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
[8/16123] Building CXX object test/doc/core/CMakeFiles/doc.core.tanh.unit.dir/tanh.cpp.o
FAILED: test/doc/core/CMakeFiles/doc.core.tanh.unit.dir/tanh.cpp.o 
/usr/local/bin/clang++   -Itts-src/include -I../test -I../include -stdlib=libc++   -std=c++17 -Wall -Wno-missing-braces -MD -MT test/doc/core/CMakeFiles/doc.core.tanh.unit.dir/tanh.cpp.o -MF test/doc/core/CMakeFiles/doc.core.tanh.unit.dir/tanh.cpp.o.d -o test/doc/core/CMakeFiles/doc.core.tanh.unit.dir/tanh.cpp.o -c ../test/doc/core/tanh.cpp
In file included from ../test/doc/core/tanh.cpp:1:
In file included from ../include/eve/function/tanh.hpp:14:
In file included from ../include/eve/function/definition/tanh.hpp:14:
In file included from ../include/eve/detail/overload.hpp:14:
In file included from ../include/eve/arch/spec.hpp:15:
In file included from ../include/eve/arch/x86/spec.hpp:14:
In file included from ../include/eve/arch/x86/predef.hpp:45:
../include/eve/detail/spy.hpp:465:31: error: no template named 'stdcpp_t' in namespace 'spy::detail'
  using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
                      ~~~~~~~~^
../include/eve/detail/spy.hpp:475:20: error: unknown type name 'stdlib_type'
  constexpr inline stdlib_type stdlib;
                   ^
../include/eve/detail/spy.hpp:480:45: error: no return statement in constexpr function
  inline constexpr stdlib_info<SLIB,M,N,P>::operator bool() const noexcept
                                            ^
3 errors generated.
ninja: build stopped: subcommand failed.

what remains to do to achieve a first step ?

TO REMOVE DEFINITIVELY:
bitfloating.hpp
compare_equal.hpp
compare_greater_equal.hpp
compare_greater.hpp
compare_less_equal.hpp
compare_less.hpp
compare_not_equal.hpp
divides.hpp
enumerate.hpp
dot.hpp
fix.hpp
genmaskc.hpp
genmask.hpp
group.hpp
hmsb.hpp
ifix.hpp
if_allbits_else_zero.hpp
if_dec.hpp
if_inc.hpp
if_minus.hpp
if_neg.hpp
ifnot_dec.hpp
ifnot_inc.hpp
ifnot_minus.hpp
ifnot_neg.hpp
ifnot_plus.hpp
if_plus.hpp
if_zero_else_allbits.hpp
ilogb.hpp
insert.hpp
majority.hpp
mask2logical.hpp
minmod.hpp
nearbyint.hpp
neg.hpp
nextpow2.hpp
predecessor.hpp
rem_2pi.hpp
rem_pio2_straight.hpp
remquo.hpp
repeat_lower_half.hpp
repeat_upper_half.hpp
reverse.hpp
sbits.hpp
shift_left.hpp
shift_right.hpp
sincospi.hpp
slide.hpp
split_high.hpp
split.hpp
split_low.hpp
split_multiplies.hpp
successor.hpp
tenpower.hpp <- a fusionner dans exp10
deinterleave_first.hpp
deinterleave_second.hpp
interleave_even.hpp
interleave_first.hpp
interleave_odd.hpp
interleave_second.hpp

REMOVE NOW BUT TO PUT BACK LATER:
bits.hpp
bit_maskc <- a faire plus tard
clz.hpp <- a renommer
ctz.hpp <- a renommer
lexicographical_compare
cotd.hpp
cscd.hpp
cummax.hpp
cummin.hpp
cumprod.hpp
cumsum.hpp
deinterleave.hpp
erfc.hpp
erfcx.hpp
erf.hpp
exprecnegc.hpp
exprecneg.hpp
expx2.hpp
ffs.hpp <- a renommer
fpclassify.hpp
gamma.hpp
gammaln.hpp
hi.hpp
indeg.hpp -> radindeg.hpp
interleave.hpp
lo.hpp
ilog2.hpp <- a renommer
inrad.hpp -> deginrad.hpp
isincluded_c.hpp <- a renommer
isincluded.hpp <- a renommer
safe_max.hpp <- a mettre dans detail
safe_min.hpp <- a mettre dans detail
reversebits.hpp
rol.hpp
ror.hpp
rrol.hpp
rror.hpp
nthroot.hpp
secd.hpp
signbit.hpp
signgam.hpp
sindcosd.hpp <- a renommer
sind.hpp
tand.hpp
significants.hpp <- a renommer
sqrt1pm1.hpp
stirling.hpp
subadd.hpp

KEEP FOR RELEASE:
maximum.hpp
minimum.hpp
prod.hpp
shuffle.hpp
sinc.hpp
sincpi.hpp
sinhc.hpp
sum.hpp

TO INVESTIGATE:
reldist.hpp
swapbytes.hpp

Consolidate aggregator files

Files like arithmetic.hpp need to be cleared up and split if needed in accordance to the documentation.

Orphans files need to be cleaned up too.

we need indexed load and multi extraction syntax w=v[i] for wide v and wide i

indexed load will be useful in the new reduction scheme for trigo

the multi extraction must work this way
if v is of type wide<T,N> and ind of type wide<I,M> containing integers in the range 0..N-1
w=v[i] will return a wide<T,M> vector such that w[j] =v[i[j]] for each j in [0, N-1]

We need :

  • a gather-like load
  • a dynamic shuffle, maybe called lookup?

Loading `aligned_ptr<const T>`

Test case:

TEST_CASE("eve_extra.load_const_aligned_ptr", "[eve_extra]") {
  using wide = eve::wide<char, eve::fixed<16>>;
  alignas(wide) std::array<char, 16> data;
  data.fill(1);

  eve::aligned_ptr<const char, 16> ptr{data.cbegin()};

  auto loaded = eve::load(ptr, eve::as_<wide>{});
  REQUIRE(loaded == wide{1});
}

Error message:

[1/2] Building CXX object src/test/CMakeFiles/tests.dir/eve_extra.t.cc.o
FAILED: src/test/CMakeFiles/tests.dir/eve_extra.t.cc.o 
/usr/local/bin/clang++   -I../src/../../eve/include -I../src/. -O3 -DNDEBUG   -Werror -Wall -Wextra -Wpedantic -Og -g -Wno-unused-parameter -DEVE_DISABLE_ASSERTS -fno-omit-frame-pointer --std=c++17 -stdlib=libc++ -fsanitize=address -march=native -std=gnu++17 -MD -MT src/test/CMakeFiles/tests.dir/eve_extra.t.cc.o -MF src/test/CMakeFiles/tests.dir/eve_extra.t.cc.o.d -o src/test/CMakeFiles/tests.dir/eve_extra.t.cc.o -c ../src/test/eve_extra.t.cc
../src/test/eve_extra.t.cc:115:17: error: no matching function for call to 'load'
  auto loaded = eve::load(ptr, eve::as_<wide>{});
                ^~~~~~~~~
../src/../../eve/include/eve/function/load.hpp:44:24: note: candidate template ignored: deduced conflicting types for parameter 'T' ('const char' vs. 'eve::wide<char, eve::fixed<16>, eve::sse_>')
  EVE_FORCEINLINE auto load(aligned_ptr<T, Align> ptr, as_<T> const &) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:76:24: note: candidate template ignored: deduced conflicting types for parameter 'T' ('const char' vs. 'char')
  EVE_FORCEINLINE auto load(aligned_ptr<T, Align> ptr, as_<wide<T, Size, ABI>> const &) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:38:24: note: candidate template ignored: could not match 'T *' against 'eve::aligned_ptr<const char, 16>'
  EVE_FORCEINLINE auto load(T *ptr, as_<T> const &) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:66:24: note: candidate template ignored: could not match 'T *' against 'eve::aligned_ptr<const char, 16>'
  EVE_FORCEINLINE auto load(T *ptr, as_<wide<T, Size, ABI>> const &) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:84:24: note: candidate template ignored: could not match 'logical<T> *' against 'eve::aligned_ptr<const char, 16>'
  EVE_FORCEINLINE auto load(logical<T> *ptr, as_<logical<wide<T, Size, ABI>>> const &) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:94:24: note: candidate template ignored: could not match 'logical<type-parameter-0-2>' against 'const char'
  EVE_FORCEINLINE auto load(aligned_ptr<logical<T>, Align> ptr,
                       ^
../src/../../eve/include/eve/function/load.hpp:26:24: note: candidate function template not viable: requires single argument 'ptr', but 2 arguments were provided
  EVE_FORCEINLINE auto load(T *ptr) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:32:24: note: candidate function template not viable: requires single argument 'ptr', but 2 arguments were provided
  EVE_FORCEINLINE auto load(aligned_ptr<T, Align> ptr) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:54:24: note: candidate function template not viable: requires single argument 'ptr', but 2 arguments were provided
  EVE_FORCEINLINE auto load(wide<T, Size, ABI> *ptr) noexcept
                       ^
../src/../../eve/include/eve/function/load.hpp:60:24: note: candidate function template not viable: requires single argument 'ptr', but 2 arguments were provided
  EVE_FORCEINLINE auto load(aligned_ptr<wide<T, Size, ABI>> ptr) noexcept
                       ^

why do we stil separate scalar and common ?

Is there still a reason to maintain separate files for scalar and common implementation of most functions ?
More if constexpr could perhaps do the job allowing the suppression of a bunch of include files ?

XOP

si XOP est défini il faut donner une valeur à EVE_HW_X86

rewrite bitwise_select and if_else

the scalar version of bitwise_select is in fact generic and could be displaced.
Once done, if_else common version could be written in terms of bitwise_select

conditional swap

a swap[cond](a,b) would be great.
It seems that could be a shuffle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.