tfel
Loading...
Searching...
No Matches
SYCL.hxx File Reference

This file declares the functions of the sycl backend of the generic-parallel material property interface which are specific to the material properties: transfer of the fields of the batches. The primitive of the backend is declared in MFront/GenericParallel/SYCL.hxx. More...

Namespaces

namespace  mfront
 This namespace contains material used to build the MFront code generator.

Enumerations

enum struct  mfront::gpmp::sycl::DataTransferPolicy
 policy for the transfer of the fields of a batch

Functions

template<typename Evaluation, size_type N, typename Apply>
int mfront::gpmp::sycl::evaluateBatch (OutputStatus &s, const BatchData &d, const Evaluation &evaluation, const std::array< const char *, N > &names, const bool runtime_checks, const ReportFunction report_function, const DataTransferPolicy transfers, const Apply &apply)
 evaluate a material property at the points of a batch (see mfront::gpmp::evaluateBatch).

Detailed Description

This file declares the functions of the sycl backend of the generic-parallel material property interface which are specific to the material properties: transfer of the fields of the batches. The primitive of the backend is declared in MFront/GenericParallel/SYCL.hxx.

Date
09/11/2026

Function Documentation

◆ evaluateBatch()

template<typename Evaluation, size_type N, typename Apply>
int mfront::gpmp::sycl::evaluateBatch ( OutputStatus & s,
const BatchData & d,
const Evaluation & evaluation,
const std::array< const char *, N > & names,
const bool runtime_checks,
const ReportFunction report_function,
const DataTransferPolicy transfers,
const Apply & apply )

evaluate a material property at the points of a batch (see mfront::gpmp::evaluateBatch).

The execution policy must be a SyclBackendExecutionPolicy. With the NONE data transfer policy, the fields must be accessible by the device associated with its queue (shared, device or host USM allocations, or any memory if the device is the host). With the AUTOMATIC policy, the arguments, the output, the statuses of the points and the statistics which are not accessible are copied in device memory. The output is copied in both directions, so that the values between two values of a strided output are kept. The evaluation is asynchronous if the policy requests it and if no field is copied.

The batch, the execution policy and the queue are checked before any transfer, and checked again, at no cost, by the functions called after the transfers.

Parameters
[in]transferspolicy for the transfer of the fields
[in]applyprimitive of the backend (see mfront::generic_parallel::sycl::makeApply)