Skip to content

Commit f53de47

Browse files
committed
v1.1:
- removed submodule - sse2neon downloaded conditionally on ARM platforms - added CMake for user-friendly integration
1 parent 42f2fd6 commit f53de47

File tree

5 files changed

+36
-10
lines changed

5 files changed

+36
-10
lines changed

Diff for: .clang-format-ignore

-1
This file was deleted.

Diff for: .gitmodules

-5
This file was deleted.

Diff for: CMakeLists.txt

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
include(FetchContent)
4+
5+
file(GLOB MATHLIB_H
6+
"ml.h"
7+
"ml.hlsli"
8+
)
9+
source_group("MathLib" FILES ${MATHLIB_H})
10+
11+
file(GLOB MATHLIB_GUTS "Guts/*")
12+
source_group("MathLib/Guts" FILES ${MATHLIB_GUTS})
13+
14+
set_property(SOURCE "ml.hlsli" PROPERTY VS_SETTINGS "ExcludedFromBuild=true")
15+
16+
add_library(MathLib INTERFACE ${MATHLIB_H} ${MATHLIB_GUTS})
17+
target_include_directories(MathLib INTERFACE .)
18+
set_property(TARGET MathLib PROPERTY FOLDER "MathLib")
19+
20+
# Download sse2neon on ARM
21+
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^arm")
22+
FetchContent_Declare(
23+
sse2neon
24+
GIT_REPOSITORY https://github.com/DLTcollab/sse2neon.git
25+
GIT_TAG master
26+
GIT_SHALLOW 1
27+
)
28+
29+
message("MathLib: Downloading sse2neon...")
30+
FetchContent_MakeAvailable(sse2neon)
31+
32+
target_include_directories(MathLib INTERFACE ${sse2neon_SOURCE_DIR})
33+
endif()

Diff for: External/sse2neon

-1
This file was deleted.

Diff for: ml.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#pragma once
1111

1212
#define ML_VERSION_MAJOR 1
13-
#define ML_VERSION_MINOR 0
14-
#define ML_VERSION_DATE "5 August 2024"
13+
#define ML_VERSION_MINOR 1
14+
#define ML_VERSION_DATE "5 February 2025"
1515

1616
//======================================================================================================================
1717
// Constants
@@ -121,7 +121,7 @@
121121
#if (defined(__i386__) || defined(__x86_64__) || defined(__SCE__))
122122
# include <x86intrin.h>
123123
#elif (defined(__arm__) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM))
124-
# include "External/sse2neon/sse2neon.h"
124+
# include "sse2neon.h"
125125
#else
126126
# include <mmintrin.h>
127127
# if (ML_SVML_AVAILABLE || ML_INTRINSIC_LEVEL >= ML_INTRINSIC_AVX1)

0 commit comments

Comments
 (0)