FPU wasn't using SIMD. Oops
Fix identation
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,10 +14,8 @@ vgcore.*
|
||||
*.data
|
||||
disasm.txt
|
||||
*log*.txt
|
||||
.vs/
|
||||
CMakeSettings.json
|
||||
out/
|
||||
settings.json
|
||||
compile_commands.json
|
||||
.vscode/
|
||||
*.diagsession
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,19 @@ option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." OFF)
|
||||
option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." OFF)
|
||||
option(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
check_c_compiler_flag(-msse4.1 HAS_SSE4_1)
|
||||
|
||||
if (HAS_SSE4_1)
|
||||
add_compile_definitions(SIMD_SUPPORT)
|
||||
add_compile_options(-msse3 -msse4.1)
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
add_compile_definitions(VULKAN_DEBUG)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(../../external/discord_rpc discord_rpc)
|
||||
add_subdirectory(../../external/json json)
|
||||
add_subdirectory(../../external/fmt fmt)
|
||||
@@ -81,21 +94,6 @@ add_executable(kaizen-qt
|
||||
Debugger.cpp
|
||||
CodeModel.hpp)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
check_c_compiler_flag(-msse4.1 HAS_SSE4_1)
|
||||
|
||||
if (HAS_SSE4_1)
|
||||
target_compile_definitions(kaizen-qt PUBLIC SIMD_SUPPORT)
|
||||
target_compile_options(kaizen-qt PUBLIC -msse3 -msse4.1)
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
target_compile_definitions(kaizen-qt PUBLIC VULKAN_DEBUG)
|
||||
#target_compile_options(kaizen-qt PUBLIC -fsanitize=address -fsanitize=undefined)
|
||||
#target_link_options(kaizen-qt PUBLIC -fsanitize=address -fsanitize=undefined)
|
||||
endif ()
|
||||
|
||||
target_link_libraries(kaizen-qt PUBLIC SDL3::SDL3 SDL3::SDL3-static Qt6::Core Qt6::Gui Qt6::Widgets discord-rpc fmt mio nlohmann_json parallel-rdp backend)
|
||||
target_compile_definitions(kaizen-qt PUBLIC SDL_MAIN_HANDLED)
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
//
|
||||
// Created by simone on 6/25/24.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include <cmath>
|
||||
#include <common.hpp>
|
||||
@@ -9,7 +5,7 @@
|
||||
|
||||
namespace Util {
|
||||
template <typename T>
|
||||
static inline T roundCeil(float f) {
|
||||
static FORCE_INLINE T roundCeil(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_POS_INF);
|
||||
@@ -20,7 +16,7 @@ static inline T roundCeil(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundCeil(double f) {
|
||||
static FORCE_INLINE T roundCeil(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_POS_INF);
|
||||
@@ -31,7 +27,7 @@ static inline T roundCeil(double f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundNearest(float f) {
|
||||
static FORCE_INLINE T roundNearest(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_NEAREST_INT);
|
||||
@@ -42,7 +38,7 @@ static inline T roundNearest(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundNearest(double f) {
|
||||
static FORCE_INLINE T roundNearest(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_NEAREST_INT);
|
||||
@@ -53,7 +49,7 @@ static inline T roundNearest(double f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundCurrent(float f) {
|
||||
static FORCE_INLINE T roundCurrent(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
auto t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_CUR_DIRECTION);
|
||||
@@ -64,7 +60,7 @@ static inline T roundCurrent(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundCurrent(double f) {
|
||||
static FORCE_INLINE T roundCurrent(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
auto t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_CUR_DIRECTION);
|
||||
@@ -76,7 +72,7 @@ static inline T roundCurrent(double f) {
|
||||
|
||||
|
||||
template <typename T>
|
||||
static inline T roundFloor(float f) {
|
||||
static FORCE_INLINE T roundFloor(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_NEG_INF);
|
||||
@@ -87,7 +83,7 @@ static inline T roundFloor(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundFloor(double f) {
|
||||
static FORCE_INLINE T roundFloor(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_NEG_INF);
|
||||
@@ -98,7 +94,7 @@ static inline T roundFloor(double f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundTrunc(float f) {
|
||||
static FORCE_INLINE T roundTrunc(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_ZERO);
|
||||
@@ -109,7 +105,7 @@ static inline T roundTrunc(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundTrunc(double f) {
|
||||
static FORCE_INLINE T roundTrunc(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_ZERO);
|
||||
|
||||
Reference in New Issue
Block a user