summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-10-26 12:28:20 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-10-26 12:28:20 +0100
commit01c6071ac4a64cbee4270a73f0fe88b10b31097d (patch)
tree54ec5d0b86046577f1adde4ae4bb5547bdc122aa
parenta786997f304745ce3766a82be06dc6a5d0c2f02c (diff)
feat: important refactors for SCL.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--dev/lib/core/allocator_system.hpp1
-rw-r--r--dev/lib/core/error_handler.hpp1
-rw-r--r--dev/lib/fix/fix.hpp1
-rw-r--r--dev/lib/net/modem.hpp2
-rw-r--r--dev/lib/net/url.hpp1
-rw-r--r--dev/lib/simd/basic_simd.hpp5
-rw-r--r--dev/lib/tests/gtest.hpp2
-rw-r--r--dev/lib/tests/hpptest.hpp4
-rw-r--r--dev/lib/utility/chunk_string.hpp6
-rwxr-xr-xtools/hpptest.py2
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 <lib/core/includes.hpp>
-#include <stdexcept>
#include <memory>
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 <lib/core/includes.hpp>
#include <lib/io/print.hpp>
-#include <stdexcept>
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 <cstdint>
#include <sys/types.h>
#include <unistd.h>
-#include <signal.h>
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 <string>
#include <cstddef>
-#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 <string>
-#include <iostream>
#include <sstream>
/// @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 <lib/core/includes.hpp>
-#include <cmath>
#ifdef __x86_64__
#include <immintrin.h>
-
using simd_type = __m256;
#endif
#ifdef __aarch64__
#include <arm_neon.h>
-
using simd_type = float32x4_t;
#endif
@@ -44,7 +41,7 @@ namespace scl::snu::simd
std::basic_string<char> 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 <gtest/gtest.h>
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 <condition_type expr = true>
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 <lib/core/includes.hpp>
@@ -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")