17#include "arcane/utils/IMemoryAllocator.h"
19#include "arcane/accelerator/core/RunQueue.h"
20#include "arcane/accelerator/core/Memory.h"
22#include "arcane/core/IData.h"
23#include "arcane/core/IVariable.h"
24#include "arcane/core/VariableRef.h"
25#include "arcane/core/internal/IDataInternal.h"
26#include "arcane/core/internal/IVariableInternal.h"
27#include "arcane/core/datatype/DataAllocationInfo.h"
29#include "arcane/core/materials/internal/IMeshMaterialVariableInternal.h"
84markVariableAsMostlyReadOnly(
IVariable* var)
120 vref->variable()->_internalApi()->changeAllocator(mem_opts);
140 experimentalChangeAllocator(var.
variable(), mem);
#define ARCANE_CHECK_POINTER(ptr)
Macro returning the pointer ptr if it is not null or throwing an exception if it is null.
Utility functions for variables.
void markVariableAsMostlyReadOnly(IVariable *var)
Indicates that the variable is mostly read-only.
void prefetchVariableAsync(IVariable *var, const RunQueue *queue_or_null)
Prefetches the memory associated with the variable var.
Memory and allocator management functions.
Memory prefetching arguments.
Execution queue for an accelerator.
void prefetchMemory(const MemoryPrefetchArgs &args) const
Performs a memory prefetch.
Constant view on a contiguous memory region containing fixed-size elements.
Information on data allocation.
virtual INumericDataInternal * numericData()
Generic interface for numeric data (nullptr if the data is not numeric).
Interface of a data item.
virtual IDataInternal * _commonInternal()=0
virtual eMemoryResource memoryResource() const
Memory resource provided by the allocator.
Interface for an 'IData' of a numeric type.
virtual IMemoryAllocator * memoryAllocator() const =0
Allocator used for the data.
virtual MutableMemoryView memoryView()=0
Memory view of the data.
virtual void changeAllocator(const MemoryAllocationOptions &alloc_info)=0
Changes the variable's allocator.
virtual IData * data()=0
Data associated with the variable.
virtual bool isUsed() const =0
Usage state of the variable.
virtual void setAllocationInfo(const DataAllocationInfo &v)=0
Sets allocation information.
virtual IVariableInternal * _internalApi()=0
Internal Arcane API.
Arcane internal API for 'IMeshMaterialVariable'.
virtual ConstArrayView< VariableRef * > variableReferenceList() const =0
List of 'VariableRef' associated with this variable.
Interface of a material variable on a mesh.
virtual IVariable * globalVariable() const =0
Associated global variable on the mesh.
Base class for material variable references.
IMeshMaterialVariable * materialVariable() const
Associated material variable.
Options to configure allocations.
IVariable * variable() const
Associated variable.
Namespace for accelerator usage.
MemoryAllocationOptions getAllocationOptions(eMemoryResource mem_resource)
Default allocation for the resource mem_resource.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
@ HostAndDeviceMostlyRead
Indicates that the data will be used both on the accelerator and on the CPU and will not be frequentl...
Arcane::eMemoryResource eMemoryRessource
Typedef for the historical Arcane version (with 2's').
@ UnifiedMemory
Allocates using unified memory.