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

Simd everywhere except in this repo #25

Closed
wants to merge 5 commits into from
Closed
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
7 changes: 4 additions & 3 deletions .github/actions/flatpak-builder-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ runs:
exit $exit_code
fi

for ((i = 0 ; i < $(echo $ret | jq '.warnings | length') ; i++)); do
n_warnings=$(echo $ret | jq '.warnings | length')
for ((i = 0 ; i < n_warnings ; i++)); do
warning=$(echo $ret | jq ".warnings[$i]")
echo "::warning::$warning found in the Flatpak ${{ inputs.artifact }}"
done

n_errors=$(echo $ret | jq '.errors | length')
for ((i = 0 ; i < $n_errors ; i++)); do
for ((i = 0 ; i < n_errors ; i++)); do
error=$(echo $ret | jq ".errors[$i]")
echo "::error::$error found in the Flatpak ${{ inputs.artifact }}"
done

[[ $n_errors == 0 ]] || exit 2
[[ -z $n_errors || $n_errors == 0 ]] || exit 2
1 change: 1 addition & 0 deletions .github/scripts/utils.zsh/setup_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ sudo apt-get install -y --no-install-recommends \
libgl1-mesa-dev \
libjansson-dev \
uthash-dev \
libsimde-dev \
libluajit-5.1-dev python3-dev \
libx11-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-xinerama0-dev \
libxcb-composite0-dev libxinerama-dev libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev \
Expand Down
1 change: 1 addition & 0 deletions build-aux/com.obsproject.Studio.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"modules/50-vpl-gpu-rt.json",
"modules/90-asio.json",
"modules/90-nlohmann-json.json",
"modules/90-simde.json",
"modules/90-uthash.json",
"modules/90-websocketpp.json",
"modules/99-cef.json",
Expand Down
16 changes: 16 additions & 0 deletions build-aux/modules/90-simde.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "simde",
"buildsystem": "meson",
"builddir": true,
"config-opts": [
"-Dtests=false"
],
"sources": [
{
"type": "git",
"url": "https://github.com/simd-everywhere/simde.git",
"tag": "v0.8.2",
"commit": "71fd833d9666141edcd1d3c109a80e228303d8d7"
}
]
}
20 changes: 10 additions & 10 deletions buildspec.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"dependencies": {
"prebuilt": {
"version": "2024-05-08",
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
"version": "2024-07-09",
"baseUrl": "https://github.com/tytan652/obs-deps/releases/download",
"label": "Pre-Built obs-deps",
"hashes": {
"macos-universal": "da3167a3efecfa67dd72e4f2b7964c3456d74c639d4c62aa21ec300ebd5007a8",
"windows-x64": "773c87a0d173125ef2768aaca6f6de64a7d6053213cc9f7d3970a301152042d8",
"windows-x86": "8f4bc6b37acbabe5434e7ebce3bbc8a213d6c265cd7b4e708cd17ca4aa334130"
"macos-universal": "995cf28386c3c7fa9c23ccfc1aa57d13bea26e7701e1f4c98d46026e59384b60",
"windows-x64": "7b6d06101e034ff123f0845c7668ca39e86ff0405569bb74e747dc90fc8f7e77",
"windows-x86": "d19629f8ccdff8c400a70dec1fa68f161275b56d3f8d94696a404fa753d6fe48"
}
},
"qt6": {
"version": "2024-05-08",
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
"version": "2024-07-09",
"baseUrl": "https://github.com/tytan652/obs-deps/releases/download",
"label": "Pre-Built Qt6",
"hashes": {
"macos-universal": "248fb342e7ddf574af0960aaedeffb832deda1485dc81583302646e979593a6e",
"windows-x64": "8f459af5115ce081ae24b108712327e113893f250e14a902b1bd188b43873ed1"
"macos-universal": "2e388bfc74671e3080fd82f7476d0b9f4e0926a3f6337983666f42407914a782",
"windows-x64": "a47a22a1d1fa962d55d4a4642c407491760d688961e34b44840b50d332fa77ca"
},
"debugSymbols": {
"windows-x64": "e4bc882f23195becbe53f1594fe75bdb9ff4f1d01e319f6caf8e0a38000cb42b"
"windows-x64": "91263bd2a372cc8143b3fabb9a774d22fa433428c0b77be1f0e00eec8fd8bd40"
}
},
"cef": {
Expand Down
8 changes: 8 additions & 0 deletions cmake/common/helpers_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,14 @@ function(target_export target)
DESTINATION "${package_destination}"
COMPONENT Development
${exclude_variant})

if(target STREQUAL libobs)
install(
FILES "${CMAKE_SOURCE_DIR}/cmake/finders/FindSIMDE.cmake"
DESTINATION "${package_destination}/finders"
COMPONENT Development
${exclude_variant})
endif()
endfunction()

# check_uuid: Helper function to check for valid UUID
Expand Down
96 changes: 96 additions & 0 deletions cmake/finders/FindSIMDE.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#[=======================================================================[.rst
FindSIMDE
-------

FindModule for SIMD Everywhere

Imported Targets
^^^^^^^^^^^^^^^^

.. versionadded:: 3.0

This module defines the :prop_tgt:`IMPORTED` target ``SIMDE::SIMDE``.

Result Variables
^^^^^^^^^^^^^^^^

This module sets the following variables:

``SIMDE_FOUND``
True, if headers were found.
``SIMDE_VERSION``
Detected version of found SIMDE Everywhere.

Cache variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``SIMDE_INCLUDE_DIR``
Directory containing ``simde/simde-common.h``.

#]=======================================================================]

# cmake-format: off
# cmake-lint: disable=C0103
# cmake-lint: disable=C0301
# cmake-format: on

include(FindPackageHandleStandardArgs)

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_search_module(PC_SIMDE QUIET simde)
endif()

find_path(
SIMDE_INCLUDE_DIR
NAMES simde/simde-common.h
HINTS ${PC_SIMDE_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include
DOC "SIMD Everywhere include directory")

if(EXISTS "${SIMDE_INCLUDE_DIR}/simde/simde-common.h")
file(STRINGS "${SIMDE_INCLUDE_DIR}/simde/simde-common.h" _version_string
REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$")

string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}")
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}")
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _version_release "${_version_string}")

