sc::ProcMemoryGrp(3)
π 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 aRef< 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 unreleasedobtain_readwriteat 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
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms