Lightweight Parallel Foundations 1.0.1-alpha 2023-06-26T11:02:34Z
A high performance and model-compliant communication layer
Public Attributes | List of all members
lpf_machine_t Struct Reference

#include <core.h>

Public Attributes

lpf_pid_t p
 
lpf_pid_t free_p
 
double(* g )(lpf_pid_t p, size_t min_msg_size, lpf_sync_attr_t attr)
 
double(* l )(lpf_pid_t p, size_t min_msg_size, lpf_sync_attr_t attr)
 

Detailed Description

A structure that describes the machine that is available to the program. This structure shall at least define the following members.

Note
An implementation may choose to define more members for the user to inspect; however, doing so will lead to non-portable code.
Communication
Only the non-(function-)pointer members can be communicated safely.

Member Data Documentation

◆ p

lpf_pid_t lpf_machine_t::p

Number of processors of all resources allocated to the LPF runtime. This number remains constant during the lifetime of the program.

Note
Thus when the lpf_probe function is called from within an LPF SPMD this number will includes the processors in use by currently active processes, including of its own SPMD section.

◆ free_p

lpf_pid_t lpf_machine_t::free_p

Number of free processors for use by lpf_exec().

By the semantics of lpf_exec, an SPMD section that was spawned using one call to lpf_exec, may, in turn, make a nested call to lpf_exec. This value, upon intermittent calls to lpf_probe, will thus be monotonically decreasing.

Note
The minimum value of this field shall be one.

◆ g

double(* lpf_machine_t::g) (lpf_pid_t p, size_t min_msg_size, lpf_sync_attr_t attr)

The message gap \( g \) of the BSP machine as number of seconds per byte. This value may depend on the actual number of processes p used, the minimum message size min_msg_size the user aims to send and receive, and the type of synchronisation requested via attr. The value is bitwise equivalent across all processes.

Parameters
[in]pA value between 1 and lpf_machine_t.p, where both bounds are inclusive.
[in]min_msg_sizeA byte size value that is larger or equal to 0.
[in]attrA lpf_sync_attr_t value. When in doubt, always use LPF_SYNC_DEFAULT.
Returns
The guaranteed value for the message gap given an LPF SPMD section using p processes, for a superstep in which a user only uses lpf_put or lpf_get to send messages that contain min_msg_size or more bytes. The superstep is furthermore assumed to be terminated using the attr lpf_sync_attr_t.
Note
As per this specification, any value for attr other than LPF_SYNC_DEFAULT may never result in a larger value for the message gap g returned by this function.
The message gap observed in practice may nonetheless change, but only if the total BSP cost of the corresponding superstep is reduced as a result.

◆ l

double(* lpf_machine_t::l) (lpf_pid_t p, size_t min_msg_size, lpf_sync_attr_t attr)

The latency \( l \) parameter of the BSP machine in number of seconds. This value may depend on the actual number of processes p used, the minimum message size min_msg_size the user aims to send and receive, and the type of synchronisation requested via attr. The value is bitwise equivalent across all processes.

Parameters
[in]pA value between 1 and lpf_machine_t.p, where both bounds are inclusive.
[in]min_msg_sizeA byte size value that is larger or equal to 0.
[in]attrA lpf_sync_attr_t value. When in doubt, always use LPF_SYNC_DEFAULT.
Returns
The guaranteed value for the latency cost given an LPF SPMD section using p processes, for a superstep terminated using the attr lpf_sync_attr_t.
Note
As per this specification, any value for attr other than LPF_SYNC_DEFAULT may never result in a larger value for the latency l returned by this function.

The documentation for this struct was generated from the following file: