nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
standard_library.hpp
Go to the documentation of this file.
1
3// src/bundle/include/nk/bundle/standard_library.hpp
4//
5// The composition layer for NK. StandardLibrary::install wires all
6// standard subsystems (Runtime, Builtin, and all Toolboxes) into an Engine instance.
7#pragma once
8
9#include <memory>
10#include <memory_resource>
11
12namespace nk {
13
16
17
18class Engine;
19
21public:
22 static void install(Engine &engine);
23};
24
26inline void installStandardLibrary(Engine &engine) {
27 StandardLibrary::install(engine);
28}
29
30// Convenience: construct an Engine on the heap with the standard library
31// already installed. Returned by unique_ptr because Engine is non-movable.
32std::unique_ptr<Engine> makeStandardEngine(std::pmr::memory_resource *mr = nullptr);
33
34
36} // namespace nk
void installStandardLibrary(Engine &engine)
Forwarder for backward compatibility.