Motr  M0
vec.h File Reference
#include "motr/config.h"
#include "lib/types.h"
#include "lib/buf.h"
#include "lib/varr.h"
#include "xcode/xcode_attr.h"
Include dependency graph for vec.h:

Go to the source code of this file.

Data Structures

struct  m0_vec
 
struct  m0_vec_cursor
 
struct  m0_indexvec
 
struct  m0_bufvec
 
struct  m0_bufvec_cursor
 
struct  m0_ivec_cursor
 
struct  m0_0vec
 
struct  m0_ioseg
 
struct  m0_io_indexvec
 
struct  m0_io_indexvec_seq
 
struct  m0_indexvec_varr
 
struct  m0_ivec_varr_cursor
 

Macros

#define __MOTR_LIB_VEC_H__
 
#define M0_BUFVEC_INIT_BUF(addr_ptr, count_ptr)
 
#define M0_BUFVEC_FOR2(c0, c1, frag)
 
#define M0_BUFVEC_ENDFOR2   } }
 

Functions

struct m0_vec M0_XCA_DOMAIN (rpc)
 
M0_INTERNAL m0_bcount_t m0_vec_count (const struct m0_vec *vec)
 
M0_INTERNAL bool m0_vec_is_empty (const struct m0_vec *vec)
 
M0_INTERNAL void m0_vec_cursor_init (struct m0_vec_cursor *cur, const struct m0_vec *vec)
 
M0_INTERNAL bool m0_vec_cursor_move (struct m0_vec_cursor *cur, m0_bcount_t count)
 
M0_INTERNAL m0_bcount_t m0_vec_cursor_step (const struct m0_vec_cursor *cur)
 
M0_INTERNAL m0_bcount_t m0_vec_cursor_end (const struct m0_vec_cursor *cur)
 
M0_INTERNAL int m0_bufvec_alloc (struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size)
 
M0_INTERNAL int m0_bufvec_empty_alloc (struct m0_bufvec *bufvec, uint32_t num_segs)
 
M0_INTERNAL int m0_bufvec_extend (struct m0_bufvec *bufvec, uint32_t num_segs)
 
M0_INTERNAL int m0_bufvec_merge (struct m0_bufvec *dst_bufvec, struct m0_bufvec *src_bufvec)
 
M0_INTERNAL int m0_bufvec_alloc_aligned (struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size, unsigned shift)
 
M0_INTERNAL int m0_bufvec_alloc_aligned_packed (struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size, unsigned shift)
 
M0_INTERNAL int m0__bufvec_dont_dump (struct m0_bufvec *bufvec)
 
M0_INTERNAL void m0_bufvec_free (struct m0_bufvec *bufvec)
 
M0_INTERNAL void m0_bufvec_free2 (struct m0_bufvec *bufvec)
 
M0_INTERNAL void m0_bufvec_free_aligned (struct m0_bufvec *bufvec, unsigned shift)
 
M0_INTERNAL void m0_bufvec_free_aligned_packed (struct m0_bufvec *bufvec, unsigned shift)
 
M0_INTERNAL uint32_t m0_bufvec_pack (struct m0_bufvec *bv)
 
M0_INTERNAL int m0_bufvec_splice (const struct m0_bufvec *bvec, m0_bcount_t nr, struct m0_buf *buf)
 
M0_INTERNAL int m0_indexvec_alloc (struct m0_indexvec *ivec, uint32_t len)
 
M0_INTERNAL void m0_indexvec_free (struct m0_indexvec *ivec)
 
M0_INTERNAL uint32_t m0_indexvec_pack (struct m0_indexvec *iv)
 
M0_INTERNAL void m0_bufvec_cursor_init (struct m0_bufvec_cursor *cur, const struct m0_bufvec *bvec)
 
M0_INTERNAL bool m0_bufvec_cursor_move (struct m0_bufvec_cursor *cur, m0_bcount_t count)
 
M0_INTERNAL bool m0_bufvec_cursor_align (struct m0_bufvec_cursor *cur, uint64_t alignment)
 
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_step (const struct m0_bufvec_cursor *cur)
 
M0_INTERNAL void * m0_bufvec_cursor_addr (struct m0_bufvec_cursor *cur)
 
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_copy (struct m0_bufvec_cursor *dcur, struct m0_bufvec_cursor *scur, m0_bcount_t num_bytes)
 
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_copyto (struct m0_bufvec_cursor *dcur, void *sdata, m0_bcount_t num_bytes)
 
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_copyfrom (struct m0_bufvec_cursor *scur, void *ddata, m0_bcount_t num_bytes)
 
M0_INTERNAL int m0_bufvec_cursor_cmp (struct m0_bufvec_cursor *c0, struct m0_bufvec_cursor *c1)
 
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_prefix (struct m0_bufvec_cursor *c0, struct m0_bufvec_cursor *c1)
 
M0_INTERNAL void m0_ivec_cursor_init (struct m0_ivec_cursor *cur, const struct m0_indexvec *ivec)
 
M0_INTERNAL bool m0_ivec_cursor_move (struct m0_ivec_cursor *cur, m0_bcount_t count)
 
M0_INTERNAL bool m0_ivec_cursor_move_to (struct m0_ivec_cursor *cur, m0_bindex_t dest)
 
M0_INTERNAL m0_bcount_t m0_ivec_cursor_step (const struct m0_ivec_cursor *cur)
 
M0_INTERNAL m0_bindex_t m0_ivec_cursor_index (const struct m0_ivec_cursor *cur)
 
M0_INTERNAL m0_bindex_t m0_ivec_cursor_conti (const struct m0_ivec_cursor *cur, m0_bindex_t dest)
 
M0_INTERNAL int m0_0vec_init (struct m0_0vec *zvec, uint32_t segs_nr)
 
M0_INTERNAL void m0_0vec_fini (struct m0_0vec *zvec)
 
M0_INTERNAL void m0_0vec_bvec_init (struct m0_0vec *zvec, const struct m0_bufvec *src, const m0_bindex_t *index)
 
M0_INTERNAL void m0_0vec_bufs_init (struct m0_0vec *zvec, void **bufs, const m0_bindex_t *index, const m0_bcount_t *counts, uint32_t segs_nr)
 
M0_INTERNAL int m0_0vec_cbuf_add (struct m0_0vec *zvec, const struct m0_buf *buf, const m0_bindex_t *index)
 
M0_INTERNAL int m0_data_to_bufvec_copy (struct m0_bufvec_cursor *cur, void *data, size_t len)
 
M0_INTERNAL int m0_bufvec_to_data_copy (struct m0_bufvec_cursor *cur, void *data, size_t len)
 
M0_INTERNAL m0_bcount_t m0_bufvec_copy (struct m0_bufvec *dst, struct m0_bufvec *src, m0_bcount_t num_bytes)
 
M0_INTERNAL m0_bcount_t m0_io_count (const struct m0_io_indexvec *io_info)
 
M0_INTERNAL int m0_indexvec_split (struct m0_indexvec *in, m0_bcount_t curr_pos, m0_bcount_t nb_len, uint32_t bshift, struct m0_indexvec *out)
 
M0_INTERNAL int m0_indexvec_wire2mem (struct m0_io_indexvec *wire_ivec, int max_frags_nr, uint32_t bshift, struct m0_indexvec *mem_ivec)
 
M0_INTERNAL int m0_indexvec_mem2wire (struct m0_indexvec *mem_ivec, int max_frags_nr, uint32_t bshift, struct m0_io_indexvec *wire_ivec)
 
M0_INTERNAL int m0_indexvec_universal_set (struct m0_indexvec *iv)
 
M0_INTERNAL bool m0_indexvec_is_universal (const struct m0_indexvec *iv)
 
M0_INTERNAL int m0_indexvec_varr_alloc (struct m0_indexvec_varr *ivec, uint32_t len)
 
M0_INTERNAL void m0_indexvec_varr_free (struct m0_indexvec_varr *ivec)
 
M0_INTERNAL void m0_ivec_varr_cursor_init (struct m0_ivec_varr_cursor *cur, struct m0_indexvec_varr *ivec)
 
M0_INTERNAL bool m0_ivec_varr_cursor_move (struct m0_ivec_varr_cursor *cur, m0_bcount_t count)
 
M0_INTERNAL bool m0_ivec_varr_cursor_move_to (struct m0_ivec_varr_cursor *cur, m0_bindex_t dest)
 
M0_INTERNAL m0_bcount_t m0_ivec_varr_cursor_step (const struct m0_ivec_varr_cursor *cur)
 
M0_INTERNAL m0_bindex_t m0_ivec_varr_cursor_index (const struct m0_ivec_varr_cursor *cur)
 
M0_INTERNAL m0_bindex_t m0_ivec_varr_cursor_conti (const struct m0_ivec_varr_cursor *cur, m0_bindex_t dest)
 
M0_INTERNAL int m0_bufvec_to_buf_copy (struct m0_buf *buf, const struct m0_bufvec *bvec)
 
M0_INTERNAL int m0_buf_to_bufvec_copy (struct m0_bufvec *bvec, const struct m0_buf *buf)
 

Variables

uint32_t v_nr
 
m0_bcount_tv_count
 
struct m0_vec_cursor M0_XCA_DOMAIN
 
uint64_t ci_index
 
uint64_t ci_count
 
uint32_t ci_nr
 
struct m0_iosegci_iosegs
 
uint32_t cis_nr
 
struct m0_io_indexveccis_ivecs
 

Macro Definition Documentation

◆ __MOTR_LIB_VEC_H__

#define __MOTR_LIB_VEC_H__

Definition at line 26 of file vec.h.

Variable Documentation

◆ ci_count

uint64_t ci_count

Definition at line 619 of file vec.h.

◆ ci_index

uint64_t ci_index

Definition at line 618 of file vec.h.

◆ ci_iosegs

struct m0_ioseg* ci_iosegs

Definition at line 619 of file vec.h.

◆ ci_nr

uint32_t ci_nr

Definition at line 618 of file vec.h.

◆ cis_ivecs

struct m0_io_indexvec* cis_ivecs

Definition at line 619 of file vec.h.

◆ cis_nr

uint32_t cis_nr

Definition at line 618 of file vec.h.

◆ v_count

m0_bcount_t* v_count

array of segment counts

Definition at line 1319 of file vec.h.

◆ v_nr

uint32_t v_nr

number of segments in the vector

Definition at line 1317 of file vec.h.