├── debian ├── compat ├── control ├── copyright └── rules ├── debian_manager ├── compat ├── mxa-manager.sysuser ├── mxa-manager.sysusers ├── mxa-manager.service ├── control ├── copyright └── rules ├── mxa_manager ├── .gitignore ├── include │ ├── color_print.h │ └── lock_table.h └── mxa_manager.conf ├── mx_accl ├── pymodule │ └── pybind11 ├── ClassDiagram.cd ├── include │ └── memx │ │ └── accl │ │ └── utils │ │ ├── cpu_opts.h │ │ ├── errors.h │ │ └── macros.h ├── CMakeLists.txt └── memx-accl.sln ├── misc └── libmemx │ ├── aarch64 │ └── libmemx.so │ ├── riscv64 │ └── libmemx.so │ └── x86_64 │ └── libmemx.so ├── figures ├── mx_accl.png └── mx_accl_light.png ├── .gitmodules ├── extern ├── spdlog │ ├── spdlog │ │ ├── fmt │ │ │ ├── bundled │ │ │ │ ├── core.h │ │ │ │ └── fmt.license.rst │ │ │ ├── xchar.h │ │ │ ├── chrono.h │ │ │ ├── ostr.h │ │ │ ├── ranges.h │ │ │ ├── compile.h │ │ │ ├── std.h │ │ │ └── fmt.h │ │ ├── details │ │ │ ├── windows_include.h │ │ │ ├── console_globals.h │ │ │ ├── periodic_worker-inl.h │ │ │ ├── synchronous_factory.h │ │ │ ├── log_msg_buffer.h │ │ │ ├── null_mutex.h │ │ │ ├── backtracer.h │ │ │ ├── log_msg.h │ │ │ └── log_msg-inl.h │ │ ├── fwd.h │ │ ├── version.h │ │ ├── formatter.h │ │ ├── sinks │ │ │ ├── sink-inl.h │ │ │ ├── sink.h │ │ │ ├── ostream_sink.h │ │ │ ├── null_sink.h │ │ │ ├── stdout_color_sinks-inl.h │ │ │ └── basic_file_sink-inl.h │ │ ├── cfg │ │ │ ├── helpers.h │ │ │ ├── env.h │ │ │ └── argv.h │ │ └── mdc.h │ └── LICENSE └── asio │ ├── mxasio │ ├── unyield.hpp │ ├── yield.hpp │ ├── ts │ │ ├── io_context.hpp │ │ ├── buffer.hpp │ │ ├── net.hpp │ │ ├── timer.hpp │ │ ├── socket.hpp │ │ ├── executor.hpp │ │ └── internet.hpp │ ├── detail │ │ ├── limits.hpp │ │ ├── cstddef.hpp │ │ ├── array.hpp │ │ ├── exception.hpp │ │ ├── functional.hpp │ │ ├── date_time_fwd.hpp │ │ ├── regex_fwd.hpp │ │ ├── array_fwd.hpp │ │ ├── dependent_type.hpp │ │ ├── win_iocp_thread_info.hpp │ │ ├── impl │ │ │ ├── thread_context.ipp │ │ │ ├── posix_mutex.ipp │ │ │ ├── posix_tss_ptr.ipp │ │ │ ├── throw_error.ipp │ │ │ └── win_tss_ptr.ipp │ │ ├── assert.hpp │ │ ├── operation.hpp │ │ ├── cstdint.hpp │ │ ├── noncopyable.hpp │ │ ├── fd_set_adapter.hpp │ │ ├── fenced_block.hpp │ │ ├── null_fenced_block.hpp │ │ ├── scheduler_thread_info.hpp │ │ ├── resolve_op.hpp │ │ ├── signal_init.hpp │ │ ├── future.hpp │ │ ├── non_const_lvalue.hpp │ │ ├── wait_op.hpp │ │ ├── event.hpp │ │ ├── mutex.hpp │ │ ├── timer_scheduler.hpp │ │ ├── null_mutex.hpp │ │ ├── global.hpp │ │ ├── scheduler_task.hpp │ │ ├── signal_op.hpp │ │ ├── timer_scheduler_fwd.hpp │ │ ├── null_static_mutex.hpp │ │ ├── chrono.hpp │ │ ├── signal_blocker.hpp │ │ ├── null_global.hpp │ │ ├── handler_cont_helpers.hpp │ │ ├── null_tss_ptr.hpp │ │ ├── std_fenced_block.hpp │ │ ├── std_mutex.hpp │ │ ├── select_interrupter.hpp │ │ ├── source_location.hpp │ │ ├── std_thread.hpp │ │ ├── thread_context.hpp │ │ ├── null_thread.hpp │ │ ├── local_free_on_block_exit.hpp │ │ ├── thread.hpp │ │ ├── keyword_tss_ptr.hpp │ │ ├── string_view.hpp │ │ ├── posix_static_mutex.hpp │ │ ├── static_mutex.hpp │ │ ├── std_global.hpp │ │ └── winrt_async_op.hpp │ ├── io_service_strand.hpp │ ├── buffered_stream_fwd.hpp │ ├── version.hpp │ ├── buffered_read_stream_fwd.hpp │ ├── buffered_write_stream_fwd.hpp │ ├── signal_set.hpp │ ├── system_error.hpp │ ├── static_thread_pool.hpp │ ├── streambuf.hpp │ ├── ssl.hpp │ ├── io_service.hpp │ ├── impl │ │ ├── system_context.hpp │ │ ├── executor.ipp │ │ ├── multiple_exceptions.ipp │ │ └── serial_port_base.hpp │ ├── ssl │ │ ├── impl │ │ │ └── src.hpp │ │ ├── detail │ │ │ ├── openssl_types.hpp │ │ │ └── verify_callback.hpp │ │ └── stream_base.hpp │ ├── associator.hpp │ ├── stream_file.hpp │ ├── basic_streambuf_fwd.hpp │ ├── readable_pipe.hpp │ ├── writable_pipe.hpp │ ├── experimental │ │ ├── append.hpp │ │ ├── prepend.hpp │ │ ├── as_tuple.hpp │ │ ├── deferred.hpp │ │ ├── detail │ │ │ └── has_signature.hpp │ │ └── impl │ │ │ └── channel_error.ipp │ ├── random_access_file.hpp │ ├── serial_port.hpp │ ├── posix │ │ ├── descriptor.hpp │ │ └── stream_descriptor.hpp │ ├── execution │ │ ├── impl │ │ │ └── bad_executor.ipp │ │ ├── invocable_archetype.hpp │ │ └── bad_executor.hpp │ ├── error_code.hpp │ ├── windows │ │ ├── stream_handle.hpp │ │ ├── object_handle.hpp │ │ ├── random_access_handle.hpp │ │ └── overlapped_handle.hpp │ ├── ip │ │ ├── host_name.hpp │ │ ├── resolver_query_base.hpp │ │ └── impl │ │ │ ├── basic_endpoint.hpp │ │ │ ├── host_name.ipp │ │ │ ├── network_v6.hpp │ │ │ └── network_v4.hpp │ ├── execution.hpp │ ├── deadline_timer.hpp │ ├── steady_timer.hpp │ ├── system_timer.hpp │ ├── high_resolution_timer.hpp │ ├── is_executor.hpp │ ├── is_contiguous_iterator.hpp │ ├── multiple_exceptions.hpp │ ├── wait_traits.hpp │ └── handler_continuation_hook.hpp │ └── LICENSE ├── .gitattributes ├── tools ├── CMakeLists.txt └── acclBench │ ├── CMakeLists.txt │ ├── acclBench.vcxproj.filters │ └── acclBench.sln └── .gitignore /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /debian_manager/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /mxa_manager/.gitignore: -------------------------------------------------------------------------------- 1 | mxa_manager 2 | -------------------------------------------------------------------------------- /mx_accl/pymodule/pybind11: -------------------------------------------------------------------------------- 1 | ../../extern/pybind11 -------------------------------------------------------------------------------- /debian_manager/mxa-manager.sysuser: -------------------------------------------------------------------------------- 1 | mxa-manager defaults 2 | -------------------------------------------------------------------------------- /mx_accl/ClassDiagram.cd: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /misc/libmemx/aarch64/libmemx.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memryx/MxAccl/HEAD/misc/libmemx/aarch64/libmemx.so -------------------------------------------------------------------------------- /misc/libmemx/riscv64/libmemx.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memryx/MxAccl/HEAD/misc/libmemx/riscv64/libmemx.so -------------------------------------------------------------------------------- /misc/libmemx/x86_64/libmemx.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memryx/MxAccl/HEAD/misc/libmemx/x86_64/libmemx.so -------------------------------------------------------------------------------- /debian_manager/mxa-manager.sysusers: -------------------------------------------------------------------------------- 1 | g mxa-manager - - 2 | u mxa-manager - "MemryX MXA Manager Service" 3 | -------------------------------------------------------------------------------- /figures/mx_accl.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f8c786bec7b2861f448a5ed1e51fc266fb3e1833a1cbeff8857fe3c9496daa93 3 | size 124812 4 | -------------------------------------------------------------------------------- /figures/mx_accl_light.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0b5b93ea4962f4a7f492eb9f5b2a906ea90230d2a55734620bd23770d9f7d2b1 3 | size 134494 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "extern/pybind11"] 2 | path = extern/pybind11 3 | url = https://github.com/pybind/pybind11 4 | [submodule "extern/cpuinfo"] 5 | path = extern/cpuinfo 6 | url = https://github.com/pytorch/cpuinfo 7 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/bundled/core.h: -------------------------------------------------------------------------------- 1 | // This file is only provided for compatibility and may be removed in future 2 | // versions. Use fmt/base.h if you don't need fmt::format and fmt/format.h 3 | // otherwise. 4 | 5 | #include "format.h" 6 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/details/windows_include.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef NOMINMAX 4 | #define NOMINMAX // prevent windows redefining min/max 5 | #endif 6 | 7 | #ifndef WIN32_LEAN_AND_MEAN 8 | #define WIN32_LEAN_AND_MEAN 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.dfp filter=lfs diff=lfs merge=lfs -text 2 | *.jpg filter=lfs diff=lfs merge=lfs -text 3 | *.png filter=lfs diff=lfs merge=lfs -text 4 | *.mp4 filter=lfs diff=lfs merge=lfs -text 5 | *.onnx filter=lfs diff=lfs merge=lfs -text 6 | *.tflite filter=lfs diff=lfs merge=lfs -text 7 | *.pb filter=lfs diff=lfs merge=lfs -text 8 | -------------------------------------------------------------------------------- /debian_manager/mxa-manager.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=The MemryX MX3 device management daemon. 3 | 4 | [Service] 5 | TimeoutStartSec=30 6 | ExecStartPre=/bin/sleep 2 7 | ExecStart=/usr/bin/mxa_manager 8 | Restart=on-failure 9 | RestartSec=2 10 | RuntimeDirectory=mxa_manager 11 | RuntimeDirectoryMode=0777 12 | User=mxa-manager 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: memx-accl 2 | Maintainer: MemryX 3 | Build-Depends: debhelper (>= 10), memx-drivers (>= 2.1.0), memx-drivers (<< 2.2.0) 4 | 5 | Package: memx-accl 6 | Architecture: amd64 arm64 riscv64 7 | Recommends: mxa-manager 8 | Depends: memx-drivers (>= 2.1.0), memx-drivers (<< 2.2.0), ${shlibs:Depends}, ${misc:Depends} 9 | Description: MemryX Runtime API library for C++ 10 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fwd.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | namespace spdlog { 7 | class logger; 8 | class formatter; 9 | 10 | namespace sinks { 11 | class sink; 12 | } 13 | 14 | namespace level { 15 | enum level_enum : int; 16 | } 17 | 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRLIST(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR} "*") 2 | 3 | FOREACH(subdir ${SUBDIRS}) 4 | if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt) 5 | if ("${CMAKE_BUILD_TYPE}" STREQUAL "Packaging") 6 | if(NOT ${subdir} STREQUAL "acclBench") 7 | continue() 8 | endif() 9 | endif() 10 | ADD_SUBDIRECTORY(${subdir}) 11 | endif() 12 | ENDFOREACH() 13 | -------------------------------------------------------------------------------- /debian_manager/control: -------------------------------------------------------------------------------- 1 | Source: mxa-manager 2 | Maintainer: MemryX 3 | Build-Depends: debhelper (>= 13.3), memx-drivers (>= 2.1.0), memx-drivers (<< 2.2.0), memx-accl (>= 2.1.0), memx-accl (<< 2.2.0), systemd-sysusers | dh-sysuser 4 | 5 | Package: mxa-manager 6 | Architecture: amd64 arm64 riscv64 7 | Depends: memx-accl (>= 2.1.0), memx-accl (<< 2.2.0), ${shlibs:Depends}, ${misc:Depends} 8 | Description: Hardware management daemon for MemryX MXAs 9 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 15 8 | #define SPDLOG_VER_PATCH 3 9 | 10 | #define SPDLOG_TO_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) 11 | #define SPDLOG_VERSION SPDLOG_TO_VERSION(SPDLOG_VER_MAJOR, SPDLOG_VER_MINOR, SPDLOG_VER_PATCH) 12 | -------------------------------------------------------------------------------- /extern/asio/mxasio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /tools/acclBench/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | get_filename_component(app_name ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 7 | 8 | include_directories(${MX_API_DIR}/include) 9 | 10 | file(GLOB local_src 11 | "*.c" 12 | "*.cpp" 13 | ) 14 | 15 | add_executable(${app_name} ${local_src}) 16 | 17 | target_link_libraries(${app_name} mx_accl ) 18 | 19 | install(TARGETS ${app_name} DESTINATION ${CMAKE_INSTALL_BINDIR}) 20 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | class formatter { 12 | public: 13 | virtual ~formatter() = default; 14 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 15 | virtual std::unique_ptr clone() const = 0; 16 | }; 17 | } // namespace spdlog 18 | -------------------------------------------------------------------------------- /extern/asio/mxasio/yield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // yield.hpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "coroutine.hpp" 12 | 13 | #ifndef reenter 14 | # define reenter(c) MXASIO_CORO_REENTER(c) 15 | #endif 16 | 17 | #ifndef yield 18 | # define yield MXASIO_CORO_YIELD 19 | #endif 20 | 21 | #ifndef fork 22 | # define fork MXASIO_CORO_FORK 23 | #endif 24 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Source: https://github.com/memryx/MxAccl 3 | Upstream-Name: MemryX ACCeLerator Runtime (C++) 4 | Files: 5 | * 6 | Copyright: 2025, MemryX 7 | License: MPL-2.0 8 | This Source Code Form is subject to the terms of the Mozilla Public 9 | License, v. 2.0. If a copy of the MPL was not distributed with this 10 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | Comment: 12 | On Debian systems, the full text of the Mozilla Public License version 2.0 13 | can be found in `/usr/share/common-licenses/MPL-2.0'. 14 | -------------------------------------------------------------------------------- /debian_manager/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Source: https://github.com/memryx/MxAccl 3 | Upstream-Name: MemryX ACCeLerator Runtime (C++) 4 | Files: 5 | * 6 | Copyright: 2025, MemryX 7 | License: MPL-2.0 8 | This Source Code Form is subject to the terms of the Mozilla Public 9 | License, v. 2.0. If a copy of the MPL was not distributed with this 10 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | Comment: 12 | On Debian systems, the full text of the Mozilla Public License version 2.0 13 | can be found in `/usr/share/common-licenses/MPL-2.0'. 14 | 15 | -------------------------------------------------------------------------------- /extern/asio/mxasio/ts/io_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/io_context.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_TS_IO_CONTEXT_HPP 12 | #define MXASIO_TS_IO_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/io_context.hpp" 19 | 20 | #endif // MXASIO_TS_IO_CONTEXT_HPP 21 | -------------------------------------------------------------------------------- /extern/asio/mxasio/detail/limits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/limits.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_DETAIL_LIMITS_HPP 12 | #define MXASIO_DETAIL_LIMITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | #include 20 | 21 | #endif // MXASIO_DETAIL_LIMITS_HPP 22 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/xchar.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's xchar support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /extern/asio/mxasio/io_service_strand.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service_strand.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_IO_SERVICE_STRAND_HPP 12 | #define MXASIO_IO_SERVICE_STRAND_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/io_context_strand.hpp" 19 | 20 | #endif // MXASIO_IO_SERVICE_STRAND_HPP 21 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/chrono.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's chrono support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/ranges.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ranges support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/compile.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's compile-time support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /extern/asio/mxasio/buffered_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_BUFFERED_STREAM_FWD_HPP 12 | #define MXASIO_BUFFERED_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace mxasio { 19 | 20 | template 21 | class buffered_stream; 22 | 23 | } // namespace mxasio 24 | 25 | #endif // MXASIO_BUFFERED_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /extern/asio/mxasio/ts/buffer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/buffer.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_TS_BUFFER_HPP 12 | #define MXASIO_TS_BUFFER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/buffer.hpp" 19 | #include "mxasio/completion_condition.hpp" 20 | #include "mxasio/read.hpp" 21 | #include "mxasio/write.hpp" 22 | #include "mxasio/read_until.hpp" 23 | 24 | #endif // MXASIO_TS_BUFFER_HPP 25 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex { 13 | using mutex_t = std::mutex; 14 | static mutex_t &mutex() { 15 | static mutex_t s_mutex; 16 | return s_mutex; 17 | } 18 | }; 19 | 20 | struct console_nullmutex { 21 | using mutex_t = null_mutex; 22 | static mutex_t &mutex() { 23 | static mutex_t s_mutex; 24 | return s_mutex; 25 | } 26 | }; 27 | } // namespace details 28 | } // namespace spdlog 29 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/std.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's std support (for formatting e.g. 9 | // std::filesystem::path, std::thread::id, std::monostate, std::variant, ...) 10 | // 11 | #include 12 | 13 | #if !defined(SPDLOG_USE_STD_FORMAT) 14 | #if !defined(SPDLOG_FMT_EXTERNAL) 15 | #ifdef SPDLOG_HEADER_ONLY 16 | #ifndef FMT_HEADER_ONLY 17 | #define FMT_HEADER_ONLY 18 | #endif 19 | #endif 20 | #include 21 | #else 22 | #include 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /extern/asio/mxasio/detail/cstddef.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstddef.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_DETAIL_CSTDDEF_HPP 12 | #define MXASIO_DETAIL_CSTDDEF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | #include 20 | 21 | namespace mxasio { 22 | 23 | using std::nullptr_t; 24 | 25 | } // namespace mxasio 26 | 27 | #endif // MXASIO_DETAIL_CSTDDEF_HPP 28 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | // stop the worker thread and join it 14 | SPDLOG_INLINE periodic_worker::~periodic_worker() { 15 | if (worker_thread_.joinable()) { 16 | { 17 | std::lock_guard lock(mutex_); 18 | active_ = false; 19 | } 20 | cv_.notify_one(); 21 | worker_thread_.join(); 22 | } 23 | } 24 | 25 | } // namespace details 26 | } // namespace spdlog 27 | -------------------------------------------------------------------------------- /extern/asio/mxasio/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // version.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_VERSION_HPP 12 | #define MXASIO_VERSION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | // MXASIO_VERSION % 100 is the sub-minor version 19 | // MXASIO_VERSION / 100 % 1000 is the minor version 20 | // MXASIO_VERSION / 100000 is the major version 21 | #define MXASIO_VERSION 103002 // 1.30.2 22 | 23 | #endif // MXASIO_VERSION_HPP 24 | -------------------------------------------------------------------------------- /mx_accl/include/memx/accl/utils/cpu_opts.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025 MemryX 2 | // SPDX-License-Identifier: MPL-2.0 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla Public 5 | // License, v. 2.0. If a copy of the MPL was not distributed with this 6 | // file, You can obtain one at https://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef CPU_OPTS_H 9 | #define CPU_OPTS_H 10 | 11 | #pragma once 12 | 13 | namespace MX { 14 | namespace Utils { 15 | 16 | /** 17 | * @brief Sets the CPU affinity of the current thread and all children to the big cores. 18 | * 19 | * @param min_num_cores Minimum number of big cores needed on system in order to restrict affinity. 20 | */ 21 | void set_self_affinity_to_big_cores(uint32_t min_num_cores); 22 | 23 | } 24 | } 25 | 26 | #endif // CPU_OPTS_H 27 | -------------------------------------------------------------------------------- /extern/asio/mxasio/buffered_read_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_read_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_BUFFERED_READ_STREAM_FWD_HPP 12 | #define MXASIO_BUFFERED_READ_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace mxasio { 19 | 20 | template 21 | class buffered_read_stream; 22 | 23 | } // namespace mxasio 24 | 25 | #endif // MXASIO_BUFFERED_READ_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /extern/asio/mxasio/buffered_write_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_write_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_BUFFERED_WRITE_STREAM_FWD_HPP 12 | #define MXASIO_BUFFERED_WRITE_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace mxasio { 19 | 20 | template 21 | class buffered_write_stream; 22 | 23 | } // namespace mxasio 24 | 25 | #endif // MXASIO_BUFFERED_WRITE_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /extern/asio/mxasio/detail/array.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_DETAIL_ARRAY_HPP 12 | #define MXASIO_DETAIL_ARRAY_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | 20 | #include 21 | 22 | namespace mxasio { 23 | namespace detail { 24 | 25 | using std::array; 26 | 27 | } // namespace detail 28 | } // namespace mxasio 29 | 30 | #endif // MXASIO_DETAIL_ARRAY_HPP 31 | -------------------------------------------------------------------------------- /extern/asio/mxasio/ts/net.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/net.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_TS_NET_HPP 12 | #define MXASIO_TS_NET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/ts/netfwd.hpp" 19 | #include "mxasio/ts/executor.hpp" 20 | #include "mxasio/ts/io_context.hpp" 21 | #include "mxasio/ts/timer.hpp" 22 | #include "mxasio/ts/buffer.hpp" 23 | #include "mxasio/ts/socket.hpp" 24 | #include "mxasio/ts/internet.hpp" 25 | 26 | #endif // MXASIO_TS_NET_HPP 27 | -------------------------------------------------------------------------------- /extern/asio/mxasio/signal_set.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // signal_set.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_SIGNAL_SET_HPP 12 | #define MXASIO_SIGNAL_SET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | #include "mxasio/basic_signal_set.hpp" 20 | 21 | namespace mxasio { 22 | 23 | /// Typedef for the typical usage of a signal set. 24 | typedef basic_signal_set<> signal_set; 25 | 26 | } // namespace mxasio 27 | 28 | #endif // MXASIO_SIGNAL_SET_HPP 29 | -------------------------------------------------------------------------------- /extern/asio/mxasio/ts/timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/timer.hpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_TS_TIMER_HPP 12 | #define MXASIO_TS_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/chrono.hpp" 19 | 20 | #include "mxasio/wait_traits.hpp" 21 | #include "mxasio/basic_waitable_timer.hpp" 22 | #include "mxasio/system_timer.hpp" 23 | #include "mxasio/steady_timer.hpp" 24 | #include "mxasio/high_resolution_timer.hpp" 25 | 26 | #endif // MXASIO_TS_TIMER_HPP 27 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const { 13 | return msg_level >= level_.load(std::memory_order_relaxed); 14 | } 15 | 16 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) { 17 | level_.store(log_level, std::memory_order_relaxed); 18 | } 19 | 20 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const { 21 | return static_cast(level_.load(std::memory_order_relaxed)); 22 | } 23 | -------------------------------------------------------------------------------- /extern/asio/mxasio/detail/exception.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/exception.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_DETAIL_EXCEPTION_HPP 12 | #define MXASIO_DETAIL_EXCEPTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | #include 20 | 21 | namespace mxasio { 22 | 23 | using std::exception_ptr; 24 | using std::current_exception; 25 | using std::rethrow_exception; 26 | 27 | } // namespace mxasio 28 | 29 | #endif // MXASIO_DETAIL_EXCEPTION_HPP 30 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/cfg/helpers.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace cfg { 11 | namespace helpers { 12 | // 13 | // Init levels from given string 14 | // 15 | // Examples: 16 | // 17 | // set global level to debug: "debug" 18 | // turn off all logging except for logger1: "off,logger1=debug" 19 | // turn off all logging except for logger1 and logger2: "off,logger1=debug,logger2=info" 20 | // 21 | SPDLOG_API void load_levels(const std::string &txt); 22 | } // namespace helpers 23 | 24 | } // namespace cfg 25 | } // namespace spdlog 26 | 27 | #ifdef SPDLOG_HEADER_ONLY 28 | #include "helpers-inl.h" 29 | #endif // SPDLOG_HEADER_ONLY 30 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | DH_VERBOSE = 1 4 | 5 | include /usr/share/dpkg/pkg-info.mk 6 | include /usr/share/dpkg/architecture.mk 7 | 8 | %: 9 | dh $@ 10 | 11 | override_dh_install: 12 | dh_install build/mx_accl/libmx_accl.so.2 usr/lib/$(DEB_HOST_GNU_CPU)-linux-gnu/ 13 | dh_link usr/lib/$(DEB_HOST_GNU_CPU)-linux-gnu/libmx_accl.so.2 usr/lib/$(DEB_HOST_GNU_CPU)-linux-gnu/libmx_accl.so 14 | dh_install mx_accl/include/memx/* usr/include/memx/ 15 | dh_install build/samples/acclBench/acclBench usr/bin/ 16 | 17 | override_dh_shlibdeps: 18 | dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info 19 | 20 | override_dh_auto_configure: 21 | override_dh_auto_build: 22 | override_dh_auto_test: 23 | 24 | override_dh_auto_install: 25 | rm -rf build ; mkdir build ; cd build ; cmake -DCMAKE_BUILD_TYPE=Packaging .. && make -j 8 26 | 27 | override_dh_auto_clean: 28 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory { 14 | template 15 | static std::shared_ptr create(std::string logger_name, SinkArgs &&...args) { 16 | auto sink = std::make_shared(std::forward(args)...); 17 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 18 | details::registry::instance().initialize_logger(new_logger); 19 | return new_logger; 20 | } 21 | }; 22 | } // namespace spdlog 23 | -------------------------------------------------------------------------------- /extern/asio/mxasio/system_error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // system_error.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_SYSTEM_ERROR_HPP 12 | #define MXASIO_SYSTEM_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | #include 20 | 21 | #include "mxasio/detail/push_options.hpp" 22 | 23 | namespace mxasio { 24 | 25 | typedef std::system_error system_error; 26 | 27 | } // namespace mxasio 28 | 29 | #include "mxasio/detail/pop_options.hpp" 30 | 31 | #endif // MXASIO_SYSTEM_ERROR_HPP 32 | -------------------------------------------------------------------------------- /extern/asio/mxasio/detail/functional.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/functional.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_DETAIL_FUNCTIONAL_HPP 12 | #define MXASIO_DETAIL_FUNCTIONAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | #include 20 | 21 | namespace mxasio { 22 | namespace detail { 23 | 24 | using std::function; 25 | 26 | } // namespace detail 27 | 28 | using std::ref; 29 | using std::reference_wrapper; 30 | 31 | } // namespace mxasio 32 | 33 | #endif // MXASIO_DETAIL_FUNCTIONAL_HPP 34 | -------------------------------------------------------------------------------- /extern/asio/mxasio/static_thread_pool.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // static_thread_pool.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_STATIC_THREAD_POOL_HPP 12 | #define MXASIO_STATIC_THREAD_POOL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | #include "mxasio/thread_pool.hpp" 20 | 21 | #include "mxasio/detail/push_options.hpp" 22 | 23 | namespace mxasio { 24 | 25 | typedef thread_pool static_thread_pool; 26 | 27 | } // namespace mxasio 28 | 29 | #include "mxasio/detail/pop_options.hpp" 30 | 31 | #endif // MXASIO_STATIC_THREAD_POOL_HPP 32 | -------------------------------------------------------------------------------- /extern/asio/mxasio/streambuf.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // streambuf.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_STREAMBUF_HPP 12 | #define MXASIO_STREAMBUF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | 20 | #if !defined(MXASIO_NO_IOSTREAM) 21 | 22 | #include "mxasio/basic_streambuf.hpp" 23 | 24 | namespace mxasio { 25 | 26 | /// Typedef for the typical usage of basic_streambuf. 27 | typedef basic_streambuf<> streambuf; 28 | 29 | } // namespace mxasio 30 | 31 | #endif // !defined(MXASIO_NO_IOSTREAM) 32 | 33 | #endif // MXASIO_STREAMBUF_HPP 34 | -------------------------------------------------------------------------------- /extern/asio/mxasio/ssl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl.hpp 3 | // ~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_SSL_HPP 12 | #define MXASIO_SSL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/ssl/context.hpp" 19 | #include "mxasio/ssl/context_base.hpp" 20 | #include "mxasio/ssl/error.hpp" 21 | #include "mxasio/ssl/rfc2818_verification.hpp" 22 | #include "mxasio/ssl/host_name_verification.hpp" 23 | #include "mxasio/ssl/stream.hpp" 24 | #include "mxasio/ssl/stream_base.hpp" 25 | #include "mxasio/ssl/verify_context.hpp" 26 | #include "mxasio/ssl/verify_mode.hpp" 27 | 28 | #endif // MXASIO_SSL_HPP 29 | -------------------------------------------------------------------------------- /extern/asio/mxasio/ts/socket.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/socket.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_TS_SOCKET_HPP 12 | #define MXASIO_TS_SOCKET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/socket_base.hpp" 19 | #include "mxasio/basic_socket.hpp" 20 | #include "mxasio/basic_datagram_socket.hpp" 21 | #include "mxasio/basic_stream_socket.hpp" 22 | #include "mxasio/basic_socket_acceptor.hpp" 23 | #include "mxasio/basic_socket_streambuf.hpp" 24 | #include "mxasio/basic_socket_iostream.hpp" 25 | #include "mxasio/connect.hpp" 26 | 27 | #endif // MXASIO_TS_SOCKET_HPP 28 | -------------------------------------------------------------------------------- /extern/asio/mxasio/detail/date_time_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/date_time_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_DETAIL_DATE_TIME_FWD_HPP 12 | #define MXASIO_DETAIL_DATE_TIME_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | 20 | namespace boost { 21 | namespace date_time { 22 | 23 | template 24 | class base_time; 25 | 26 | } // namespace date_time 27 | namespace posix_time { 28 | 29 | class ptime; 30 | 31 | } // namespace posix_time 32 | } // namespace boost 33 | 34 | #endif // MXASIO_DETAIL_DATE_TIME_FWD_HPP 35 | -------------------------------------------------------------------------------- /extern/asio/mxasio/io_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_IO_SERVICE_HPP 12 | #define MXASIO_IO_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/io_context.hpp" 19 | 20 | #include "mxasio/detail/push_options.hpp" 21 | 22 | namespace mxasio { 23 | 24 | #if !defined(MXASIO_NO_DEPRECATED) 25 | /// Typedef for backwards compatibility. 26 | typedef io_context io_service; 27 | #endif // !defined(MXASIO_NO_DEPRECATED) 28 | 29 | } // namespace mxasio 30 | 31 | #include "mxasio/detail/pop_options.hpp" 32 | 33 | #endif // MXASIO_IO_SERVICE_HPP 34 | -------------------------------------------------------------------------------- /extern/spdlog/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | #include 13 | 14 | #if defined(SPDLOG_USE_STD_FORMAT) // SPDLOG_USE_STD_FORMAT is defined - use std::format 15 | #include 16 | #elif !defined(SPDLOG_FMT_EXTERNAL) 17 | #if !defined(SPDLOG_COMPILED_LIB) && !defined(FMT_HEADER_ONLY) 18 | #define FMT_HEADER_ONLY 19 | #endif 20 | #ifndef FMT_USE_WINDOWS_H 21 | #define FMT_USE_WINDOWS_H 0 22 | #endif 23 | 24 | #include 25 | #include 26 | 27 | #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib 28 | #include 29 | #include 30 | #endif 31 | -------------------------------------------------------------------------------- /mx_accl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories("${MX_API_DIR}/include/") 2 | 3 | file(GLOB local_src src/*.cpp src/utils/*.cpp) 4 | 5 | add_library(${MXACCL_DYNAMIC} SHARED ${local_src}) 6 | target_link_libraries(${MXACCL_DYNAMIC} memx pthread dl cpuinfo) 7 | set_target_properties(${MXACCL_DYNAMIC} PROPERTIES SOVERSION 2) 8 | 9 | target_compile_options(${MXACCL_DYNAMIC} PRIVATE -Werror) 10 | 11 | target_include_directories(${MXACCL_DYNAMIC} PRIVATE ${MX_API_HOME_DIR}/extern/asio) 12 | target_include_directories(${MXACCL_DYNAMIC} PRIVATE ${MX_API_HOME_DIR}/extern/spdlog) 13 | 14 | install(TARGETS ${MXACCL_DYNAMIC} 15 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 16 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 17 | ) 18 | 19 | install(DIRECTORY ${MX_API_DIR}/include/memx/ DESTINATION include/memx) 20 | 21 | 22 | if(CMAKE_BUILD_TYPE MATCHES "Debug") 23 | target_link_options(${MXACCL_DYNAMIC} 24 | BEFORE PUBLIC PUBLIC 25 | ) 26 | endif() 27 | -------------------------------------------------------------------------------- /extern/asio/mxasio/impl/system_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/system_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_IMPL_SYSTEM_CONTEXT_HPP 12 | #define MXASIO_IMPL_SYSTEM_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/system_executor.hpp" 19 | 20 | #include "mxasio/detail/push_options.hpp" 21 | 22 | namespace mxasio { 23 | 24 | inline system_context::executor_type 25 | system_context::get_executor() noexcept 26 | { 27 | return system_executor(); 28 | } 29 | 30 | } // namespace mxasio 31 | 32 | #include "mxasio/detail/pop_options.hpp" 33 | 34 | #endif // MXASIO_IMPL_SYSTEM_CONTEXT_HPP 35 | -------------------------------------------------------------------------------- /extern/asio/mxasio/ssl/impl/src.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/ssl/src.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_SSL_IMPL_SRC_HPP 12 | #define MXASIO_SSL_IMPL_SRC_HPP 13 | 14 | #define MXASIO_SOURCE 15 | 16 | #include "mxasio/detail/config.hpp" 17 | 18 | #if defined(MXASIO_HEADER_ONLY) 19 | # error Do not compile Asio library source with MXASIO_HEADER_ONLY defined 20 | #endif 21 | 22 | #include "mxasio/ssl/impl/context.ipp" 23 | #include "mxasio/ssl/impl/error.ipp" 24 | #include "mxasio/ssl/detail/impl/engine.ipp" 25 | #include "mxasio/ssl/detail/impl/openssl_init.ipp" 26 | #include "mxasio/ssl/impl/host_name_verification.ipp" 27 | #include "mxasio/ssl/impl/rfc2818_verification.ipp" 28 | 29 | #endif // MXASIO_SSL_IMPL_SRC_HPP 30 | -------------------------------------------------------------------------------- /extern/asio/mxasio/detail/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/regex_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_DETAIL_REGEX_FWD_HPP 12 | #define MXASIO_DETAIL_REGEX_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if defined(MXASIO_HAS_BOOST_REGEX) 19 | 20 | namespace boost { 21 | 22 | template 23 | struct sub_match; 24 | 25 | template 26 | class match_results; 27 | 28 | template 29 | class basic_regex; 30 | 31 | } // namespace boost 32 | 33 | #endif // defined(MXASIO_HAS_BOOST_REGEX) 34 | 35 | #endif // MXASIO_DETAIL_REGEX_FWD_HPP 36 | -------------------------------------------------------------------------------- /extern/asio/mxasio/associator.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // associator.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef MXASIO_ASSOCIATOR_HPP 12 | #define MXASIO_ASSOCIATOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "mxasio/detail/config.hpp" 19 | 20 | #include "mxasio/detail/push_options.hpp" 21 | 22 | namespace mxasio { 23 | 24 | /// Used to generically specialise associators for a type. 25 | template