Template Struct t8_data_handler< pseudo_tree >

Struct Documentation

template<>
struct t8_data_handler<pseudo_tree>

Data handler for for the pseudo_tree structure.

Public Functions

inline int size(const pseudo_tree &item, sc_MPI_Comm comm)

Returns the size of a pseudo_tree.

Parameters:
  • item[in] The data to compute the size of.

  • comm[in] The MPI communicator used for communication.

Returns:

An integer representing the size of the data.

inline void pack(const pseudo_tree &data, int &pos, void *buffer, const int num_bytes, sc_MPI_Comm comm)

Packs a pseudo_tree into a buffer for communication.

Parameters:
  • data[in] The data to be packed.

  • pos[in] The current position in the buffer where the data should be packed.

  • buffer[inout] The buffer where the data will be packed.

  • num_bytes[in] The number of bytes available in the buffer.

  • comm[in] The MPI communicator used for communication.

inline void unpack(const void *buffer, const int num_bytes, int &pos, pseudo_tree &data, sc_MPI_Comm comm)

Unpacks a pseudo_tree from a buffer.

Parameters:
  • buffer[in] A pointer to the buffer containing the packed data.

  • num_bytes[in] The number of bytes in the buffer.

  • pos[in] A reference to an integer representing the current position in the buffer.

  • data[inout] A pointer to the data structure where the unpacked data will be stored.

  • comm[in] The MPI communicator used for communication.

inline constexpr t8_data_handler_type type()

Returns the type of the data handler.

This function returns the type of the data handler.

Returns:

An integer representing the type.