21#include "legate/mapping/machine.h"
22#include "legate/runtime/runtime.h"
23#include "legate/timing/timing.h"
25#include "legion/legion_config.h"
27using namespace legate;
53inline Runtime*
get_runtime() {
return Runtime::get_runtime(); }
75inline Constraint
align(
const Variable& a,
const Variable& b) {
76 return legate::align(a, b);
89 return rt->create_task(lib,
id);
103 const Domain& domain) {
104 return rt->create_task(lib,
id, domain);
115 return rt->submit(std::move(task));
126 return rt->submit(std::move(task));
149 bool nullable =
false) {
150 return Runtime::get_runtime()->create_array(ty, dim, nullable);
163 bool nullable =
false,
164 bool optimize_scalar =
false) {
165 return Runtime::get_runtime()->create_array(shape, ty, nullable,
177 std::uint32_t dim = 1) {
178 return Runtime::get_runtime()->create_store(ty, dim);
190 bool optimize_scalar =
false) {
191 return Runtime::get_runtime()->create_store(shape, ty, optimize_scalar);
202 const Shape& shape = Shape{1}) {
203 return Runtime::get_runtime()->create_store(scalar, shape);
214 return legate::timing::measure_microseconds().value();
222 return legate::timing::measure_nanoseconds().value();
Definition wrapper.inl:131
Scalar string_to_scalar(std::string str)
Convert a string to a Scalar.
Definition wrapper.inl:138
LogicalArray create_unbound_array(const Type &ty, std::uint32_t dim=1, bool nullable=false)
Create an unbound array.
Definition wrapper.inl:148
LogicalStore store_from_scalar(const Scalar &scalar, const Shape &shape=Shape{1})
Create a store from a scalar value.
Definition wrapper.inl:201
LogicalArray create_array(const Shape &shape, const Type &ty, bool nullable=false, bool optimize_scalar=false)
Create an array with a specified shape.
Definition wrapper.inl:162
LogicalStore create_store(const Shape &shape, const Type &ty, bool optimize_scalar=false)
Create a store with a specified shape.
Definition wrapper.inl:189
LogicalStore create_unbound_store(const Type &ty, std::uint32_t dim=1)
Create an unbound store.
Definition wrapper.inl:176
Definition wrapper.inl:35
int32_t legate_finish()
Finalize the Legate runtime.
Definition wrapper.inl:47
bool has_started()
Check whether the Legate runtime has started.
Definition wrapper.inl:59
void start_legate()
Start the Legate runtime.
Definition wrapper.inl:41
bool has_finished()
Check whether the Legate runtime has finished.
Definition wrapper.inl:65
Runtime * get_runtime()
Return the current Legate runtime instance.
Definition wrapper.inl:53
Definition wrapper.inl:68
auto submit_manual_task(Runtime *rt, ManualTask &task)
Submit a manual task to the runtime.
Definition wrapper.inl:125
auto submit_auto_task(Runtime *rt, AutoTask &task)
Submit an auto task to the runtime.
Definition wrapper.inl:114
Constraint align(const Variable &a, const Variable &b)
Align two variables.
Definition wrapper.inl:75
ManualTask create_manual_task(Runtime *rt, Library lib, LocalTaskID id, const Domain &domain)
Create an manual task in the runtime.
Definition wrapper.inl:102
AutoTask create_auto_task(Runtime *rt, Library lib, LocalTaskID id)
Create an auto task in the runtime.
Definition wrapper.inl:88
Definition wrapper.inl:207
uint64_t time_nanoseconds()
Measure time in nanoseconds.
Definition wrapper.inl:221
uint64_t time_microseconds()
Measure time in microseconds.
Definition wrapper.inl:213
These functions can be invoked from Julia.
Definition wrapper.inl:34