sc::ProcMemoryGrp(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’… sc::ProcMemoryGrp β€” the MPQC manual, bestie edition

okay so this is a page straight out of the MPQC manual (yes, that MPQC), and it's all about sc::ProcMemoryGrp. Buckle up, it's actually kind of a vibe πŸ¦‹


✨ NAME ✨

sc::ProcMemoryGrp β€” the ProcMemoryGrp concrete class provides an implementation of MemoryGrp for a single processor. literally just one processor, living its solo main character life πŸ‘‘


🌸 SYNOPSIS 🌸

#include <memproc.h>

Inherits sc::MemoryGrp. so it's giving "child of MemoryGrp" energy, iykyk πŸ’«

πŸŽ€ Public Member Functions

  • ProcMemoryGrp (const Ref< KeyVal > &) β€” constructor, takes a Ref< KeyVal > &, that's the whole plot 🫢
  • void set_localsize (size_t) β€” set the size of locally held memory.
  • void * localdata () β€” returns a pointer to the local data. yes bestie, a pointer, we love a pointer ✨
  • void * obtain_readwrite (distsize_t offset, int size) β€” only one thread can have an unreleased obtain_readwrite at a time.
  • void * obtain_readonly (distsize_t offset, int size) β€” this gives read access to the memory location. no locking is done. ngl, no locking is a whole mood 😭
  • void * obtain_writeonly (distsize_t offset, int size) β€” this gives write access to the memory location. no locking is done.
  • void release_readonly (void *data, distsize_t offset, int size) β€” this is called when read access is no longer needed.
  • void release_writeonly (void *data, distsize_t offset, int size) β€” this is called when write access is no longer needed.
  • void release_readwrite (void *data, distsize_t offset, int size) β€” this is called when read/write access is no longer needed.
  • void sync () β€” synchronizes all the nodes.

🌈 Additional Inherited Members

(they exist! they're inherited! that's the whole bullet πŸ’œ)


πŸ’– Detailed Description πŸ’–

The ProcMemoryGrp concrete class provides an implementation of MemoryGrp for a single processor.

that's it. that's the description. short and iconic, periodt πŸ’…


πŸ”₯ Member Function Documentation πŸ”₯

⭐ void* sc::ProcMemoryGrp::obtain_readwrite (distsize_t offset, int size)

[virtual]

okay so only one thread can have an unreleased obtain_readwrite at a time. that's the rule, no cap. and the actual memory region locked can be larger than what you requested β€” sneaky but true.

if the memory region is already locked, this will block. πŸ›‘

for this reason, data should be held as read/write for as short a time as possible. like, get in, do your thing, get out. don't be clingy πŸ™ˆ

Implements sc::MemoryGrp.

⭐ void sc::ProcMemoryGrp::release_readwrite (void * data, distsize_t offset, int size)

[virtual]

this is called when read/write access is no longer needed. the memory will be unlocked. bye bestie, unlocking you now πŸ‘‹βœ¨

Implements sc::MemoryGrp.

⭐ void sc::ProcMemoryGrp::set_localsize (size_t)

[virtual]

set the size of locally held memory. and here's the cute part: when memory is accessed using a global offset, counting starts at node 0 and proceeds up to node n() - 1. counting from zero, the classic πŸ’€

Implements sc::MemoryGrp.

⭐ void sc::ProcMemoryGrp::sync ()

[virtual]

synchronizes all the nodes. this is useful after remote memory writes to be certain that all of the writes have completed and the data can be accessed locally, for example. basically a little "everybody caught up? great" group check-in 🫢

Implements sc::MemoryGrp.


🌸 Author 🌸

Generated automatically by Doxygen for MPQC from the source code. not a human, just doxygen doing its thing πŸ€–πŸ’…


okay that's the whole page bestie, you ate that πŸ“

Version 2.3.1 β€” dated Sun Oct 4 2020. sc::ProcMemoryGrp(3), out. mwah πŸ’‹πŸŽ€
πŸ“¦ where this page comes from