|
GRPC Core
9.0.0
|
#include <grpc/support/port_platform.h>#include "src/core/lib/slice/slice_internal.h"#include "src/core/lib/slice/slice_utils.h"#include <inttypes.h>#include <string.h>#include <grpc/support/alloc.h>#include <grpc/support/log.h>#include "src/core/lib/gpr/murmur_hash.h"#include "src/core/lib/gprpp/sync.h"#include "src/core/lib/iomgr/iomgr_internal.h"#include "src/core/lib/profiling/timers.h"#include "src/core/lib/slice/slice_string_helpers.h"#include "src/core/lib/transport/static_metadata.h"Data Structures | |
| struct | slice_shard |
| struct | static_metadata_hash_ent |
Namespaces | |
| grpc_core | |
| Round Robin Policy. | |
Macros | |
| #define | LOG2_SHARD_COUNT 5 |
| #define | SHARD_COUNT (1 << LOG2_SHARD_COUNT) |
| #define | INITIAL_SHARD_CAPACITY 8 |
| #define | TABLE_IDX(hash, capacity) (((hash) >> LOG2_SHARD_COUNT) % (capacity)) |
| #define | SHARD_IDX(hash) ((hash) & ((1 << LOG2_SHARD_COUNT) - 1)) |
Typedefs | |
| typedef struct slice_shard | slice_shard |
Functions | |
| uint32_t | grpc_slice_default_hash_impl (grpc_slice s) |
| uint32_t | grpc_static_slice_hash (grpc_slice s) |
| int | grpc_static_slice_eq (grpc_slice a, grpc_slice b) |
| uint32_t | grpc_slice_hash (grpc_slice s) |
| grpc_slice | grpc_slice_maybe_static_intern (grpc_slice slice, bool *returned_slice_is_different) |
| grpc_slice | grpc_slice_intern (grpc_slice slice) |
| Intern a slice: More... | |
| void | grpc_test_only_set_slice_hash_seed (uint32_t seed) |
| void | grpc_slice_intern_init (void) |
| void | grpc_slice_intern_shutdown (void) |
Variables | |
| uint32_t | grpc_static_metadata_hash_values [GRPC_STATIC_MDSTR_COUNT] |
| uint32_t | grpc_core::g_hash_seed |
| #define INITIAL_SHARD_CAPACITY 8 |
| #define LOG2_SHARD_COUNT 5 |
| #define SHARD_COUNT (1 << LOG2_SHARD_COUNT) |
| #define SHARD_IDX | ( | hash | ) | ((hash) & ((1 << LOG2_SHARD_COUNT) - 1)) |
| #define TABLE_IDX | ( | hash, | |
| capacity | |||
| ) | (((hash) >> LOG2_SHARD_COUNT) % (capacity)) |
| typedef struct slice_shard slice_shard |
| uint32_t grpc_slice_default_hash_impl | ( | grpc_slice | s | ) |
| uint32_t grpc_slice_hash | ( | grpc_slice | s | ) |
| grpc_slice grpc_slice_intern | ( | grpc_slice | slice | ) |
Intern a slice:
The return value for two invocations of this function with the same sequence of bytes is a slice which points to the same memory.
| void grpc_slice_intern_init | ( | void | ) |
| void grpc_slice_intern_shutdown | ( | void | ) |
| grpc_slice grpc_slice_maybe_static_intern | ( | grpc_slice | slice, |
| bool * | returned_slice_is_different | ||
| ) |
| int grpc_static_slice_eq | ( | grpc_slice | a, |
| grpc_slice | b | ||
| ) |
| uint32_t grpc_static_slice_hash | ( | grpc_slice | s | ) |
| void grpc_test_only_set_slice_hash_seed | ( | uint32_t | seed | ) |
| uint32_t grpc_static_metadata_hash_values[GRPC_STATIC_MDSTR_COUNT] |