NewMadeleine

Documentation

« back to PM2 home.

A collection of helper function to help manipulating nm_data. More...

Functions

static void nm_data_traversal_op_apply (const struct nm_data_s *p_data, struct nm_data_op_s *p_op)
 
static void nm_data_traversal_apply (const struct nm_data_s *p_data, nm_data_apply_t p_apply, void *_context)
 helper function to apply iterator to data
 
void nm_data_chunk_extractor_op_traversal (const struct nm_data_s *p_data, nm_len_t chunk_offset, nm_len_t chunk_len, struct nm_data_op_s *p_op)
 
void nm_data_chunk_extractor_traversal (const struct nm_data_s *p_data, nm_len_t chunk_offset, nm_len_t chunk_len, nm_data_apply_t p_apply, void *p_apply_context)
 
static const struct nm_data_properties_snm_data_properties_get (const struct nm_data_s *p_data)
 returns the properties block for the data
 
static nm_len_t nm_data_size (const struct nm_data_s *p_data)
 returns the amount of data contained in the descriptor
 
void * nm_data_baseptr_get (const struct nm_data_s *p_data)
 find base pointer for a data known to be contiguous
 
void * nm_data_chunk_baseptr_get (const struct nm_data_s *p_data, nm_len_t chunk_offset, nm_len_t chunk_len)
 find base pointer for a data chunk known to be contiguous
 
void nm_data_chunk_properties_compute (const struct nm_data_s *p_data, nm_len_t chunk_offset, nm_len_t chunk_len, struct nm_data_properties_s *p_props)
 compute properties of the given chunk inside the data
 
nm_len_t nm_data_chunk_first_get (const struct nm_data_s *p_data, nm_len_t chunk_offset, nm_len_t chunk_len, int n)
 get length of first n blocks in given chunk
 
uint32_t nm_data_checksum (const struct nm_data_s *p_data)
 checksum data

 
void nm_data_copy_from (const struct nm_data_s *p_data, nm_len_t offset, nm_len_t len, void *destbuf)
 copy chunk of data from user layout to contiguous buffer
 
void nm_data_copy_to (const struct nm_data_s *p_data, nm_len_t offset, nm_len_t len, const void *srcbuf)
 copy chunk of data from contiguous buffer to user layout
 
void nm_data_copy (struct nm_data_s *p_dest, struct nm_data_s *p_from)
 copy from nm_data to another nm_data
 

Detailed Description

A collection of helper function to help manipulating nm_data.

Function Documentation

◆ nm_data_baseptr_get()

void * nm_data_baseptr_get ( const struct nm_data_s p_data)

find base pointer for a data known to be contiguous

◆ nm_data_checksum()

uint32_t nm_data_checksum ( const struct nm_data_s p_data)

checksum data

◆ nm_data_chunk_baseptr_get()

void * nm_data_chunk_baseptr_get ( const struct nm_data_s p_data,
nm_len_t  chunk_offset,
nm_len_t  chunk_len 
)

find base pointer for a data chunk known to be contiguous

◆ nm_data_chunk_extractor_op_traversal()

void nm_data_chunk_extractor_op_traversal ( const struct nm_data_s p_data,
nm_len_t  chunk_offset,
nm_len_t  chunk_len,
struct nm_data_op_s p_op 
)

◆ nm_data_chunk_extractor_traversal()

void nm_data_chunk_extractor_traversal ( const struct nm_data_s p_data,
nm_len_t  chunk_offset,
nm_len_t  chunk_len,
nm_data_apply_t  p_apply,
void *  p_apply_context 
)

◆ nm_data_chunk_first_get()

nm_len_t nm_data_chunk_first_get ( const struct nm_data_s p_data,
nm_len_t  chunk_offset,
nm_len_t  chunk_len,
int  n 
)

get length of first n blocks in given chunk

◆ nm_data_chunk_properties_compute()

void nm_data_chunk_properties_compute ( const struct nm_data_s p_data,
nm_len_t  chunk_offset,
nm_len_t  chunk_len,
struct nm_data_properties_s p_props 
)

compute properties of the given chunk inside the data

Referenced by nm_minidriver_recv_pkt_build(), nm_minidriver_send_pkt_build(), nm_req_chunk_init(), and nm_req_chunk_update().

◆ nm_data_copy()

void nm_data_copy ( struct nm_data_s p_dest,
struct nm_data_s p_from 
)

copy from nm_data to another nm_data

Referenced by nm_mpi_datatype_copy().

◆ nm_data_copy_from()

void nm_data_copy_from ( const struct nm_data_s p_data,
nm_len_t  offset,
nm_len_t  len,
void *  destbuf 
)

copy chunk of data from user layout to contiguous buffer

Referenced by nm_mpi_datatype_pack().

◆ nm_data_copy_to()

void nm_data_copy_to ( const struct nm_data_s p_data,
nm_len_t  offset,
nm_len_t  len,
const void *  srcbuf 
)

copy chunk of data from contiguous buffer to user layout

Referenced by nm_mpi_datatype_unpack().

◆ nm_data_properties_get()

static const struct nm_data_properties_s * nm_data_properties_get ( const struct nm_data_s p_data)
inlinestatic

returns the properties block for the data

Definition at line 667 of file nm_data.h.

References p_data.

Referenced by nm_data_size().

◆ nm_data_size()

static nm_len_t nm_data_size ( const struct nm_data_s p_data)
inlinestatic

returns the amount of data contained in the descriptor

Definition at line 673 of file nm_data.h.

References nm_data_properties_get(), p_data, and nm_data_properties_s::size.

Referenced by nm_datav_size(), nm_mpi_datatype_pack(), nm_mpi_datatype_unpack(), nm_rpc_recv_header_data(), and nm_sr_recv_peek().

Here is the call graph for this function:

◆ nm_data_traversal_apply()

static void nm_data_traversal_apply ( const struct nm_data_s p_data,
nm_data_apply_t  p_apply,
void *  _context 
)
inlinestatic

helper function to apply iterator to data

Definition at line 651 of file nm_data.h.

References nm_data_op_s::context, nm_data_op_s::dynamic, nm_data_op_s::kind, NM_DATA_OP_DYNAMIC, nm_data_traversal_op_apply(), nm_data_op_context_dynamic_s::p_apply, nm_data_op_context_dynamic_s::p_apply_context, and p_data.

Here is the call graph for this function:

◆ nm_data_traversal_op_apply()

static void nm_data_traversal_op_apply ( const struct nm_data_s p_data,
struct nm_data_op_s p_op 
)
inlinestatic

Definition at line 643 of file nm_data.h.

References assert(), p_data, and p_op.

Referenced by nm_data_traversal_apply().

Here is the call graph for this function: