From 01c6071ac4a64cbee4270a73f0fe88b10b31097d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 26 Oct 2025 12:28:20 +0100 Subject: feat: important refactors for SCL. Signed-off-by: Amlal El Mahrouss --- dev/lib/core/allocator_system.hpp | 1 - dev/lib/core/error_handler.hpp | 1 - dev/lib/fix/fix.hpp | 1 - dev/lib/net/modem.hpp | 2 +- dev/lib/net/url.hpp | 1 - dev/lib/simd/basic_simd.hpp | 5 +---- dev/lib/tests/gtest.hpp | 2 ++ dev/lib/tests/hpptest.hpp | 4 ++-- dev/lib/utility/chunk_string.hpp | 6 +++--- tools/hpptest.py | 2 +- 10 files changed, 10 insertions(+), 15 deletions(-) diff --git a/dev/lib/core/allocator_system.hpp b/dev/lib/core/allocator_system.hpp index 53cf095..3ffa02a 100644 --- a/dev/lib/core/allocator_system.hpp +++ b/dev/lib/core/allocator_system.hpp @@ -9,7 +9,6 @@ #define _SCL_ALLOCATOR_SYSTEM_HPP #include -#include #include namespace scl diff --git a/dev/lib/core/error_handler.hpp b/dev/lib/core/error_handler.hpp index 939a0ff..449e255 100644 --- a/dev/lib/core/error_handler.hpp +++ b/dev/lib/core/error_handler.hpp @@ -10,7 +10,6 @@ #include #include -#include namespace scl { diff --git a/dev/lib/fix/fix.hpp b/dev/lib/fix/fix.hpp index 4a5a3ae..672b8a1 100644 --- a/dev/lib/fix/fix.hpp +++ b/dev/lib/fix/fix.hpp @@ -16,7 +16,6 @@ #include #include #include -#include namespace scl::fix { diff --git a/dev/lib/net/modem.hpp b/dev/lib/net/modem.hpp index 69b1aef..6c63399 100644 --- a/dev/lib/net/modem.hpp +++ b/dev/lib/net/modem.hpp @@ -14,7 +14,7 @@ #include #include -#define OCL_MODEM_INTERFACE : public scl::net::basic_modem +#define SCL_MODEM_INTERFACE : public scl::net::basic_modem namespace scl::net { diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp index 3ada418..6772ac4 100644 --- a/dev/lib/net/url.hpp +++ b/dev/lib/net/url.hpp @@ -8,7 +8,6 @@ #pragma once #include -#include #include /// @author Amlal El Mahrouss (amlal@nekernel.org) diff --git a/dev/lib/simd/basic_simd.hpp b/dev/lib/simd/basic_simd.hpp index 97d0399..b3087ff 100644 --- a/dev/lib/simd/basic_simd.hpp +++ b/dev/lib/simd/basic_simd.hpp @@ -8,17 +8,14 @@ #pragma once #include -#include #ifdef __x86_64__ #include - using simd_type = __m256; #endif #ifdef __aarch64__ #include - using simd_type = float32x4_t; #endif @@ -44,7 +41,7 @@ namespace scl::snu::simd std::basic_string isa() { - return "basic-backend"; + return "basic_simd_backend"; } }; } // namespace scl::snu::simd diff --git a/dev/lib/tests/gtest.hpp b/dev/lib/tests/gtest.hpp index deb2ddf..c333d2c 100644 --- a/dev/lib/tests/gtest.hpp +++ b/dev/lib/tests/gtest.hpp @@ -5,4 +5,6 @@ * Copyright 2025, Amlal El Mahrouss */ +#pragma once + #include diff --git a/dev/lib/tests/hpptest.hpp b/dev/lib/tests/hpptest.hpp index 87d8f77..333ece3 100644 --- a/dev/lib/tests/hpptest.hpp +++ b/dev/lib/tests/hpptest.hpp @@ -7,7 +7,7 @@ #pragma once -#ifdef OCL_HPPTEST +#ifdef SCL_HPPTEST namespace scl::hpptest { typedef bool condition_type; @@ -15,7 +15,7 @@ namespace scl::hpptest template consteval inline void must_pass() { - OCL_HPPTEST_ASSERT(expr); + SCL_HPPTEST_ASSERT(expr); } } // namespace scl::hpptest #endif diff --git a/dev/lib/utility/chunk_string.hpp b/dev/lib/utility/chunk_string.hpp index c5bf5c6..6778173 100644 --- a/dev/lib/utility/chunk_string.hpp +++ b/dev/lib/utility/chunk_string.hpp @@ -5,8 +5,8 @@ * Copyright 2025, Amlal El Mahrouss */ -#ifndef OCL_UTILITY_CHUNK_STRING_HPP -#define OCL_UTILITY_CHUNK_STRING_HPP +#ifndef SCL_UTILITY_CHUNK_STRING_HPP +#define SCL_UTILITY_CHUNK_STRING_HPP #include @@ -99,4 +99,4 @@ namespace scl fmt.print(); } } // namespace scl -#endif // ifndef OCL_UTILITY_CHUNK_STRING_HPP +#endif // ifndef SCL_UTILITY_CHUNK_STRING_HPP diff --git a/tools/hpptest.py b/tools/hpptest.py index dbed143..5bb09bd 100755 --- a/tools/hpptest.py +++ b/tools/hpptest.py @@ -5,7 +5,7 @@ import sys, os if __name__ == '__main__': if len(sys.argv) == 3: - ret = os.system(f"clang++ -I./dev/ -I{sys.argv[2]} -std=c++20 -DOCL_HPPTEST '-DOCL_HPPTEST_ASSERT(x)=static_assert(x, #x)' {sys.argv[1]}") + ret = os.system(f"clang++ -I./dev/ -I{sys.argv[2]} -std=c++20 -DSCL_HPPTEST '-DSCL_HPPTEST_ASSERT(x)=static_assert(x, #x)' {sys.argv[1]}") if ret == 0: print("[TEST] HEADER COMPILATION PASSES") -- cgit v1.2.3