MMgr v2.3.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
proximus_operor — unaligned loads and stores

Data Structures

struct  ProximusCfg
 Arguments for the proxim calls. More...
struct  ProximusOperorNs
 Type of the proxim dispatch table. More...

Functions

EMBED_HOST_DEVICE uint16_t mmgr_proxim_load16 (const ProximusCfg *args)
 Reads two bytes from args->at in the target's own order.
EMBED_HOST_DEVICE uint32_t mmgr_proxim_load32 (const ProximusCfg *args)
 Reads four bytes from args->at in the target's own order.
EMBED_HOST_DEVICE uint64_t mmgr_proxim_load64 (const ProximusCfg *args)
 Reads eight bytes from args->at in the target's own order.
EMBED_HOST_DEVICE void mmgr_proxim_put16 (const ProximusCfg *args)
 Writes the low two bytes of args->val to args->dst in the target's own order.
EMBED_HOST_DEVICE void mmgr_proxim_put32 (const ProximusCfg *args)
 Writes the low four bytes of args->val to args->dst in the target's own order.
EMBED_HOST_DEVICE void mmgr_proxim_put64 (const ProximusCfg *args)
 Writes all eight bytes of args->val to args->dst in the target's own order.
EMBED_HOST_DEVICE embed_word mmgr_proxim_load (const ProximusCfg *args)
 Reads one word from args->at in the target's own order.
EMBED_HOST_DEVICE void mmgr_proxim_put (const ProximusCfg *args)
 Writes the low word of args->val to args->dst in the target's own order.
EMBED_HOST_DEVICE embed_word mmgr_aequus_load (const ProximusCfg *args)
 Reads one word from an aligned args->at, in the target's own order.
EMBED_HOST_DEVICE void mmgr_aequus_put (const ProximusCfg *args)
 Writes the low word of args->val to an aligned args->dst.
EMBED_HOST_DEVICE uint64_t mmgr_aequus_load64 (const ProximusCfg *args)
 Reads eight bytes from an aligned args->at, in the target's own order.
EMBED_HOST_DEVICE void mmgr_aequus_put64 (const ProximusCfg *args)
 Writes all eight bytes of args->val to an aligned args->dst.
EMBED_HOST_DEVICE void mmgr_proxim_read (const ProximusCfg *args)
 Copies args->size bytes from args->at to args->dst.

Variables

static const ProximusOperorNs proxim
 Dispatch table instance named proxim.

Detailed Description

Function Documentation

◆ mmgr_proxim_load16()

EMBED_HOST_DEVICE uint16_t mmgr_proxim_load16 ( const ProximusCfg * args)

Reads two bytes from args->at in the target's own order.

Parameters
[in]argsAddress to read from [BORROWS].
Returns
The two bytes as a uint16_t.
Warning
args->at must be readable for two bytes, at any alignment.

References mmgr_proxim_load16().

Referenced by mmgr_proxim_load16().

◆ mmgr_proxim_load32()

EMBED_HOST_DEVICE uint32_t mmgr_proxim_load32 ( const ProximusCfg * args)

Reads four bytes from args->at in the target's own order.

Parameters
[in]argsAddress to read from [BORROWS].
Returns
The four bytes as a uint32_t.
Warning
args->at must be readable for four bytes, at any alignment.

References mmgr_proxim_load32().

Referenced by mmgr_proxim_load32().

◆ mmgr_proxim_load64()

EMBED_HOST_DEVICE uint64_t mmgr_proxim_load64 ( const ProximusCfg * args)

Reads eight bytes from args->at in the target's own order.

Parameters
[in]argsAddress to read from [BORROWS].
Returns
The eight bytes as a uint64_t.
Warning
args->at must be readable for eight bytes, at any alignment.

References mmgr_proxim_load64().

Referenced by mmgr_proxim_load64().

◆ mmgr_proxim_put16()

EMBED_HOST_DEVICE void mmgr_proxim_put16 ( const ProximusCfg * args)

Writes the low two bytes of args->val to args->dst in the target's own order.

Parameters
[in]argsDestination and value [BORROWS].
Note
The upper six bytes of args->val take no part.
Warning
args->dst must be writable for two bytes, at any alignment.

References mmgr_proxim_put16().

Referenced by mmgr_proxim_put16().

◆ mmgr_proxim_put32()

EMBED_HOST_DEVICE void mmgr_proxim_put32 ( const ProximusCfg * args)

Writes the low four bytes of args->val to args->dst in the target's own order.

