Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring in dev branch to main branch #87

Merged
merged 104 commits into from
Dec 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
624877e
Cleanup runner configs
Rinzii Sep 1, 2024
f450b58
add workflow for automatic formatting with clang-format
Rinzii Sep 1, 2024
28536b3
Setup initial work for pow implementation
Rinzii Sep 1, 2024
389dd21
Setup simd intrinsic wrapper for pow
Rinzii Sep 1, 2024
6cf8c8e
Setup layout for runtime pow
Rinzii Sep 1, 2024
2269a07
Setup layout for runtime pow
Rinzii Sep 1, 2024
b1174e5
Setup layout for runtime pow
Rinzii Sep 1, 2024
a0e64cc
Setup generic for implementation of pow
Rinzii Sep 1, 2024
a148cc0
Apply work around for SVML issues on Linux
Rinzii Sep 1, 2024
87637eb
Add initial work on reworking how sources are added along with major …
Rinzii Oct 18, 2024
f4bb7a5
Add links to project discord and additional badges
Rinzii Oct 18, 2024
95d1a9f
Continue major rewrite of cmake scripts along with significant change…
Rinzii Oct 18, 2024
780778e
Finish major rewrite of cmake script setup
Rinzii Oct 19, 2024
cda8706
Formatting
Rinzii Oct 19, 2024
f051b0e
Final cleanup
Rinzii Oct 19, 2024
1e53230
Simplify header adding function
Rinzii Oct 19, 2024
63fd16b
Bug fixing for intel OneAPI DPC++
Rinzii Oct 19, 2024
012a23a
Revert cmake version to 3.18
Rinzii Oct 19, 2024
143cefa
Major CMake rework (#72)
Rinzii Oct 19, 2024
1337766
Minor cleanup
Rinzii Oct 21, 2024
23e1b4d
Add type-specific optimizations for popcount
Rinzii Oct 21, 2024
0bfd90e
Minor bug fix
Rinzii Oct 21, 2024
d1d6b83
Finalize popcount optimization
Rinzii Oct 22, 2024
406c404
Minor cleanup
Rinzii Oct 30, 2024
979b5ad
Add feature checking for simd
Rinzii Oct 30, 2024
c7022ec
Minor cleanup & bug fixing
Rinzii Oct 30, 2024
8416e90
Fix incorrect abi usage
Rinzii Oct 30, 2024
be0e44f
Minor cleanup
Rinzii Oct 30, 2024
4e67643
Change fenv exception handling to now enforce runtime evaluation
Rinzii Oct 30, 2024
205944f
Add a windows-specific lint script
Rinzii Oct 30, 2024
ab4ae1b
Add cmake specific SVML detection for pow
Rinzii Oct 30, 2024
a6137cd
Add --no-install-recommends to install command
Rinzii Oct 30, 2024
3436be5
Apply multiple adjustments and minor fixes based on linting work alon…
Rinzii Oct 30, 2024
7f80369
Enable color in clang tidy
Rinzii Oct 30, 2024
4488e30
typo
Rinzii Dec 11, 2024
a70b3c6
clang-tidy cleanup
Rinzii Dec 11, 2024
2e352a6
Add major feature validation to cmake scripts
Rinzii Dec 11, 2024
d6ebf91
Major rework of cmake scripts and ci
Rinzii Dec 23, 2024
2511661
Remove explicit setting of appleclang version
Rinzii Dec 23, 2024
f118927
Update licensing to include LLVM licensing
Rinzii Dec 23, 2024
510b9c6
Improve contributing doc
Rinzii Dec 23, 2024
70f6bb3
Increase gtest version
Rinzii Dec 23, 2024
2f4594e
Change folder from scripts to tools
Rinzii Dec 23, 2024
3bad88e
Fix issue where windows builds of clang output a million warnings
Rinzii Dec 23, 2024
208cbaf
Minor adjustments to functionality
Rinzii Dec 24, 2024
5ca8e57
Clean up headers to take advantage of cmake
Rinzii Dec 24, 2024
a8ce844
Minor bug fixes
Rinzii Dec 24, 2024
79471e7
Initial support for benchmarking trunc
Rinzii Dec 24, 2024
0d40a8d
Apply significantly more aggressive warnings
Rinzii Dec 24, 2024
1162cfb
Merge branch 'main' into dev
Rinzii Dec 24, 2024
7e208e4
Minor cleanup
Rinzii Dec 24, 2024
d6441f6
Fix minor bugs
Rinzii Dec 24, 2024
0b0e94f
Disable resharper inspection
Rinzii Dec 24, 2024
96d23cb
Move location of disabled warning macro
Rinzii Dec 24, 2024
67c9fad
Apply possible workaround to SEH issue on runners
Rinzii Dec 24, 2024
1ae6773
Additional fixing of warnings
Rinzii Dec 24, 2024
27ab97a
Additional fixing of warnings
Rinzii Dec 24, 2024
cd2a6bb
Additional debugging of CI SEH exception
Rinzii Dec 24, 2024
04ae858
More additional debugging of CI SEH exception
Rinzii Dec 24, 2024
8cbc6c9
Maintainer is testing things for CI specific SEH exception
Rinzii Dec 24, 2024
78520b6
Troubleshooting CI SEH Exception on sqrt tests
Rinzii Dec 26, 2024
3674a26
Troubleshooting CI SEH Exception on sqrt tests
Rinzii Dec 26, 2024
26ea10c
Adjust dependabot to only update dev
Rinzii Dec 26, 2024
809233e
Troubleshooting CI SEH Exception on sqrt tests
Rinzii Dec 26, 2024
dbcc5b8
More Troubleshooting CI SEH Exception on sqrt tests
Rinzii Dec 26, 2024
4ecf0f0
Allow gtest to debug SEH exceptions with abseil and re2
Rinzii Dec 26, 2024
e0cc964
Minor modernization for CI
Rinzii Dec 27, 2024
1a9a134
Disable usage of AVX512
Rinzii Dec 27, 2024
dd5c0a2
Rename m1 macos ci to better name
Rinzii Dec 27, 2024
0b07d7a
Remove homebrew install as macos-latest has it preinstalled
Rinzii Dec 27, 2024
e668311
Experimental output
Rinzii Dec 27, 2024
f5f06ee
Testing with homebrew
Rinzii Dec 27, 2024
da59201
Check path of ninja
Rinzii Dec 27, 2024
8ad2b0b
Remove path check of ninja
Rinzii Dec 27, 2024
2ea2673
Install cmake also as workaround to path issue
Rinzii Dec 27, 2024
0a2b0fc
Additional work around for issues with cmake
Rinzii Dec 27, 2024
ea47cfa
Additional work around for issues with cmake
Rinzii Dec 27, 2024
df43f6d
Remove step to install homebrew
Rinzii Dec 27, 2024
b83f54b
Fix sym link issue
Rinzii Dec 27, 2024
ff105b0
Enforce Fix sym link issue
Rinzii Dec 27, 2024
13a6c89
For now remove older macos ci
Rinzii Dec 27, 2024
d927593
Begin initial work on simd wrapper rework
Rinzii Dec 27, 2024
b83a1a8
Switch over to improved ccm_add_headers
Rinzii Dec 28, 2024
561ec06
experimental simd
Rinzii Dec 28, 2024
ce5d4b8
experimental compiler flags
Rinzii Dec 28, 2024
88328bc
experimental builtin_fma support
Rinzii Dec 28, 2024
a606a47
return to old name
Rinzii Dec 28, 2024
bfd496d
return to old name
Rinzii Dec 28, 2024
15283eb
Completely remove avx512 support
Rinzii Dec 28, 2024
feff834
Completely remove avx512 support
Rinzii Dec 28, 2024
b4c3a53
Remove builtin checking for now
Rinzii Dec 28, 2024
ddb56da
Bring in starting work of new builtin checking
Rinzii Dec 29, 2024
e110ab5
Bring in starting work of new builtin checking
Rinzii Dec 29, 2024
c7c95c9
Fix missing added sub dir
Rinzii Dec 29, 2024
3fc2bc2
Formatting
Rinzii Dec 29, 2024
dca6633
Bring in builtin detection for all builtins in gcc
Rinzii Dec 29, 2024
9f1943b
Clean up missing headers in cmake
Rinzii Dec 29, 2024
2983062
Bring in new builtin detection system into front face code base
Rinzii Dec 29, 2024
16825a4
Make it so gtests internal implementation details can never trigger o…
Rinzii Dec 29, 2024
112b710
disable static assert on long double nanl due to issues with how clan…
Rinzii Dec 29, 2024
bc83e99
Add support for Clang, NVC++, and Intel DPC++ for builtin detection
Rinzii Dec 29, 2024
d460366
Remove builtin detection with cmake
Rinzii Dec 30, 2024
388e680
Finalize fma
Rinzii Dec 30, 2024
60b433d
Update comparison functions to be more standard conforming
Rinzii Dec 30, 2024
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
22 changes: 18 additions & 4 deletions include/ccmath/internal/math/runtime/pp/simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,28 +176,38 @@ namespace ccm::pp
vectorized_sizeof()
{
if constexpr (!is_vectorizable_v<T>)
{
return 0;
}

if constexpr (sizeof(T) <= 8)
{
// X86:
if constexpr (have_avx2)
{
return 32;
}

if constexpr (have_sse2)
{
return 16;
}

// ARM:
if constexpr (have_neon_a64
|| (have_neon_a32 && !std::is_same_v<T, double>))
{
return 16;
}
if constexpr (have_neon
&& sizeof(T) < 8
// Only allow fp if the user allows non-ICE559 fp (e.g.
// via -ffast-math). ARMv7 NEON fp is not conforming to
// IEC559.
&& (support_neon_float || !std::is_floating_point_v<T>))
{
return 16;
}
}

return sizeof(T);
Expand All @@ -221,10 +231,14 @@ namespace ccm::pp
UsedBytes / sizeof(T) > 1 &&
UsedBytes % sizeof(T) == 0 &&
UsedBytes <= vectorized_sizeof<T>() &&
UsedBytes <= 32)> {};
UsedBytes <= 32)>
{
};

template <typename T>
struct is_valid : std::conjunction<is_valid_abi_tag, is_vectorizable<T>, is_valid_size_for<T>> {};
struct is_valid : std::conjunction<is_valid_abi_tag, is_vectorizable<T>, is_valid_size_for<T> >
{
};

template <typename T>
static constexpr bool is_valid_v = is_valid<T>::value;
Expand Down Expand Up @@ -289,12 +303,12 @@ namespace ccm::pp
// ctors

template <class U>
constexpr basic_simd(U&& value) noexcept
constexpr basic_simd(U && value) noexcept
{
}

template <class U, class UAbi>
constexpr CCM_CPP20_EXPLICIT(true) basic_simd(basic_simd<U, UAbi> const& value) noexcept
constexpr CCM_CPP20_EXPLICIT(true) basic_simd(basic_simd<U, UAbi> const & value) noexcept
Rinzii marked this conversation as resolved.
Show resolved Hide resolved
{
}

Expand Down