34#include "llvm/ADT/DenseMap.h"
35#include "llvm/ADT/STLExtras.h"
36#include "llvm/Support/raw_ostream.h"
47 if (std::optional<MapFlags> flags =
getMapFlags(mapOp))
48 return bitEnumContainsAny(*flags, MapFlags::devptr);
50 return *clause == DataClause::acc_deviceptr;
57 return isDataEntryOp(mapOp) && environment->isAncestor(mapOp);
65 MapFlags ptrAndObjFlag = ptrAndObj ? MapFlags::ptr_and_obj : MapFlags::none;
67 if (clause == DataClause::acc_declare_device_resident)
68 return MapFlags::present | ptrAndObjFlag;
69 if (clause == DataClause::acc_attach || clause == DataClause::acc_detach)
72 MapFlags::device_resident);
87 flags = MapFlags::devptr | MapFlags::literal;
88 else if (
auto mapInfo = dyn_cast<MapInfoOp>(mapOp))
89 flags = mapInfo.getMapFlags();
93 flags = flags | MapFlags::implicit;
100static FailureOr<Value>
103 ConversionPatternRewriter &rewriter) {
104 Type ptrTy = LLVM::LLVMPointerType::get(rewriter.getContext());
107 return Value(LLVM::ZeroOp::create(rewriter, loc, ptrTy));
110 if (
auto memrefType = dyn_cast<MemRefType>(operand.
getType())) {
111 ModuleOp module = rewriter.getInsertionBlock()
113 ->getParentOfType<ModuleOp>();
115 memrefType.getElementType(), module, &accSupport);
116 if (!sizeAndAlignment) {
118 llvm::raw_string_ostream os(message);
119 os <<
"unhandled type size computation for type: "
120 << memrefType.getElementType();
125 loc, memrefType, converted, {},
126 constantI64(loc, sizeAndAlignment->first.getFixedValue(), rewriter),
129 return Value(LLVM::ZeroOp::create(rewriter, loc, ptrTy));
135 gpu::LaunchFuncOp launch, gpu::LaunchFuncOpAdaptor adaptor,
136 ValueRange alreadyMappedOperands, ConversionPatternRewriter &rewriter,
141 for (
auto [operand, converted] : llvm::zip_equal(
142 launch.getKernelOperands(), adaptor.getKernelOperands())) {
143 bool alreadyMapped = llvm::is_contained(alreadyMappedOperands, operand);
145 Operation *mapOp = operand.getDefiningOp();
151 loc,
isDataEntryOp(mapOp) ? mapOp :
nullptr, mapFlags, rewriter);
155 loc, operand, converted, mapFlags, accSupport, rewriter);
162 loc, operand, accSupport, globalSymbolRegion, &symbolTable, rewriter);
164 loc, operand, converted, alreadyMapped, accSupport, rewriter);
165 if (failed(descriptor))
168 objects.push_back(args);
177 gpu::LaunchFuncOp launch, gpu::LaunchFuncOpAdaptor adaptor,
178 ValueRange alreadyMappedOperands, ConversionPatternRewriter &rewriter,
182 launch, adaptor, alreadyMappedOperands, rewriter, accSupport,
183 globalSymbolRegion, symbolTable, config);
190 Type i32Ty = rewriter.getI32Type();
191 Type ptrTy = LLVM::LLVMPointerType::get(context);
193 Value args = LLVM::ZeroOp::create(rewriter, loc, argsType);
195 args = LLVM::InsertValueOp::create(
196 rewriter, loc, argsType, args, value,
199 insert(runtimeArgs.
argNum, KernelArgumentField::ArgNum);
200 insert(runtimeArgs.
argBasePtrs, KernelArgumentField::ArgBasePtrs);
201 insert(runtimeArgs.
argPtrs, KernelArgumentField::ArgPtrs);
202 insert(runtimeArgs.
argSizes, KernelArgumentField::ArgSizes);
203 insert(runtimeArgs.
argTypes, KernelArgumentField::ArgTypes);
204 insert(runtimeArgs.
argNames, KernelArgumentField::ArgNames);
205 insert(runtimeArgs.
argMappers, KernelArgumentField::ArgMappers);
206 insert(runtimeArgs.
argDescs, KernelArgumentField::ArgDescs);
212 insert(LLVM::MulOp::create(rewriter, loc, blockY, blockZ),
213 KernelArgumentField::NumWorkers);
214 insert(
castToI64(loc, adaptor.getBlockSizeX(), rewriter),
215 KernelArgumentField::VectorLength);
216 Value dynamicSharedMemorySize =
217 adaptor.getDynamicSharedMemorySize()
218 ?
castToI64(loc, adaptor.getDynamicSharedMemorySize(), rewriter)
220 insert(dynamicSharedMemorySize, KernelArgumentField::SmemSize);
225 std::array<Value, 3> gridSizes = {
226 adaptor.getGridSizeX(), adaptor.getGridSizeY(), adaptor.getGridSizeZ()};
227 for (
auto [dimension, gridSize] : llvm::enumerate(gridSizes))
228 args = LLVM::InsertValueOp::create(
229 rewriter, loc, argsType, args,
castToI64(loc, gridSize, rewriter),
232 Value one = LLVM::ConstantOp::create(rewriter, loc, i32Ty, 1);
233 Value argsPtr = LLVM::AllocaOp::create(rewriter, loc, ptrTy, argsType, one);
234 LLVM::StoreOp::create(rewriter, loc, args, argsPtr);
239 ConversionPatternRewriter &rewriter,
240 Region &globalSymbolRegion,
243 Type ptrTy = LLVM::LLVMPointerType::get(rewriter.getContext());
244 StringRef kernelName = launch.getKernel().getLeafReference().getValue();
245 if (
auto function = symbolTable.
lookup<LLVM::LLVMFuncOp>(kernelName))
246 return LLVM::AddressOfOp::create(rewriter, loc, ptrTy, function.getName())
248 if (
auto function = symbolTable.
lookup<func::FuncOp>(kernelName))
249 return LLVM::AddressOfOp::create(rewriter, loc, ptrTy, function.getName())
253 launch, launch.getKernel());
259 rewriter.setInsertionPointToStart(&globalSymbolRegion.
front());
260 auto functionType = LLVM::LLVMFunctionType::get(
261 LLVM::LLVMVoidType::get(rewriter.getContext()), {});
263 LLVM::LLVMFuncOp::create(rewriter, loc, kernelName, functionType);
264 symbolTable.
insert(declaration);
266 return LLVM::AddressOfOp::create(rewriter, loc, ptrTy, kernelName)
273 if (symbolTable.
lookup<LLVM::LLVMFuncOp>(name))
276 auto functionType = LLVM::LLVMFunctionType::get(
result, arguments);
278 LLVM::LLVMFuncOp::create(builder, loc, name, functionType));
286 ConversionPatternRewriter &rewriter,
287 Region &globalSymbolRegion,
290 Type i32Ty = rewriter.getI32Type();
291 Type ptrTy = LLVM::LLVMPointerType::get(context);
292 Type voidTy = LLVM::LLVMVoidType::get(context);
294 Block *preBlock = rewriter.getInsertionBlock();
295 Block *continueBlock =
296 rewriter.splitBlock(preBlock, rewriter.getInsertionPoint());
298 rewriter.createBlock(preBlock->
getParent(), continueBlock->getIterator());
299 rewriter.setInsertionPointToEnd(preBlock);
302 Value failed = LLVM::ICmpOp::create(rewriter, loc, LLVM::ICmpPredicate::ne,
304 LLVM::CondBrOp::create(rewriter, loc, failed, errorBlock,
ValueRange{},
308 rewriter.setInsertionPointToStart(errorBlock);
309 declareLibc(symbolTable, globalSymbolRegion, loc,
"puts", i32Ty, {ptrTy});
310 declareLibc(symbolTable, globalSymbolRegion, loc,
"fflush", i32Ty, {ptrTy});
311 declareLibc(symbolTable, globalSymbolRegion, loc,
"abort", voidTy, {});
314 "host fallback execution is not implemented\n", globalSymbolRegion,
316 LLVM::CallOp::create(rewriter, loc,
TypeRange{i32Ty},
317 SymbolRefAttr::get(context,
"puts"),
319 Value nullFile = LLVM::ZeroOp::create(rewriter, loc, ptrTy);
320 LLVM::CallOp::create(rewriter, loc,
TypeRange{i32Ty},
321 SymbolRefAttr::get(context,
"fflush"),
323 LLVM::CallOp::create(rewriter, loc,
TypeRange{},
324 SymbolRefAttr::get(context,
"abort"),
ValueRange{});
325 LLVM::UnreachableOp::create(rewriter, loc);
326 rewriter.setInsertionPointToStart(continueBlock);
336 FailureOr<Value> kernelPointer =
338 if (failed(kernelPointer)) {
343 launch, adaptor, alreadyMappedOperands, rewriter, accSupport,
344 globalSymbolRegion, symbolTable, config);
345 if (failed(arguments))
348 StringRef kernelName = launch.getKernel().getLeafReference().getValue();
351 kernelName, globalSymbolRegion, &symbolTable);
353 globalSymbolRegion, config, &symbolTable);
362 FailureOr<LLVM::CallOp> call =
364 RuntimeFunction::ACCRTL_tgt_acc_kernel, config,
365 {ident, *kernelPointer, flags, deviceType, *arguments,
366 asyncQueue, kernelNamePtr, binaryDescriptor});
370 globalSymbolRegion, symbolTable);
375struct KernelEnvironmentLowering
377 KernelEnvironmentLowering(
const LLVMTypeConverter &converter,
378 OpenACCSupport &accSupport,
379 Region &globalSymbolRegion,
380 SymbolTable &symbolTable,
381 const ACCRuntimeCallConfig &config,
382 DeviceType clauseDeviceType,
383 PatternBenefit benefit = 1)
384 : ConvertOpToLLVMPattern<KernelEnvironmentOp>(converter, benefit),
385 accSupport(accSupport), globalSymbolRegion(globalSymbolRegion),
386 symbolTable(symbolTable), config(config),
387 clauseDeviceType(clauseDeviceType) {}
390 matchAndRewrite(KernelEnvironmentOp environment, OpAdaptor adaptor,
391 ConversionPatternRewriter &rewriter)
const override {
392 ValueRange mappingOperands = environment.getDataClauseOperands();
393 ValueRange convertedMappingOperands = adaptor.getDataClauseOperands();
394 Location beginLoc = mappingOperands.empty()
395 ? environment.getLoc()
396 : mappingOperands.front().getLoc();
399 getAsyncQueue(environment, clauseDeviceType, rewriter, config);
401 rewriter, accSupport, globalSymbolRegion,
402 symbolTable, config)))
405 SmallVector<Value> alreadyMappedOperands;
406 for (Value operand : mappingOperands)
408 alreadyMappedOperands.push_back(operand);
410 ACCDataCallOptions beginOptions;
411 beginOptions.
flags =
static_cast<int64_t
>(ACCDataRegionFlags::Implicit);
414 beginLoc, RuntimeFunction::ACCRTL_tgt_acc_data_begin, mappingOperands,
415 convertedMappingOperands, rewriter, accSupport, globalSymbolRegion,
416 symbolTable, config, {asyncQueue}, beginOptions);
417 if (
failed(devicePointers))
420 llvm::DenseMap<Value, Value> deviceAddress;
421 for (
auto [operand, pointer] :
422 llvm::zip_equal(alreadyMappedOperands, *devicePointers))
423 deviceAddress[operand] = pointer;
425 SmallVector<gpu::LaunchFuncOp> launches;
427 [&](gpu::LaunchFuncOp launch) { launches.push_back(launch); });
428 for (gpu::LaunchFuncOp launch : launches) {
429 SmallVector<Value> converted;
430 converted.reserve(launch->getNumOperands());
431 for (Value operand : launch->getOperands()) {
438 value = deviceAddress.lookup(operand);
440 value = rewriter.getRemappedValue(operand);
442 return rewriter.notifyMatchFailure(launch,
443 "unconverted kernel operand");
444 converted.push_back(value);
447 gpu::LaunchFuncOpAdaptor launchAdaptor(converted, launch);
448 Value queue = launchAdaptor.getAsyncObject();
449 queue = queue ?
castToI64(launch.getLoc(), queue, rewriter) : asyncQueue;
450 rewriter.setInsertionPoint(launch);
452 alreadyMappedOperands, rewriter, accSupport,
453 globalSymbolRegion, symbolTable, config)))
455 rewriter.eraseOp(launch);
458 rewriter.setInsertionPointAfter(environment);
459 ACCDataCallOptions endOptions;
460 endOptions.
callKind = ACCDataCallKind::DataExit;
461 endOptions.
flags =
static_cast<int64_t
>(ACCDataRegionFlags::Implicit);
463 endLoc, RuntimeFunction::ACCRTL_tgt_acc_data_end, mappingOperands,
464 convertedMappingOperands, rewriter, accSupport, globalSymbolRegion,
465 symbolTable, config, {asyncQueue}, endOptions)))
469 rewriter.eraseOp(environment);
473 OpenACCSupport &accSupport;
474 Region &globalSymbolRegion;
475 SymbolTable &symbolTable;
476 ACCRuntimeCallConfig config;
477 DeviceType clauseDeviceType;
483 target.addIllegalOp<KernelEnvironmentOp>();
489 Region &globalSymbolRegion,
492 DeviceType clauseDeviceType) {
493 patterns.
add<KernelEnvironmentLowering>(converter, accSupport,
494 globalSymbolRegion, symbolTable,
495 config, clauseDeviceType);
static FailureOr< Value > getKernelArgDescriptor(Location loc, Value operand, Value converted, bool alreadyMapped, OpenACCSupport &accSupport, ConversionPatternRewriter &rewriter)
The descriptor of a kernel argument.
static FailureOr< Value > createKernelArgumentStruct(gpu::LaunchFuncOp launch, gpu::LaunchFuncOpAdaptor adaptor, ValueRange alreadyMappedOperands, ConversionPatternRewriter &rewriter, OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable &symbolTable, const ACCRuntimeCallConfig &config)
static FailureOr< ACCDataRuntimeArgs > emitKernelRuntimeArgs(gpu::LaunchFuncOp launch, gpu::LaunchFuncOpAdaptor adaptor, ValueRange alreadyMappedOperands, ConversionPatternRewriter &rewriter, OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable &symbolTable, const ACCRuntimeCallConfig &config)
Emits the argument arrays of the kernel launched by launch, one entry per kernel operand.
static void emitHostFallbackNotImplemented(Location loc, Value status, ConversionPatternRewriter &rewriter, Region &globalSymbolRegion, SymbolTable &symbolTable)
The kernel entry point reports a status other than success when the kernel could not run on the devic...
static bool isDevicePtrMapping(Value operand)
static FailureOr< Value > getKernelPointer(gpu::LaunchFuncOp launch, ConversionPatternRewriter &rewriter, Region &globalSymbolRegion, SymbolTable &symbolTable)
static MapFlags getKernelDataClauseMapFlags(Operation *entryOp)
The flags of a data clause operation that maps a kernel argument.
static void declareLibc(SymbolTable &symbolTable, Region &globalSymbolRegion, Location loc, StringRef name, Type result, ArrayRef< Type > arguments)
static bool isDataEntryInsideEnvironment(KernelEnvironmentOp environment, Value operand)
static MapFlags getKernelArgMapFlags(Value operand, bool alreadyMapped, const ACCRuntimeCallConfig &config)
The flags a kernel argument is passed with.
static LogicalResult emitKernelCall(gpu::LaunchFuncOp launch, gpu::LaunchFuncOpAdaptor adaptor, Value asyncQueue, ValueRange alreadyMappedOperands, ConversionPatternRewriter &rewriter, OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable &symbolTable, const ACCRuntimeCallConfig &config)
Block represents an ordered list of Operations.
Region * getParent() const
Provide a 'getParent' method for ilist_node_with_parent methods.
Utility class for operation conversions targeting the LLVM dialect that match exactly one source oper...
Conversion from types to the LLVM IR dialect.
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
MLIRContext is the top-level object for a collection of MLIR operations.
RAII guard to reset the insertion point of the builder when destroyed.
This class helps build Operations.
static OpBuilder atBlockEnd(Block *block, Listener *listener=nullptr)
Create a builder and set the insertion point to after the last operation in the block but still insid...
Operation is the basic unit of execution within MLIR.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
RewritePatternSet & add(ConstructorArg &&arg, ConstructorArgs &&...args)
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments.
This class allows for representing and managing the symbol table used by operations with the 'SymbolT...
Operation * lookup(StringRef name) const
Look up a symbol with the specified name, returning null if no such name exists.
static Operation * lookupNearestSymbolFrom(Operation *from, StringAttr symbol)
Returns the operation registered with the given symbol name within the closest parent operation of,...
StringAttr insert(Operation *symbol, Block::iterator insertPt={})
Insert a new symbol into the table, and rename it as necessary to avoid collisions.
This class provides an abstraction over the various different ranges of value types.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
This class provides an abstraction over the different types of ranges over Values.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Type getType() const
Return the type of this value.
Operation * getDefiningOp() const
If this value is the result of an operation, return the operation that defines it.
Configuration for OpenACC to LLVM runtime lowering.
int64_t getDeviceTypeRuntimeValue(DeviceType type) const
int64_t getMapFlagsRuntimeValue(MapFlags flags) const
MapFlags postProcessMapFlags(Operation *mapOp, MapFlags flags) const
Value createKernelBinaryDescriptor(Location loc, OpBuilder &builder) const
InFlightDiagnostic emitNYI(Location loc, const Twine &message)
Report a case that is not yet supported by the implementation.
mlir::Value getVar(mlir::Operation *accDataClauseOp)
Used to obtain the var from a data clause operation.
std::optional< Location > getMappingExitLoc(ValueRange dataClauseOperands)
Returns where the mappings of dataClauseOperands end, taken from the first of them that says.
std::optional< mlir::acc::DataClause > getDataClause(mlir::Operation *accDataEntryOp)
Used to obtain the dataClause from a data entry operation.
MapFlags computeDataClauseMapFlags(Operation *entryOp, bool ptrAndObj)
Fold enter (+ paired exit) data-clause semantics into offload map flags.
int64_t getKernelArgumentFieldIndex(KernelArgumentField field)
The index an insert of field addresses.
LLVM::LLVMStructType getKernelArgumentType(MLIRContext *ctx)
The LLVM type of the argument struct passed to __tgt_acc_kernel.
bool isDataEntryOp(mlir::Operation *op)
Used to find out whether op is a data entry operation or an acc.map_info.
LogicalResult emitWaitClause(OpTy op, DeviceType deviceType, Value asyncQueue, ConversionPatternRewriter &rewriter, OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable &symbolTable, const ACCRuntimeCallConfig &config)
Emits the wait that a wait clause on op asks for before the runtime calls of the construct,...
Value getAsyncQueue(Location loc, Value asyncOperand, bool asyncOnly, OpBuilder &builder, const ACCRuntimeCallConfig &config)
Returns the queue an async clause selects: the value of the clause when it has one,...
Value createIdent(Location loc, StringRef functionName, OpBuilder &builder, Region &globalSymbolRegion, const ACCRuntimeCallConfig &config, SymbolTable *symbolTable=nullptr)
Returns a pointer to a constant global holding an ident_t for OpenACC runtime calls.
bool getImplicitFlag(mlir::Operation *accDataEntryOp)
Used to find out whether data operation is implicit.
Value remapOrSelf(Value value, ConversionPatternRewriter &rewriter)
Returns the value value was converted to, or value itself when the conversion left it as it was.
Value constantI64(Location loc, int64_t value, OpBuilder &builder)
Creates an i64 constant.
std::string getInternalGlobalName(StringRef kind, StringRef detail)
Returns the name to give a global that the conversion creates to hold detail of kind,...
StringRef getParentFunctionName(Operation *op)
Returns the symbol name of the function op belongs to, or of op itself when it is a function.
Value castToI64(Location loc, Value value, OpBuilder &builder)
Sign-extends or truncates value to the i64 the runtime entry points take for values like queue number...
Value getOrCreateGlobalString(Location loc, OpBuilder &builder, StringRef name, StringRef value, Region &globalSymbolRegion, SymbolTable *symbolTable=nullptr)
Creates or reuses a null-terminated string global in globalSymbolRegion.
std::optional< MapFlags > getMapFlags(Operation *mapEntryOp)
Returns offload map-type flags from acc.map_info, if present.
KernelArgumentField
Fields of the argument struct passed to __tgt_acc_kernel, in declaration order.
bool hasAttachPoint(Operation *mapEntryOp)
Returns true when mapEntryOp carries an attach point (varPtrPtr).
void spliceConstructRegion(Operation *op, Region ®ion, RewriterBase &rewriter)
Splices region, the body of a structured construct, into the block holding op, so that the construct ...
FailureOr< LLVM::CallOp > createRuntimeCall(Location loc, OpBuilder &builder, Region &globalSymbolRegion, SymbolTable &symbolTable, RuntimeFunction fn, const ACCRuntimeCallConfig &config, ArrayRef< Value > arguments)
Declares (if needed) and returns a call to the runtime function identified by fn using the name from ...
std::optional< TypeSizeAndAlignment > getTypeSizeAndAlignment(Type ty, ModuleOp module, const DataLayout &dl, OpenACCSupport *support=nullptr, Value var={})
Returns the size and ABI alignment in bytes.
Include the generated interface declarations.
void configureACCKernelLaunchConversionLegality(ConversionTarget &target)
Configure conversion legality for acc.kernel_environment.
Value createACCMappedObjectName(Location loc, Value operand, acc::OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable *symbolTable, ConversionPatternRewriter &rewriter)
The name of operand for runtime diagnostics, or a null pointer when it has none.
void createACCMappedObjectArrays(Location loc, ArrayRef< ACCMappedObjectArgs > objects, ACCDataRuntimeArgs &runtimeArgs, RewriterBase &rewriter)
Materialize the argument arrays of objects into the argNum through argDescs fields of runtimeArgs.
FailureOr< SmallVector< Value > > emitACCDataRuntimeCall(Location loc, acc::RuntimeFunction fn, ValueRange mappingOperands, ValueRange convertedOperands, ConversionPatternRewriter &rewriter, acc::OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable &symbolTable, const acc::ACCRuntimeCallConfig &config, ArrayRef< Value > trailingArguments, const ACCDataCallOptions &options={})
Emit the call to the mapping entry point fn for mappingOperands, followed by trailingArguments.
FailureOr< Value > createACCMappedObjectSize(Location loc, Value operand, Value converted, acc::MapFlags mapFlags, acc::OpenACCSupport &accSupport, ConversionPatternRewriter &rewriter)
The size in bytes of operand, or zero where its descriptor or bounds state the extent instead.
Value createACCMappedObjectBase(Location loc, Operation *mapOp, acc::MapFlags mapFlags, ConversionPatternRewriter &rewriter)
The host pointer slot the object mapOp maps is attached to, or a null pointer when it is not attached...
Value createACCArgumentDescriptor(Operation *mapOp, Value convertedOperand, acc::OpenACCSupport &accSupport, ConversionPatternRewriter &rewriter)
Build the runtime argument descriptor for mapOp, or a null pointer when the mapping needs no descript...
Value createACCMappedObjectPointer(Location loc, Value operand, Value converted, acc::MapFlags mapFlags, ConversionPatternRewriter &rewriter)
The address of operand as the runtime expects to receive it, given its type converted value converted...
void populateACCKernelLaunchPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns, acc::OpenACCSupport &accSupport, Region &globalSymbolRegion, SymbolTable &symbolTable, const acc::ACCRuntimeCallConfig &config={}, acc::DeviceType clauseDeviceType=acc::DeviceType::None)
Populate patterns that lower an acc.kernel_environment and all gpu.launch_func operations in its body...
Value createACCMemRefDescriptorWrapperArg(Location loc, MemRefType memrefType, Value convertedMemref, ValueRange bounds, Value elementSize, ConversionPatternRewriter &rewriter)
Build the runtime argument descriptor wrapping an already converted memref.
@ None
An explicit data construct.
int64_t flags
Region flags, in the encoding of ACCDataRegionFlags.
ValueRange returnAddressOperands
Mapping operands whose device address the entry point returns.
The arguments every mapping entry point of the OpenACC runtime takes, in the order they are passed.
Value argNames
Array of variable names for runtime diagnostics, null where unknown.
Value argSizes
Array of object sizes in bytes; zero where the descriptor or the bounds state the extent instead.
Value argMappers
Array of user-defined mappers. OpenACC has none, so this is always null.
Value argTypes
Array of map-type flags, in the runtime encoding of acc::MapFlags.
Value argBasePtrs
Array of pointer slots to attach a mapped object to, null when the object is not attached to anything...
Value argNum
Number of mapped objects, that is, the length of each array below.
Value argDescs
Array of descriptors stating layout and bounds, null for whole objects of a known size.
Value argPtrs
Array of addresses of the mapped objects themselves.
The values that describe one object to the runtime, one for each argument array.