Parameters
[in]argsDestination and value [BORROWS].
Note
The upper four bytes of args->val take no part.
Warning
args->dst must be writable for four bytes, at any alignment.

References mmgr_proxim_put32().

Referenced by mmgr_proxim_put32().

◆ mmgr_proxim_put64()

EMBED_HOST_DEVICE void mmgr_proxim_put64 ( const ProximusCfg * args)

Writes all eight bytes of args->val to args->dst in the target's own order.

Parameters
[in]argsDestination and value [BORROWS].
Warning
args->dst must be writable for eight bytes, at any alignment.

References mmgr_proxim_put64().

Referenced by mmgr_proxim_put64().

◆ mmgr_proxim_load()

EMBED_HOST_DEVICE embed_word mmgr_proxim_load ( const ProximusCfg * args)

Reads one word from args->at in the target's own order.

Parameters
[in]argsAddress to read from [BORROWS].
Returns
The bytes as an embed_word.
Warning
args->at must be readable for a whole embed_word, at any alignment.

References mmgr_proxim_load().

Referenced by mmgr_proxim_load().

◆ mmgr_proxim_put()

EMBED_HOST_DEVICE void mmgr_proxim_put ( const ProximusCfg * args)

Writes the low word of args->val to args->dst in the target's own order.

Parameters
[in]argsDestination and value [BORROWS].
Warning
args->dst must be writable for a whole embed_word, at any alignment.

References mmgr_proxim_put().

Referenced by mmgr_proxim_put().

◆ mmgr_aequus_load()

EMBED_HOST_DEVICE embed_word mmgr_aequus_load ( const ProximusCfg * args)

Reads one word from an aligned args->at, in the target's own order.

Parameters
[in]argsAddress to read from [BORROWS].
Returns
The bytes as an embed_word.
Note
Reaches the same bytes as mmgr_proxim_load, through a type that retains embed_word's alignment.
Warning
args->at must be readable for a whole embed_word and aligned for one.

References mmgr_aequus_load().

Referenced by mmgr_aequus_load().

◆ mmgr_aequus_put()

EMBED_HOST_DEVICE void mmgr_aequus_put ( const ProximusCfg * args)

Writes the low word of args->val to an aligned args->dst.

Parameters
[in]argsDestination and value [BORROWS].
Note
Reaches the same bytes as mmgr_proxim_put, through a type that retains embed_word's alignment.
Warning
args->dst must be writable for a whole embed_word and aligned for one.

References mmgr_aequus_put().

Referenced by mmgr_aequus_put().

◆ mmgr_aequus_load64()

EMBED_HOST_DEVICE uint64_t mmgr_aequus_load64 ( const ProximusCfg * args)

Reads eight bytes from an aligned args->at, in the target's own order.

Parameters
[in]argsAddress to read from [BORROWS].
Returns
The eight bytes as a uint64_t.
Note
Reaches the same bytes as mmgr_proxim_load64, through a type that retains uint64_t's alignment.
Warning
args->at must be readable for eight bytes and aligned for a uint64_t.

References mmgr_aequus_load64().

Referenced by mmgr_aequus_load64().

◆ mmgr_aequus_put64()

EMBED_HOST_DEVICE void mmgr_aequus_put64 ( const ProximusCfg * args)

Writes all eight bytes of args->val to an aligned args->dst.

Parameters
[in]argsDestination and value [BORROWS].
Note
Reaches the same bytes as mmgr_proxim_put64, through a type that retains uint64_t's alignment.
Warning
args->dst must be writable for eight bytes and aligned for a uint64_t.

References mmgr_aequus_put64().

Referenced by mmgr_aequus_put64().

◆ mmgr_proxim_read()

EMBED_HOST_DEVICE void mmgr_proxim_read ( const ProximusCfg * args)

Copies args->size bytes from args->at to args->dst.

Parameters
[in]argsDestination, source and count [BORROWS].
Note
Copies bytes until args->dst reaches a word boundary, then whole words, then the odd bytes left.
This is the only entry that reads args->size.
Warning
Copies forward. An args->dst above args->at within one region would read bytes it has already written.

References mmgr_proxim_read().

Referenced by mmgr_proxim_read().

Variable Documentation

◆ proxim

const ProximusOperorNs proxim
static

Dispatch table instance named proxim.

Note
The nine unaligned members call the mmgr_proxim_ functions.
The four al_ members call the mmgr_aequus_ ones.

Definition at line 189 of file proximus_operor.h.