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

Major update #19

Merged
merged 28 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
25 changes: 9 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:
os: [ubuntu-22.04, windows-latest]
build: [Release]
arch: [x86, x64]
cxx: [g++, clang++-16, ClangCl, v143]
cxx: [g++, clang++-17, ClangCl, v143]
feature: [
[NoSIMD, 16, ' ', ' '],
[SSE, 16, '-msse', '/arch:SSE'],
[NoSIMD, 16, ' ', '/arch:IA32'],
[SSE2, 16, '-msse2', '/arch:SSE2'],
[SSE3, 16, '-msse3', '<not available on msvc>'],
[SSSE3, 16, '-mssse3', '<not available on msvc>'],
Expand All @@ -34,11 +33,8 @@ jobs:
- os: windows-latest
cxx: g++
- os: windows-latest
cxx: clang++-16
cxx: clang++-17

- arch: x64
cxx: ClangCl
feature: [SSE, 16, '-msse', '/arch:SSE']
- arch: x64
cxx: ClangCl
feature: [SSE2, 16, '-msse2', '/arch:SSE2']
Expand Down Expand Up @@ -68,9 +64,6 @@ jobs:
cxx: ClangCl
feature: [SSE4.2, 16, '-msse4.2', '<not available on msvc>']

- arch: x64
cxx: v143
feature: [SSE, 16, '-msse', '/arch:SSE']
- arch: x64
cxx: v143
feature: [SSE2, 16, '-msse2', '/arch:SSE2']
Expand Down Expand Up @@ -106,8 +99,8 @@ jobs:
include:
- cxx: g++
c: gcc
- cxx: clang++-16
c: clang-16
- cxx: clang++-17
c: clang-17
- os: ubuntu-22.04
arch: x86
cmake_args: "-DCMAKE_CXX_FLAGS=-m32"
Expand All @@ -133,13 +126,13 @@ jobs:
sudo apt update
sudo apt install g++-multilib

- if: matrix.cxx == 'clang++-16'
name: Installing Clang 16
- if: matrix.cxx == 'clang++-17'
name: Installing Clang 17
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
sudo apt update
sudo apt install clang-16
sudo apt install clang-17

- if: matrix.os == 'ubuntu-22.04'
name: Configure (Linux)
Expand Down
16 changes: 11 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.24)
cmake_minimum_required(VERSION 3.28)
project(LangulusSIMD
VERSION 1.0.0
DESCRIPTION "Langulus SIMD templates layer based on SIMDe library"
Expand All @@ -13,16 +13,16 @@ if(PROJECT_IS_TOP_LEVEL OR NOT LANGULUS)
include(LangulusUtilities.cmake)

# Add Langulus::Core/Logger/RTTI libraries
fetch_langulus_module(Core GIT_TAG 828bd2400b3f58069cdde28d8b189ed915069ad6)
fetch_langulus_module(Logger GIT_TAG a4fb95beb9ba95ca7d4b4b69cb0de9448bce7862)
fetch_langulus_module(RTTI GIT_TAG a6cc1d97a067c5a2014d258805165465ee311050)
fetch_langulus_module(Core GIT_TAG 393d95b6ab13fc5846bda8a3044e4ca62f02fd5a)
fetch_langulus_module(Logger GIT_TAG 69626cd4c738195df0929a1cd867317422506e61)
fetch_langulus_module(RTTI GIT_TAG 4184bde5e28d0bb00d12a9f4a3b1d2a49d0ca312)
endif()

# Configure SIMDe library
fetch_external_module(
SIMDe
GIT_REPOSITORY https://github.com/simd-everywhere/simde.git
GIT_TAG 5e7c4d4ec10855ebe8f19af8a80fdfa26caad5e9 # master branch
GIT_TAG f47e3c5c9ecbea85b4f802e07feebab113c837cd #master
)

# Build and install SIMD library
Expand All @@ -31,6 +31,12 @@ add_library(LangulusSIMD ${LANGULUS_LIBRARY_TYPE}
$<TARGET_OBJECTS:LangulusRTTI>
)

if(MSVC)
# Some SVML functions seem to be broken on x86 MSVC builds
# See https://github.com/simd-everywhere/simde/issues/1111
target_compile_options(LangulusSIMD INTERFACE -DSIMDE_X86_SVML_NO_NATIVE)
endif()

target_include_directories(LangulusSIMD
PUBLIC include
$<TARGET_PROPERTY:LangulusLogger,INTERFACE_INCLUDE_DIRECTORIES>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2024 Dimo Markov
Copyright (c) 2019 Dimo Markov <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions LangulusUtilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ function(fetch_external_module NAME GIT_REPOSITORY REPO GIT_TAG TAG)
SOURCE_DIR "${LANGULUS_EXTERNAL_DIRECTORY}/${NAME}-src"
SUBBUILD_DIR "${CMAKE_BINARY_DIR}/external/${NAME}-subbuild"
${ARGN}
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(${NAME})

string(TOLOWER ${NAME} LOWERCASE_NAME)
set(${NAME}_SOURCE_DIR "${${LOWERCASE_NAME}_SOURCE_DIR}" CACHE INTERNAL "")
set(${NAME}_BINARY_DIR "${${LOWERCASE_NAME}_BINARY_DIR}" CACHE INTERNAL "")
set(${NAME}_SOURCE_DIR "${${LOWERCASE_NAME}_SOURCE_DIR}" CACHE INTERNAL "${NAME} source directory")
set(${NAME}_BINARY_DIR "${${LOWERCASE_NAME}_BINARY_DIR}" CACHE INTERNAL "${NAME} binary directory")
endfunction()
48 changes: 23 additions & 25 deletions include/SIMD/SIMD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,32 @@
/// Copyright (c) 2019 Dimo Markov <[email protected]>
/// Part of the Langulus framework, see https://langulus.com
///
/// Distributed under GNU General Public License v3+
/// See LICENSE file, or https://www.gnu.org/licenses
/// SPDX-License-Identifier: MIT
///
#pragma once
#include "../../source/Load.hpp"
#include "../../source/SetGet.hpp"
#include "../../source/Fill.hpp"
#include "../../source/Convert.hpp"
#include "../../source/Store.hpp"
#include "../../source/Attempt.hpp"

#include "../../source/Abs.hpp"
#include "../../source/Add.hpp"
#include "../../source/Bitmask.hpp"
#include "../../source/Ceil.hpp"
#include "../../source/Divide.hpp"
#include "../../source/Equals.hpp"
#include "../../source/EqualsOrGreater.hpp"
#include "../../source/EqualsOrLesser.hpp"
#include "../../source/Floor.hpp"
#include "../../source/Greater.hpp"
#include "../../source/Lesser.hpp"
#include "../../source/Log.hpp"
#include "../../source/Max.hpp"
#include "../../source/Min.hpp"
#include "../../source/Multiply.hpp"
#include "../../source/Pow.hpp"
#include "../../source/Round.hpp"
#include "../../source/ShiftLeft.hpp"
#include "../../source/ShiftRight.hpp"
#include "../../source/Subtract.hpp"
#include "../../source/XOr.hpp"
#include "../../source/unary/Abs.hpp"
#include "../../source/unary/Floor.hpp"
#include "../../source/unary/Ceil.hpp"
#include "../../source/unary/Round.hpp"

#include "../../source/binary/Add.hpp"
#include "../../source/binary/Divide.hpp"
#include "../../source/binary/Equals.hpp"
#include "../../source/binary/EqualsOrGreater.hpp"
#include "../../source/binary/EqualsOrLesser.hpp"
#include "../../source/binary/Greater.hpp"
#include "../../source/binary/Lesser.hpp"
#include "../../source/binary/Log.hpp"
#include "../../source/binary/Max.hpp"
#include "../../source/binary/Min.hpp"
#include "../../source/binary/Multiply.hpp"
#include "../../source/binary/Pow.hpp"
#include "../../source/binary/ShiftLeft.hpp"
#include "../../source/binary/ShiftRight.hpp"
#include "../../source/binary/Subtract.hpp"
#include "../../source/binary/XOr.hpp"
101 changes: 0 additions & 101 deletions source/Abs.hpp

This file was deleted.

Loading