MCPcopy Create free account
hub / github.com/MikePopoloski/slang / DimResult

Class DimResult

source/ast/builtins/QueryFuncs.cpp:228–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226
227protected:
228 struct DimResult {
229 AssociativeArray map;
230 const Type* indexType = nullptr;
231 ConstantRange range;
232 bool hardFail = false;
233 bool isDynamic = false;
234 bool outOfRange = false;
235
236 DimResult() : hardFail(true) {}
237 DimResult(ConstantRange range) : range(range) {}
238 DimResult(size_t dynamicSize) : range{0, int32_t(dynamicSize) - 1}, isDynamic(true) {}
239 DimResult(AssociativeArray&& map, const Type* indexType) :
240 map(std::move(map)), indexType(indexType) {}
241
242 static DimResult OutOfRange() {
243 DimResult result;
244 result.hardFail = false;
245 result.outOfRange = true;
246 return result;
247 }
248 };
249
250 DimResult getDim(EvalContext& context, const Args& args) const {
251 if (!noHierarchical(context, *args[0]))

Callers 1

getDimMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected