sc::SCBlockInfo(3)

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

πŸ¦‹ sc::SCBlockInfo(3) β€” MPQC manual, bestie πŸ¦‹

Okay so this is the MPQC page for sc::SCBlockInfo(3), and it’s lowkey giving dimension-blocking main character energy. Let’s get into it. ✨

🌸 NAME 🌸

sc::SCBlockInfo β€” SCBlockInfo contains blocking information for the SCDimension class. That’s the whole name vibe: it’s the blocking-info bestie for dimensions. 🫢

✨ SYNOPSIS ✨

#include <dim.h>

Inherits sc::SavableState.

🌈 Public Member Functions

  • SCBlockInfo (int n, int nblocks=0, const int *blocksizes=0) β€” Create a SCBlockInfo object. iconic constructor behavior. πŸ’…
  • SCBlockInfo (StateIn &) β€” the constructor that takes StateIn &; no extra blurb on this page. πŸŽ€
  • SCBlockInfo (const Ref< KeyVal > &keyval) β€” The KeyVal constructor. Full details are in the constructor section below. ✨
  • void save_data_state (StateOut &) β€” Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. More tea below. πŸ’–
  • int equiv (SCBlockInfo *bi) β€” Return nonzero if this is equivalent to bi.
  • int nelem () const β€” Return the total number of elements, periodt. πŸ”₯
  • int nblock () const β€” Return the number of blocks.
  • int start (int i) const β€” Return the starting index for block i.
  • int size (int i) const β€” Return the size of block i.
  • int fence (int i) const β€” Return the last index + 1 for block i.
  • void elem_to_block (int i, int &block, int &offset) β€” no extra description here, just the signature doing its thing. 🫢
  • RefSCDimension subdim (int i) β€” Retrieve subdimension information.
  • void set_subdim (int i, const RefSCDimension &dim) β€” Set subdimension information.
  • void print (std::ostream &o=ExEnv::out0()) const β€” Print the object to the stream o.

🧚 Protected Member Functions

  • void init_start () β€” no extra description here, just the protected helper signature. ✨

πŸŽ€ Protected Attributes

  • int n_
  • int nblocks_
  • int * start_
  • int * size_
  • RefSCDimension * subdims_

πŸ’€ Additional Inherited Members

This heading is here, but no extra inherited members are listed under it. So… empty, but iconic. Keeping the spot anyway. πŸ’…

πŸ’– Detailed Description πŸ’–

SCBlockInfo contains blocking information for the SCDimension class.

Okay so there are literally two ways it can contain blocking information. In the first way, a vector of block offsets and block sizes is stored. The second method is only used by those specializations created by the BlockedSCMatrixKit class. In this method the blocking information is stored as subdimensions of type SCDimension.

Important vibe check: if both methods are used, they must be used consistently. That is, the number, sizes, and order of the blocks must match the number, sizes, and order of the SCDimension objects. No cap. 🚨

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

sc::SCBlockInfo::SCBlockInfo (const Ref< KeyVal > & keyval)

The KeyVal constructor. Here’s what it reads:

  • sizes β€” This is a vector giving the size of each subblock. There is no default. 😭
  • subdims β€” If this vector is given, there must be an entry for each entry in the sizes vector. Each entry is an SCDimension object. The default is to not store subdimension information. πŸ¦‹

✨ Member Function Documentation ✨

void sc::SCBlockInfo::save_data_state (StateOut &) [virtual]

Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. This must be implemented by the derived class if the class has data.

Reimplemented from sc::SavableState.

void sc::SCBlockInfo::set_subdim (int i, const RefSCDimension & dim)

Set subdimension information. The dimension dim and index i must be consistent with the nblocks and blocksizes information given to the constructor.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for MPQC from the source code.

Catch you later, bestie β€” this is MPQC Version 2.3.1, dated Sun Oct 4 2020. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from