Utility functions for variables. More...
Go to the source code of this file.
Namespaces | |
| namespace | Arcane |
| -- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -- | |
Utility functions for variables.
Definition in file VariableUtils.h.
| void Arcane::VariableUtils::experimentalChangeAllocator | ( | ::Arcane::Materials::IMeshMaterialVariable * | var, |
| eMemoryRessource | mem ) |
Definition at line 113 of file VariableUtils.cc.
| void Arcane::VariableUtils::experimentalChangeAllocator | ( | IVariable * | var, |
| eMemoryRessource | mem ) |
Definition at line 127 of file VariableUtils.cc.
| void Arcane::VariableUtils::experimentalChangeAllocator | ( | VariableRef & | var, |
| eMemoryRessource | mem ) |
Definition at line 137 of file VariableUtils.cc.
| void Arcane::VariableUtils::markVariableAsMostlyReadOnly | ( | ::Arcane::Materials::MeshMaterialVariableRef & | var | ) |
Indicates that the variable is mostly read-only. void markVariableAsMostlyReadOnly(IVariableRef* var);.
Definition at line 102 of file VariableUtils.cc.
References Arcane::Materials::MeshMaterialVariableRef::materialVariable(), and Arcane::Materials::IMeshMaterialVariableInternal::variableReferenceList().
| void Arcane::VariableUtils::markVariableAsMostlyReadOnly | ( | IVariable * | var | ) |
Indicates that the variable is mostly read-only.
This is used only with accelerators and prevents memory transfers between the accelerator and the CPU.
Definition at line 83 of file VariableUtils.cc.
References Arcane::HostAndDeviceMostlyRead, and Arcane::IVariable::setAllocationInfo().
| void Arcane::VariableUtils::markVariableAsMostlyReadOnly | ( | VariableRef & | var | ) |
Indicates that the variable is mostly read-only. void markVariableAsMostlyReadOnly(IVariableRef* var);.
Definition at line 93 of file VariableUtils.cc.
References Arcane::VariableRef::variable().
| void Arcane::VariableUtils::prefetchVariableAsync | ( | IVariable * | var, |
| const RunQueue * | queue_or_null ) |
Prefetches the memory associated with the variable var.
Prefetches the memory associated with the variable onto the accelerator specified by queue_or_null if it is not already there.
var must be a numerical type variable. If queue_or_null is null, no operation is performed. The operation is asynchronous.
Definition at line 50 of file VariableUtils.cc.
References Arcane::IData::_commonInternal(), ARCANE_CHECK_POINTER, Arcane::IVariable::data(), Arcane::IVariable::isUsed(), Arcane::INumericDataInternal::memoryAllocator(), Arcane::IMemoryAllocator::memoryResource(), Arcane::INumericDataInternal::memoryView(), Arcane::IDataInternal::numericData(), Arcane::Accelerator::RunQueue::prefetchMemory(), and Arcane::UnifiedMemory.
| void Arcane::VariableUtils::prefetchVariableAsync | ( | VariableRef & | var, |
| const RunQueue * | queue_or_null ) |
Prefetches the memory associated with the variable var.
Definition at line 74 of file VariableUtils.cc.
References Arcane::VariableRef::variable().