view.load
← view dialect
Load one scalar element from a typed view at a full-rank logical index. The index list is expressed in view coordinates and must name one position per view axis.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Interfaces |
MemoryAccess |
| Memory effects |
read view |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
view |
view |
required |
Typed source view. |
| Operand |
indices |
index |
variadic |
Dynamic logical element indices. |
| Result |
result |
scalar |
required |
Loaded scalar element. |
| Attribute |
cache_scope |
enum CacheScope |
optional |
Optional cache/coherency scope required by target lowering. |
| Attribute |
cache_temporal |
enum CacheTemporal |
optional |
Optional temporal cache policy required by target lowering. |
| Attribute |
static_indices |
i64_array |
required |
Static logical element indices with INT64_MIN sentinels for dynamics. |
Verification constraints
SameElementType(view, result)
Examples
%x = view.load %view[%row, %col] : view<[%M]x[%N]xf32, %layout> -> f32