Typedefs#
Geometry#
- group geometry
Geometry types.
Typedefs
-
using coord_t = Legion::coord_t#
Coordinate type.
-
template<int DIM, typename T = coord_t>
using Point = Legion::Point<DIM, T># Type for multi-dimensional points.
Point objects support index expressions; they can be accessed like a statically-sized array. Point objects also support usual arithmetic operators and a dot opreator.
For a complete definition, see Realm::Point.
-
template<int DIM, typename T = coord_t>
using Rect = Legion::Rect<DIM, T># Type for multi-dimensional rectangles.
Each rectangle consists of two legate::Point objects, one for the lower bounds (
.lo
) and one for the upper bounds (.hi
).For a complete definition, see Realm::Rect.
-
using DomainPoint = Legion::DomainPoint#
Dimension-erased type for multi-dimensional points.
For a complete definition, see Legion::DomainPoint.
-
using Domain = Legion::Domain#
Dimension-erased type for multi-dimensional rectangles.
For a complete definition, see Legion::Domain.
-
using coord_t = Legion::coord_t#
Accessor#
- group accessor
Accessors provide an interface to access values in stores. Access modes are encoded in the accessor types so that the compiler can catch invalid accesses. Accessors also provide bounds checks (which can be turned on with a compile flag).
All accessors have a
ptr
method that returns a raw pointer to the underlying allocation. The caller can optionally pass an array to query strides of dimensions, necessary for correct accesse. Unlike the accesses mediated by accessors, raw pointer accesses are not protected by Legate, and thus the developer should make sure of safety of the accesses.The most common mistake with raw pointers from reduction accessors are that the code overwrites values to the elements, instead of reducing them. The key contract with reduction is that the values must be reduced to the elements in the store. So, any client code that uses a raw pointer to a reduction store should make sure that it makes updates to the effect of reducing its contributions to the original elements. Not abiding by this contract can lead to non-deterministic conrrectness issues.
Typedefs
-
template<typename FT, int N, typename T = coord_t>
using AccessorRO = Legion::FieldAccessor<LEGION_READ_ONLY, FT, N, T, Realm::AffineAccessor<FT, N, T>># Read-only accessor.
See legion.h for a complete list of supported operators.
-
template<typename FT, int N, typename T = coord_t>
using AccessorWO = Legion::FieldAccessor<LEGION_WRITE_DISCARD, FT, N, T, Realm::AffineAccessor<FT, N, T>># Write-only accessor.
See legion.h for a complete list of supported operators.
-
template<typename FT, int N, typename T = coord_t>
using AccessorRW = Legion::FieldAccessor<LEGION_READ_WRITE, FT, N, T, Realm::AffineAccessor<FT, N, T>># Read-write accessor.
See legion.h for a complete list of supported operators.
-
template<typename REDOP, bool EXCLUSIVE, int N, typename T = coord_t>
using AccessorRD = Legion::ReductionAccessor<REDOP, EXCLUSIVE, N, T, Realm::AffineAccessor<typename REDOP::RHS, N, T>># Reduction accessor.
Unlike the other accessors, an index expression on a reduction accessor allows the client to perform only two operations,
<<=
andreduce
, both of which reduce a value to the chosen element.See legion.h for details about the reduction accessor.
-
template<typename FT, int N, typename T = coord_t>
Iterator#
- group iterator
Iterator types.
Typedefs
-
template<int DIM, typename T = coord_t>
using PointInRectIterator = Legion::PointInRectIterator<DIM, T># Iterator that iterates all points in a given
legate::Rect
.See Realm::PointInRectIterator for a complete definition.
-
template<int DIM, typename T = coord_t>
using PointInDomainIterator = Legion::PointInDomainIterator<DIM, T># Iterator that iterates all points in a given
legate::Domain
.See Legion::PointInDomainIterator for a complete definition.
-
template<int DIM, typename T = coord_t>
Machine#
- group machine
Objects for interacting with the Machine.
Typedefs
-
using Processor = Legion::Processor#
Logical processor handle.
Legate libraries rarely use processor handles directly and there are no Legate APIs that take a processor handle. However, the libraries may want to query the processor that runs the current task to perform some processor- or processor kind-specific operations. In that case,
legate::Runtime::get_runtime()->get_executing_processor()
can be used. Other useful memobers oflegate::Processor
are thekind
method, which returns the processor kind, andlegate::Processor::Kind
, an enum for all processor types.See Realm::Processor for a complete definition. The list of processor types can be found here.
-
using Memory = Legion::Memory#
Logical memory handle.
In Legate, libraries will never have to use memory handles directly. However, some Legate APIs (e.g., create_buffer()) take a memory kind as an argument;
legate::Memory::Kind
is an enum for all memory types.See Realm::Memory for a complete definition. The list of memory types can be found here.
-
using Processor = Legion::Processor#
Reduction#
- group reduction
All built-in operators are defined for signed and unsigned integer types. Floating point types (
__half
,float
, anddouble
) are supported by all but bitwise operators. Arithmetic operators also cover complex typescomplex<__half>
andcomplex<float>
.For details about reduction operators, See Library::register_reduction_operator.
Typedefs
-
template<typename T>
using SumReduction = Legion::SumReduction<T># Reduction with addition.
See Legion::SumReduction.
-
template<typename T>
using DivReduction = Legion::DivReduction<T># Reduction with division.
See Legion::DivReduction.
-
template<typename T>
using MaxReduction = Legion::MaxReduction<T># Reduction with the binary max operator.
See Legion::MaxReduction.
-
template<typename T>
using MinReduction = Legion::MinReduction<T># Reduction with the binary min operator.
See Legion::MinReduction.
-
template<typename T>
using OrReduction = Legion::OrReduction<T># Reduction with bitwise or.
See Legion::OrReduction.
-
template<typename T>
using AndReduction = Legion::AndReduction<T># Reduction with bitwise and.
See Legion::AndReduction.
-
template<typename T>
using XorReduction = Legion::XorReduction<T># Reduction with bitwise xor.
See Legion::XorReduction.
-
template<typename T>