Motr
M0
|
#include "lib/bob.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "lib/errno.h"
#include "lib/types.h"
#include "lib/string.h"
#include "lib/finject.h"
#include "lib/varr.h"
#include "lib/varr_private.h"
#include <limits.h>
#include "lib/trace.h"
Go to the source code of this file.
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LIB |
#define | safe_bitshift(num, shift, operator) |
Functions | |
M0_BOB_DEFINE (M0_INTERNAL, &varr_bobtype, m0_varr) | |
M0_INTERNAL bool | varr_invariant (const struct m0_varr *arr) |
M0_INTERNAL int | varr_buffers_alloc (struct m0_varr *arr) |
M0_INTERNAL void | varr_buffers_dealloc (struct m0_varr *arr) |
M0_INTERNAL uint32_t | depth_find (const struct m0_varr *arr, uint64_t buff_nr) |
M0_INTERNAL uint32_t | index_within_level (const struct m0_varr *arr, uint64_t target_idx, uint32_t depth) |
M0_INTERNAL uint32_t | children_of_level (const struct m0_varr *arr, uint32_t level) |
M0_INTERNAL void * | cache_fetch (const struct m0_varr *arr, uint64_t index) |
M0_INTERNAL void | cache_update (struct m0_varr *arr, void *holder, uint64_t start_index) |
M0_INTERNAL unsigned long | varr_obj_nr_in_buff (const struct m0_varr *arr) |
M0_INTERNAL uint64_t | total_leaf_buffers (unsigned long nr, unsigned long obj_nr_in_1_cont, uint8_t obj_nr_shift) |
M0_INTERNAL uint64_t | max_idx_within_level (const struct m0_varr_cursor *cursor, uint32_t depth) |
M0_INTERNAL uint32_t | inc_to_idx_xlate (const struct m0_varr_cursor *cursor, uint64_t carry, uint32_t depth) |
M0_INTERNAL uint64_t | inc_for_next_level (const struct m0_varr_cursor *cursor, uint64_t carry, uint32_t depth) |
M0_INTERNAL uint8_t | log_radix (const struct m0_varr *arr, uint32_t level) |
M0_INTERNAL uint8_t | nearest_power_of_two (size_t num) |
M0_INTERNAL uint64_t | last_nbits_set (uint8_t n) |
M0_INTERNAL void * | buff_incr (const struct m0_varr *arr, uint32_t depth, void *buff, uint32_t inc) |
M0_INTERNAL int | m0_varr_init (struct m0_varr *arr, uint64_t nr, size_t size, size_t bufsize) |
M0_INTERNAL int | m0_varr_cursor_init (struct m0_varr_cursor *cursor, const struct m0_varr *arr, uint32_t depth) |
M0_INTERNAL void * | m0_varr_cursor_get (struct m0_varr_cursor *cursor) |
M0_INTERNAL int | m0_varr_cursor_next (struct m0_varr_cursor *cursor) |
M0_INTERNAL int | m0_varr_cursor_move (struct m0_varr_cursor *cursor, uint64_t inc) |
M0_INTERNAL void | m0_varr_fini (struct m0_varr *arr) |
M0_INTERNAL void * | m0_varr_ele_get (struct m0_varr *arr, uint64_t index) |
M0_INTERNAL uint64_t | m0_varr_size (const struct m0_varr *arr) |
Variables | |
M0_INTERNAL const struct m0_bob_type | varr_bobtype |
#define safe_bitshift | ( | num, | |
shift, | |||
operator | |||
) |
Shifts a given number to left/right by taking into account sizeof(number)
M0_INTERNAL void * buff_incr | ( | const struct m0_varr * | arr, |
uint32_t | depth, | ||
void * | buff, | ||
uint32_t | inc | ||
) |
M0_INTERNAL void * cache_fetch | ( | const struct m0_varr * | arr, |
uint64_t | index | ||
) |
M0_INTERNAL void cache_update | ( | struct m0_varr * | arr, |
void * | holder, | ||
uint64_t | start_index | ||
) |
M0_INTERNAL uint32_t children_of_level | ( | const struct m0_varr * | arr, |
uint32_t | level | ||
) |
M0_INTERNAL uint32_t depth_find | ( | const struct m0_varr * | arr, |
uint64_t | buff_nr | ||
) |
M0_INTERNAL uint64_t inc_for_next_level | ( | const struct m0_varr_cursor * | cursor, |
uint64_t | carry, | ||
uint32_t | depth | ||
) |
M0_INTERNAL uint32_t inc_to_idx_xlate | ( | const struct m0_varr_cursor * | cursor, |
uint64_t | carry, | ||
uint32_t | depth | ||
) |
M0_INTERNAL uint32_t index_within_level | ( | const struct m0_varr * | arr, |
uint64_t | target_idx, | ||
uint32_t | depth | ||
) |
M0_INTERNAL uint64_t last_nbits_set | ( | uint8_t | n | ) |
M0_INTERNAL uint8_t log_radix | ( | const struct m0_varr * | arr, |
uint32_t | level | ||
) |
M0_BOB_DEFINE | ( | M0_INTERNAL | , |
& | varr_bobtype, | ||
m0_varr | |||
) |
M0_INTERNAL uint64_t max_idx_within_level | ( | const struct m0_varr_cursor * | cursor, |
uint32_t | depth | ||
) |
M0_INTERNAL uint8_t nearest_power_of_two | ( | size_t | num | ) |
M0_INTERNAL uint64_t total_leaf_buffers | ( | unsigned long | nr, |
unsigned long | obj_nr_in_1_cont, | ||
uint8_t | obj_nr_shift | ||
) |
M0_INTERNAL int varr_buffers_alloc | ( | struct m0_varr * | arr | ) |
M0_INTERNAL void varr_buffers_dealloc | ( | struct m0_varr * | arr | ) |
M0_INTERNAL bool varr_invariant | ( | const struct m0_varr * | arr | ) |
M0_INTERNAL unsigned long varr_obj_nr_in_buff | ( | const struct m0_varr * | arr | ) |
M0_INTERNAL const struct m0_bob_type varr_bobtype |