set(SIMDE_VERSION "${_version_major}.${_version_minor}.${_version_release}")
unset(_version_major)
unset(_version_minor)
unset(_version_release)
else()
if(NOT SIMDE_FIND_QUIETLY)
message(AUTHOR_WARNING "Failed to find SIMD Everywhere version.")
endif()
set(SIMDE_VERSION 0.0.0)
endif()

if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows")
set(AMF_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.")
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|FreeBSD")
set(AMF_ERROR_REASON "Ensure SIMD Everywhere is available in local library paths.")
endif()

find_package_handle_standard_args(
SIMDE
REQUIRED_VARS SIMDE_INCLUDE_DIR
VERSION_VAR SIMDE_VERSION REASON_FAILURE_MESSAGE "${SIMDE_ERROR_REASON}")
mark_as_advanced(SIMDE_INCLUDE_DIR)
unset(SIMDE_ERROR_REASON)

if(SIMDE_FOUND)
if(NOT TARGET SIMDE::SIMDE)
add_library(SIMDE::SIMDE INTERFACE IMPORTED)
set_target_properties(SIMDE::SIMDE PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${SIMDE_INCLUDE_DIR}")
endif()
endif()

include(FeatureSummary)
set_package_properties(
SIMDE PROPERTIES
URL "https://github.com/simd-everywhere/simde"
DESCRIPTION "Implementations of SIMD instruction sets for systems which don't natively support them. ")
35 changes: 2 additions & 33 deletions libobs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ legacy_check()

include(cmake/obs-version.cmake)

find_package(SIMDE REQUIRED)
find_package(Threads REQUIRED)

# cmake-format: off
Expand Down Expand Up @@ -142,24 +143,6 @@ target_sources(
util/util_uint128.h
util/util_uint64.h)

target_sources(
libobs
PRIVATE # cmake-format: sortable
util/simde/check.h
util/simde/debug-trap.h
util/simde/hedley.h
util/simde/simde-align.h
util/simde/simde-arch.h
util/simde/simde-common.h
util/simde/simde-constify.h
util/simde/simde-detect-clang.h
util/simde/simde-diagnostic.h
util/simde/simde-features.h
util/simde/simde-math.h
util/simde/x86/mmx.h
util/simde/x86/sse.h
util/simde/x86/sse2.h)

target_sources(
libobs
PRIVATE # cmake-format: sortable
Expand Down Expand Up @@ -260,7 +243,7 @@ target_link_libraries(
jansson::jansson
Uthash::Uthash
ZLIB::ZLIB
PUBLIC Threads::Threads)
PUBLIC SIMDE::SIMDE Threads::Threads)

if(OS_WINDOWS)
include(cmake/os-windows.cmake)
Expand Down Expand Up @@ -354,20 +337,6 @@ set(public_headers
util/profiler.h
util/profiler.hpp
util/serializer.h
util/simde/check.h
util/simde/debug-trap.h
util/simde/hedley.h
util/simde/simde-align.h
util/simde/simde-arch.h
util/simde/simde-common.h
util/simde/simde-constify.h
util/simde/simde-detect-clang.h
util/simde/simde-diagnostic.h
util/simde/simde-features.h
util/simde/simde-math.h
util/simde/x86/mmx.h
util/simde/x86/sse.h
util/simde/x86/sse2.h
util/sse-intrin.h
util/task.h
util/text-lookup.h
Expand Down
3 changes: 3 additions & 0 deletions libobs/cmake/libobsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

include(CMakeFindDependencyMacro)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/finders")

if(MSVC)
find_dependency(w32-pthreads REQUIRED)
endif()
find_dependency(SIMDE REQUIRED)
find_dependency(Threads REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
Expand Down
3 changes: 0 additions & 3 deletions libobs/util/simde/.clang-format

This file was deleted.

40 changes: 0 additions & 40 deletions libobs/util/simde/LICENSE.simde

This file was deleted.

6 changes: 0 additions & 6 deletions libobs/util/simde/README.libobs

This file was deleted.

Loading
Loading