diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-27 12:28:55 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-27 12:31:41 +0200 |
| commit | b4f35dbe44e07b597c3e7bb6d7562757069a7cb4 (patch) | |
| tree | 88af99a2cca9c514536b4b61785fa67b3543429c /dev/examples | |
| parent | fbda49eea45ce08b9a72744c04761e1556ebd2fa (diff) | |
feat: moved SOCL into OCL, without SNU's baggage.v1.0.41
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/examples')
| -rw-r--r-- | dev/examples/cgi/cgi.cc | 4 | ||||
| -rw-r--r-- | dev/examples/equiv/equiv.cc | 6 | ||||
| -rw-r--r-- | dev/examples/fix/fix.cc | 6 | ||||
| -rw-r--r-- | dev/examples/opt/opt.cc | 4 | ||||
| -rw-r--r-- | dev/examples/tracked_ptr/tracked_ptr.cc | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/dev/examples/cgi/cgi.cc b/dev/examples/cgi/cgi.cc index 7d8353a..e594c4b 100644 --- a/dev/examples/cgi/cgi.cc +++ b/dev/examples/cgi/cgi.cc @@ -6,7 +6,7 @@ #include <lib/utility/cgi_writer.hpp> -static snu::basic_chunk_string<char> text_sample = R"( +static ocl::basic_chunk_string<char> text_sample = R"( <!DOCTYPE html> <html> <head> @@ -68,7 +68,7 @@ static snu::basic_chunk_string<char> text_sample = R"( /* @brief this stub loads a 'index.html' or returns an error message if not found. */ int main(int argc, char** argv) { - snu::cgi::basic_writer<> writer; + ocl::cgi::basic_writer<> writer; writer << text_sample; return 0; diff --git a/dev/examples/equiv/equiv.cc b/dev/examples/equiv/equiv.cc index 896637d..12207f4 100644 --- a/dev/examples/equiv/equiv.cc +++ b/dev/examples/equiv/equiv.cc @@ -11,9 +11,9 @@ int main(int argc, char** argv) { std::cout << std::boolalpha; - std::cout << snu::equiv::is_same<bool, int>::value << std::endl; - std::cout << snu::equiv::is_same<bool, bool>::value << std::endl; - std::cout << snu::equiv::is_same<int, int>::value << std::endl; + std::cout << ocl::equiv::is_same<bool, int>::value << std::endl; + std::cout << ocl::equiv::is_same<bool, bool>::value << std::endl; + std::cout << ocl::equiv::is_same<int, int>::value << std::endl; return 0; } diff --git a/dev/examples/fix/fix.cc b/dev/examples/fix/fix.cc index 8730cad..e3d669b 100644 --- a/dev/examples/fix/fix.cc +++ b/dev/examples/fix/fix.cc @@ -15,14 +15,14 @@ int main(int argc, char** argv) { constexpr auto default_fix = "8=FIX.4.2|9=65|35=A|49=SERVER|56=CLIENT|34=177|52=20090107-18:15:16|98=0|108=30|10=062|"; - snu::fix::basic_visitor<char> basic_visitor; - snu::fix::basic_range_data<char> fix = basic_visitor.visit(default_fix); + ocl::fix::basic_visitor<char> basic_visitor; + ocl::fix::basic_range_data<char> fix = basic_visitor.visit(default_fix); std::cout << "magic=" << fix.magic_ << std::endl; std::cout << "magic_len=" << fix.magic_len_ << std::endl; std::cout << "is_valid=" << std::boolalpha << fix.is_valid() << std::endl; - snu::fix::must_pass(fix); + ocl::fix::must_pass(fix); for (auto fields : fix.body_) { diff --git a/dev/examples/opt/opt.cc b/dev/examples/opt/opt.cc index c1c2745..b34f2c7 100644 --- a/dev/examples/opt/opt.cc +++ b/dev/examples/opt/opt.cc @@ -26,7 +26,7 @@ static auto do_some(const std::string recv_data, const std::string check_data) const int hash_to_check = do_hash(check_data); /* here we assume this should match opt_hash */ const int opt_hash = do_hash(recv_data); /* we assume that the hash is correct */ - auto opt = snu::opt(snu::eval_eq(hash_to_check, opt_hash)); /* do the compute */ + auto opt = ocl::opt(ocl::eval_eq(hash_to_check, opt_hash)); /* do the compute */ return opt; } @@ -35,7 +35,7 @@ int main(int argc, char** argv) { // ... let's assume we fetch data from network... - snu::io::println("Testing data..."); + ocl::io::println("Testing data..."); auto opt = do_some("Ohio", "Ohio"); opt.expect("Checksum failed, Ohio isn't Ohio!"); diff --git a/dev/examples/tracked_ptr/tracked_ptr.cc b/dev/examples/tracked_ptr/tracked_ptr.cc index 6d37691..5b70afd 100644 --- a/dev/examples/tracked_ptr/tracked_ptr.cc +++ b/dev/examples/tracked_ptr/tracked_ptr.cc @@ -9,13 +9,13 @@ static void summon_tracked_ptr() { - snu::memory::tracked_ptr<int> ptr = snu::memory::make_tracked(42); + ocl::memory::tracked_ptr<int> ptr = ocl::memory::make_tracked(42); std::cout << ptr.data() << "=" << ptr.manager().allocator().allocated_count_ << std::endl; } static void summon_leak_tracked_ptr() { - snu::memory::tracked_ptr<int>* ptr = new snu::memory::tracked_ptr<int>(42); + ocl::memory::tracked_ptr<int>* ptr = new ocl::memory::tracked_ptr<int>(42); std::cout << ptr->data() << "=" << ptr->manager().allocator().allocated_count_ << std::endl; } @@ -27,7 +27,7 @@ int main(int argc, char** argv) summon_tracked_ptr(); summon_tracked_ptr(); - snu::memory::tracked_ptr<int> ptr; + ocl::memory::tracked_ptr<int> ptr; std::cout << ptr.data() << "=" << ptr.manager().allocator().allocated_count_ << std::endl; @@ -46,7 +46,7 @@ int main(int argc, char** argv) std::cout << "total=" << ptr.manager().allocator().deallocated_count_ << std::endl; std::cout << "leak-detected=" << std::boolalpha << (ptr.manager().allocator().allocated_count_ > ptr.manager().allocator().deallocated_count_) << std::endl; - snu::memory::must_pass(ptr); + ocl::memory::must_pass(ptr); return EXIT_SUCCESS; } |
