Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
VariableUtils.h File Reference

Utility functions for variables. More...

#include "arcane/core/ArcaneTypes.h"
#include "arcane/core/materials/MaterialsCoreGlobal.h"
Include dependency graph for VariableUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Arcane
 -- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --

Functions

void Arcane::VariableUtils::prefetchVariableAsync (IVariable *var, const RunQueue *queue_or_null)
 Prefetches the memory associated with the variable var.
void Arcane::VariableUtils::prefetchVariableAsync (VariableRef &var, const RunQueue *queue_or_null)
 Prefetches the memory associated with the variable var.
void Arcane::VariableUtils::markVariableAsMostlyReadOnly (IVariable *var)
 Indicates that the variable is mostly read-only.
void Arcane::VariableUtils::markVariableAsMostlyReadOnly (VariableRef &var)
 Indicates that the variable is mostly read-only. void markVariableAsMostlyReadOnly(IVariableRef* var);.
void Arcane::VariableUtils::markVariableAsMostlyReadOnly (::Arcane::Materials::MeshMaterialVariableRef &var)
 Indicates that the variable is mostly read-only. void markVariableAsMostlyReadOnly(IVariableRef* var);.
void Arcane::VariableUtils::experimentalChangeAllocator (::Arcane::Materials::IMeshMaterialVariable *var, eMemoryRessource mem)
void Arcane::VariableUtils::experimentalChangeAllocator (IVariable *var, eMemoryRessource mem)
void Arcane::VariableUtils::experimentalChangeAllocator (VariableRef &var, eMemoryRessource mem)

Detailed Description

Utility functions for variables.

Definition in file VariableUtils.h.

Function Documentation

◆ experimentalChangeAllocator() [1/3]

void Arcane::VariableUtils::experimentalChangeAllocator ( ::Arcane::Materials::IMeshMaterialVariable * var,
eMemoryRessource mem )

Definition at line 113 of file VariableUtils.cc.

◆ experimentalChangeAllocator() [2/3]

void Arcane::VariableUtils::experimentalChangeAllocator ( IVariable * var,
eMemoryRessource mem )

Definition at line 127 of file VariableUtils.cc.

◆ experimentalChangeAllocator() [3/3]

void Arcane::VariableUtils::experimentalChangeAllocator ( VariableRef & var,
eMemoryRessource mem )

Definition at line 137 of file VariableUtils.cc.

◆ markVariableAsMostlyReadOnly() [1/3]

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().

Here is the call graph for this function:

◆ markVariableAsMostlyReadOnly() [2/3]

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().

Here is the call graph for this function:

◆ markVariableAsMostlyReadOnly() [3/3]

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().

Here is the call graph for this function:

◆ prefetchVariableAsync() [1/2]

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.

Here is the call graph for this function:

◆ prefetchVariableAsync() [2/2]

void Arcane::VariableUtils::prefetchVariableAsync ( VariableRef & var,
const RunQueue * queue_or_null )

Prefetches the memory associated with the variable var.

See also
void prefetchVariableAsync(IVariable* var, RunQueue* queue_or_null);

Definition at line 74 of file VariableUtils.cc.

References Arcane::VariableRef::variable().

Here is the call graph for this function: