diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-17 10:31:30 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-17 10:31:30 +0100 |
| commit | 3827ae4e821ff3758d1eaf2dbacc55a22f802731 (patch) | |
| tree | 0768b1a509bd104627675127f1e9785c702e7621 /dev/lib | |
| parent | 5c5a101c9618f8edea5038e94df64508b0f0a70e (diff) | |
feat: fixing merge conflicts.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/lib')
| -rw-r--r-- | dev/lib/core/allocator_system.hpp | 10 | ||||
| -rw-r--r-- | dev/lib/core/error_handler.hpp | 12 | ||||
| -rw-r--r-- | dev/lib/except/error.hpp | 10 | ||||
| -rw-r--r-- | dev/lib/fix/fix.hpp | 10 | ||||
| -rw-r--r-- | dev/lib/io/print.hpp | 10 | ||||
| -rw-r--r-- | dev/lib/logic/equiv.hpp | 4 | ||||
| -rw-r--r-- | dev/lib/logic/math.hpp | 4 | ||||
| -rw-r--r-- | dev/lib/logic/opt.hpp | 10 | ||||
| -rw-r--r-- | dev/lib/memory/tracked_ptr.hpp | 4 | ||||
| -rw-r--r-- | dev/lib/net/modem.hpp | 12 | ||||
| -rw-r--r-- | dev/lib/net/url.hpp | 4 | ||||
| -rw-r--r-- | dev/lib/simd/basic_simd.hpp | 8 | ||||
| -rw-r--r-- | dev/lib/simd/simd.hpp | 8 | ||||
| -rw-r--r-- | dev/lib/tests/hpptest.hpp | 8 | ||||
| -rw-r--r-- | dev/lib/utility/cgi_writer.hpp | 26 | ||||
| -rw-r--r-- | dev/lib/utility/chunk_string.hpp | 12 | ||||
| -rw-r--r-- | dev/lib/utility/crc32.hpp | 10 | ||||
| -rw-r--r-- | dev/lib/utility/embfs.hpp | 10 |
18 files changed, 86 insertions, 86 deletions
diff --git a/dev/lib/core/allocator_system.hpp b/dev/lib/core/allocator_system.hpp index 3ffa02a..6fd0119 100644 --- a/dev/lib/core/allocator_system.hpp +++ b/dev/lib/core/allocator_system.hpp @@ -5,13 +5,13 @@ * Copyright 2025, Amlal El Mahrouss. Licensed under the BSL 1.0 license */ -#ifndef _SCL_ALLOCATOR_SYSTEM_HPP -#define _SCL_ALLOCATOR_SYSTEM_HPP +#ifndef _OCL_ALLOCATOR_SYSTEM_HPP +#define _OCL_ALLOCATOR_SYSTEM_HPP #include <lib/core/includes.hpp> #include <memory> -namespace scl +namespace ocl { template <typename type> struct new_op final @@ -69,6 +69,6 @@ namespace scl template <typename type> using standard_allocator_type = allocator_system<type, new_op<type>, delete_op<type>>; -} // namespace scl +} // namespace ocl -#endif // ifndef _SCL_ALLOCATOR_SYSTEM_HPP +#endif // ifndef _OCL_ALLOCATOR_SYSTEM_HPP diff --git a/dev/lib/core/error_handler.hpp b/dev/lib/core/error_handler.hpp index 449e255..67bf7b4 100644 --- a/dev/lib/core/error_handler.hpp +++ b/dev/lib/core/error_handler.hpp @@ -5,13 +5,13 @@ * Copyright 2025, Amlal El Mahrouss. */ -#ifndef _SCL_ERROR_HANDLER_HPP -#define _SCL_ERROR_HANDLER_HPP +#ifndef _OCL_ERROR_HANDLER_HPP +#define _OCL_ERROR_HANDLER_HPP #include <lib/core/includes.hpp> #include <lib/io/print.hpp> -namespace scl +namespace ocl { struct basic_error_handler; @@ -25,12 +25,12 @@ namespace scl virtual void operator()(const std::basic_string<char>& msg) { - scl::io::print(msg); + ocl::io::print(msg); } }; using standard_error_handler = basic_error_handler; using error_handler_type = basic_error_handler; -} // namespace scl +} // namespace ocl -#endif // ifndef _SCL_ERROR_HANDLER_HPP +#endif // ifndef _OCL_ERROR_HANDLER_HPP diff --git a/dev/lib/except/error.hpp b/dev/lib/except/error.hpp index 31b9894..16bf5eb 100644 --- a/dev/lib/except/error.hpp +++ b/dev/lib/except/error.hpp @@ -4,17 +4,17 @@ * Copyright 2023-2025, Amlal El Mahrouss */ -#ifndef _SCL_ERR_HPP -#define _SCL_ERR_HPP +#ifndef _OCL_ERR_HPP +#define _OCL_ERR_HPP #include <stdexcept> -namespace scl +namespace ocl { using runtime_error = std::runtime_error; using fix_error = runtime_error; using math_error = runtime_error; using cgi_error = runtime_error; -} // namespace scl +} // namespace ocl -#endif // _SCL_ERR_HPP
\ No newline at end of file +#endif // _OCL_ERR_HPP
\ No newline at end of file diff --git a/dev/lib/fix/fix.hpp b/dev/lib/fix/fix.hpp index 672b8a1..243d01c 100644 --- a/dev/lib/fix/fix.hpp +++ b/dev/lib/fix/fix.hpp @@ -5,8 +5,8 @@ * Copyright 2025, Amlal El Mahrouss */ -#ifndef _SCL_FIX_PARSER_HPP -#define _SCL_FIX_PARSER_HPP +#ifndef _OCL_FIX_PARSER_HPP +#define _OCL_FIX_PARSER_HPP #include <cstddef> #include <cassert> @@ -17,7 +17,7 @@ #include <sys/types.h> #include <unistd.h> -namespace scl::fix +namespace ocl::fix { template <typename char_type> class basic_visitor; @@ -210,6 +210,6 @@ namespace scl::fix } using fix_tag_type = std::uint32_t; -} // namespace scl::fix +} // namespace ocl::fix -#endif // ifndef _SCL_FIX_PARSER_HPP +#endif // ifndef _OCL_FIX_PARSER_HPP diff --git a/dev/lib/io/print.hpp b/dev/lib/io/print.hpp index 8463b6f..307c06f 100644 --- a/dev/lib/io/print.hpp +++ b/dev/lib/io/print.hpp @@ -5,13 +5,13 @@ * Copyright 2025 */ -#ifndef _SCL_PRINT_HPP -#define _SCL_PRINT_HPP +#ifndef _OCL_PRINT_HPP +#define _OCL_PRINT_HPP #include <iostream> #include <ostream> -namespace scl::io +namespace ocl::io { template <typename T, typename... Args> inline void print(T fmt, Args... other) noexcept @@ -37,6 +37,6 @@ namespace scl::io print(fmt...); print(); } -} // namespace scl::io +} // namespace ocl::io -#endif // ifndef _SCL_PRINT_HPP +#endif // ifndef _OCL_PRINT_HPP diff --git a/dev/lib/logic/equiv.hpp b/dev/lib/logic/equiv.hpp index 05d0f53..5b022f8 100644 --- a/dev/lib/logic/equiv.hpp +++ b/dev/lib/logic/equiv.hpp @@ -8,7 +8,7 @@ #pragma once /// @brief OCL equivalence namespace. -namespace scl::equiv +namespace ocl::equiv { template <typename T> struct basic_hash_trait @@ -101,4 +101,4 @@ namespace scl::equiv return left_ / right_ == 1; } }; -} // namespace scl::equiv +} // namespace ocl::equiv diff --git a/dev/lib/logic/math.hpp b/dev/lib/logic/math.hpp index 2d00595..e796eae 100644 --- a/dev/lib/logic/math.hpp +++ b/dev/lib/logic/math.hpp @@ -9,7 +9,7 @@ #include <cmath> -namespace scl +namespace ocl { template <std::size_t T> struct is_non_boolean_integer final @@ -32,4 +32,4 @@ namespace scl constexpr inline auto not_a_number = NAN; constexpr inline auto positive_infinity = INFINITY; constexpr inline auto negative_infinity = -positive_infinity; -} // namespace scl
\ No newline at end of file +} // namespace ocl
\ No newline at end of file diff --git a/dev/lib/logic/opt.hpp b/dev/lib/logic/opt.hpp index 4ce999c..137460c 100644 --- a/dev/lib/logic/opt.hpp +++ b/dev/lib/logic/opt.hpp @@ -4,13 +4,13 @@ * Copyright 2023-2025, Amlal El Mahrouss */ -#ifndef _SCL_OPT_HPP -#define _SCL_OPT_HPP +#ifndef _OCL_OPT_HPP +#define _OCL_OPT_HPP #include <lib/except/error.hpp> #include <utility> -namespace scl +namespace ocl { enum class return_type { @@ -129,6 +129,6 @@ namespace scl { return return_type::err; } -} // namespace scl +} // namespace ocl -#endif /* ifndef _SCL_OPT_HPP */ +#endif /* ifndef _OCL_OPT_HPP */ diff --git a/dev/lib/memory/tracked_ptr.hpp b/dev/lib/memory/tracked_ptr.hpp index eb33bd0..d2f8450 100644 --- a/dev/lib/memory/tracked_ptr.hpp +++ b/dev/lib/memory/tracked_ptr.hpp @@ -16,7 +16,7 @@ #include <unistd.h> #include <signal.h> -namespace scl::memory +namespace ocl::memory { template <typename T> class tracked_allocator; @@ -232,4 +232,4 @@ namespace scl::memory ::kill(::getpid(), SIGTRAP); } } -} // namespace scl::memory +} // namespace ocl::memory diff --git a/dev/lib/net/modem.hpp b/dev/lib/net/modem.hpp index 6c63399..0e935c7 100644 --- a/dev/lib/net/modem.hpp +++ b/dev/lib/net/modem.hpp @@ -5,8 +5,8 @@ * Copyright 2025, Amlal El Mahrouss */ -#ifndef _SCL_NET_NETWORK_HPP -#define _SCL_NET_NETWORK_HPP +#ifndef _OCL_NET_NETWORK_HPP +#define _OCL_NET_NETWORK_HPP #include <unistd.h> #include <arpa/inet.h> @@ -14,9 +14,9 @@ #include <string> #include <cstddef> -#define SCL_MODEM_INTERFACE : public scl::net::basic_modem +#define OCL_MODEM_INTERFACE : public ocl::net::basic_modem -namespace scl::net +namespace ocl::net { class basic_modem; @@ -151,6 +151,6 @@ namespace scl::net return true; } }; -} // namespace scl::net +} // namespace ocl::net -#endif // ifndef _SCL_NET_NETWORK_HPP +#endif // ifndef _OCL_NET_NETWORK_HPP diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp index 52991f2..83ab587 100644 --- a/dev/lib/net/url.hpp +++ b/dev/lib/net/url.hpp @@ -13,7 +13,7 @@ /// @author Amlal El Mahrouss (amlal@nekernel.org) /// @brief Parse URLs (in a non-standard way). -namespace scl::net +namespace ocl::net { template <typename char_type> class basic_url; @@ -91,4 +91,4 @@ namespace scl::net return m_ss_.size() > 0 && this->protocol_exists(); } }; -} // namespace scl::net +} // namespace ocl::net diff --git a/dev/lib/simd/basic_simd.hpp b/dev/lib/simd/basic_simd.hpp index d182aaf..f14d977 100644 --- a/dev/lib/simd/basic_simd.hpp +++ b/dev/lib/simd/basic_simd.hpp @@ -1,8 +1,8 @@ /* * File: simd/basic_simd.hpp * Purpose: Basic SIMD backend C++ library. - * Author: Amlal El Mahrouss (founder@snu.systems) - * Copyright 2025, Amlal El Mahrouss, and SNUPowered, licensed under the BSL 1.0 license. + * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Copyright 2025, Amlal El Mahrouss, licensed under the BSL 1.0 license. */ #pragma once @@ -19,7 +19,7 @@ using simd_type = __m256; using simd_type = float32x4_t; #endif -namespace scl::snu::simd +namespace ocl::snu::simd { struct basic_simd_backend final { @@ -44,4 +44,4 @@ namespace scl::snu::simd return "basic_simd_backend"; } }; -} // namespace scl::snu::simd +} // namespace ocl::snu::simd diff --git a/dev/lib/simd/simd.hpp b/dev/lib/simd/simd.hpp index 9234e67..e571b23 100644 --- a/dev/lib/simd/simd.hpp +++ b/dev/lib/simd/simd.hpp @@ -1,8 +1,8 @@ /* * File: simd/simd.hpp * Purpose: SIMD C++ library. - * Author: Amlal El Mahrouss (founder@snu.systems) - * Copyright 2025, Amlal El Mahrouss, and SNUPowered, licensed under the BSL 1.0 license. + * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Copyright 2025, Amlal El Mahrouss, licensed under the BSL 1.0 license. */ #pragma once @@ -12,7 +12,7 @@ /// @author Amlal El Mahrouss /// @brief Basic SIMD processor. -namespace scl::snu::simd +namespace ocl::snu::simd { template <typename backend_type> class basic_simd_processor @@ -57,4 +57,4 @@ namespace scl::snu::simd return processor_.isa(); } }; -} // namespace scl::snu::simd +} // namespace ocl::snu::simd diff --git a/dev/lib/tests/hpptest.hpp b/dev/lib/tests/hpptest.hpp index 63fc962..f5fa5c2 100644 --- a/dev/lib/tests/hpptest.hpp +++ b/dev/lib/tests/hpptest.hpp @@ -7,15 +7,15 @@ #pragma once -namespace scl::hpptest +namespace ocl::hpptest { typedef bool condition_type; template <condition_type expr = true> consteval inline void must_pass() { -#ifdef SCL_HPPTEST - SCL_HPPTEST_ASSERT(expr); +#ifdef OCL_HPPTEST + OCL_HPPTEST_ASSERT(expr); #endif } -} // namespace scl::hpptest +} // namespace ocl::hpptest diff --git a/dev/lib/utility/cgi_writer.hpp b/dev/lib/utility/cgi_writer.hpp index 87354ac..d54d9de 100644 --- a/dev/lib/utility/cgi_writer.hpp +++ b/dev/lib/utility/cgi_writer.hpp @@ -4,15 +4,15 @@ * Copyright 2023-2025, Amlal El Mahrouss. */ -#ifndef _SCL_CGI_WRITER_HPP -#define _SCL_CGI_WRITER_HPP +#ifndef _OCL_CGI_WRITER_HPP +#define _OCL_CGI_WRITER_HPP #include <lib/io/print.hpp> #include <lib/utility/chunk_string.hpp> #include <sstream> #include <format> -namespace scl +namespace ocl { namespace cgi { @@ -21,7 +21,7 @@ namespace scl class basic_writer { private: - basic_writer& eval_(const scl::basic_chunk_string<char_type>& mime, const scl::basic_chunk_string<char_type>& ss) noexcept + basic_writer& eval_(const ocl::basic_chunk_string<char_type>& mime, const ocl::basic_chunk_string<char_type>& ss) noexcept { std::basic_stringstream<char_type> ss_out; @@ -30,7 +30,7 @@ namespace scl ss_out << std::format("Content-Length: {}\r\n\r\n", ss.str().size()); ss_out << ss.str(); - scl::io::print(ss_out.str()); + ocl::io::print(ss_out.str()); return *this; } @@ -43,37 +43,37 @@ namespace scl basic_writer(const basic_writer&) = default; public: - friend void operator<<(basic_writer& self, const scl::basic_chunk_string<char_type>& ss_in) + friend void operator<<(basic_writer& self, const ocl::basic_chunk_string<char_type>& ss_in) { self = self.eval_("text/plain", ss_in); } - basic_writer& binary(const scl::basic_chunk_string<char_type>& ss_in) + basic_writer& binary(const ocl::basic_chunk_string<char_type>& ss_in) { return this->eval_("application/octet-stream", ss_in); } - basic_writer& html(const scl::basic_chunk_string<char_type>& ss_in) + basic_writer& html(const ocl::basic_chunk_string<char_type>& ss_in) { return this->eval_("text/html", ss_in); } - basic_writer& xml(const scl::basic_chunk_string<char_type>& ss_in) + basic_writer& xml(const ocl::basic_chunk_string<char_type>& ss_in) { return this->eval_("application/xml", ss_in); } - basic_writer& json(const scl::basic_chunk_string<char_type>& ss_in) + basic_writer& json(const ocl::basic_chunk_string<char_type>& ss_in) { return this->eval_("application/json", ss_in); } - basic_writer& js(const scl::basic_chunk_string<char_type>& ss_in) + basic_writer& js(const ocl::basic_chunk_string<char_type>& ss_in) { return this->eval_("text/javascript", ss_in); } }; } // namespace cgi -} // namespace scl +} // namespace ocl -#endif // ifndef _SCL_CGI_WRITER_HPP +#endif // ifndef _OCL_CGI_WRITER_HPP diff --git a/dev/lib/utility/chunk_string.hpp b/dev/lib/utility/chunk_string.hpp index 6778173..4fe5cc2 100644 --- a/dev/lib/utility/chunk_string.hpp +++ b/dev/lib/utility/chunk_string.hpp @@ -5,12 +5,12 @@ * Copyright 2025, Amlal El Mahrouss */ -#ifndef SCL_UTILITY_CHUNK_STRING_HPP -#define SCL_UTILITY_CHUNK_STRING_HPP +#ifndef OCL_UTILITY_CHUNK_STRING_HPP +#define OCL_UTILITY_CHUNK_STRING_HPP #include <lib/core/includes.hpp> -namespace scl +namespace ocl { template <typename char_type, std::size_t max_chunk_size = 8196> class basic_chunk_string; @@ -89,7 +89,7 @@ namespace scl void print() noexcept { - scl::io::print(packed_chunks_); + ocl::io::print(packed_chunks_); } }; @@ -98,5 +98,5 @@ namespace scl { fmt.print(); } -} // namespace scl -#endif // ifndef SCL_UTILITY_CHUNK_STRING_HPP +} // namespace ocl +#endif // ifndef OCL_UTILITY_CHUNK_STRING_HPP diff --git a/dev/lib/utility/crc32.hpp b/dev/lib/utility/crc32.hpp index 93347a8..ea09b94 100644 --- a/dev/lib/utility/crc32.hpp +++ b/dev/lib/utility/crc32.hpp @@ -5,8 +5,8 @@ * Copyright 2025, Amlal El Mahrouss. */ -#ifndef _SCL_CRC32_HPP -#define _SCL_CRC32_HPP +#ifndef _OCL_CRC32_HPP +#define _OCL_CRC32_HPP #include <cstdint> #include <string> @@ -15,7 +15,7 @@ /// @brief Crc32 implementation in C++ /// @author Amlal EL Mahrouss (amlal@nekernel.org) -namespace scl::crc32 +namespace ocl::crc32 { namespace detail { @@ -76,6 +76,6 @@ namespace scl::crc32 { return detail::crc32(in.c_str(), in.size()); } -} // namespace scl::crc32 +} // namespace ocl::crc32 -#endif // !_SCL_CRC32_HPP
\ No newline at end of file +#endif // !_OCL_CRC32_HPP
\ No newline at end of file diff --git a/dev/lib/utility/embfs.hpp b/dev/lib/utility/embfs.hpp index 2738ae7..6da8874 100644 --- a/dev/lib/utility/embfs.hpp +++ b/dev/lib/utility/embfs.hpp @@ -5,8 +5,8 @@ * Copyright 2025, Amlal El Mahrouss. */ -#ifndef _SCL_EMBFS_HPP -#define _SCL_EMBFS_HPP +#ifndef _OCL_EMBFS_HPP +#define _OCL_EMBFS_HPP #include <cstdint> #include <cstddef> @@ -14,7 +14,7 @@ /// @brief A filesystem designed for tiny storage medias. /// @author Amlal EL Mahrouss (amlal@nekernel.org) -namespace scl::embfs +namespace ocl::embfs { namespace traits { @@ -76,6 +76,6 @@ namespace scl::embfs /// @brief Indexed node linear array. typedef embfs_inode embfs_inode_arr_t[_inode_arr_len]; } // namespace traits -} // namespace scl::embfs +} // namespace ocl::embfs -#endif // ifndef _SCL_EMBFS_HPP
\ No newline at end of file +#endif // ifndef _OCL_EMBFS_HPP
\ No newline at end of file |
