63 lines
2.3 KiB
Groff
63 lines
2.3 KiB
Groff
|
|
.TH "serif::utils::parallel" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
||
|
|
.ad l
|
||
|
|
.nh
|
||
|
|
.SH NAME
|
||
|
|
serif::utils::parallel
|
||
|
|
.SH SYNOPSIS
|
||
|
|
.br
|
||
|
|
.PP
|
||
|
|
.SS "Namespaces"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "namespace \fBdetail\fP"
|
||
|
|
.br
|
||
|
|
.in -1c
|
||
|
|
.SS "Functions"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "int \fBworker_count\fP () noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Workers an element loop may use: OpenMP's thread limit (OMP_NUM_THREADS), or 1 without OpenMP or inside an enclosing parallel region\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<typename BodyT> void \fBfor_each_index\fP (const int count, BodyT &&body)"
|
||
|
|
.br
|
||
|
|
.RI "Call body(index, worker) once for every index in [0, count), possibly concurrently\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "void \fBelement_transformation\fP (const ::mfem::Mesh &mesh, int element, ::mfem::IsoparametricTransformation &transformation)"
|
||
|
|
.br
|
||
|
|
.RI "Mesh::GetElementTransformation(element, transformation), safe in concurrent element loops\&. "
|
||
|
|
.in -1c
|
||
|
|
.SH "Function Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "void serif::utils::parallel::element_transformation (const ::mfem::Mesh & mesh, int element, ::mfem::IsoparametricTransformation & transformation)"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Mesh::GetElementTransformation(element, transformation), safe in concurrent element loops\&.
|
||
|
|
.PP
|
||
|
|
\fBNote\fP
|
||
|
|
.RS 4
|
||
|
|
MFEM's version gathers curved-mesh nodes through FiniteElementSpace::GetElementVDofs(int, Array&), which writes the space's shared mutable DofTransformation\&. This copy performs the same steps with a local DofTransformation, so the transformation and every value derived from it are identical\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<typename BodyT> void serif::utils::parallel::for_each_index (const int count, BodyT && body)"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Call body(index, worker) once for every index in [0, count), possibly concurrently\&.
|
||
|
|
.PP
|
||
|
|
\fBNote\fP
|
||
|
|
.RS 4
|
||
|
|
Results do not depend on the thread count when each call writes only index-owned results and scratch owned by its worker (0 <= worker < \fBworker_count()\fP)\&. Every index runs; the exception of the lowest throwing index is then rethrown, which is the one a serial loop would have raised\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "int serif::utils::parallel::worker_count ()\fR [nodiscard]\fP, \fR [noexcept]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Workers an element loop may use: OpenMP's thread limit (OMP_NUM_THREADS), or 1 without OpenMP or inside an enclosing parallel region\&.
|
||
|
|
.SH "Author"
|
||
|
|
.PP
|
||
|
|
Generated automatically by Doxygen for SERiF from the source code\&.
|