diff options
| author | Tyge Løvset <[email protected]> | 2023-02-11 23:55:24 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-11 23:55:24 +0100 |
| commit | e730c593429bdd5a73da5b02e7559b1f0fd21e19 (patch) | |
| tree | 3613172419e4c4821e45f41c15e8d16423b5e6da /docs | |
| parent | 921c06f1b46d449668881ebd1c35a83dc32ad38a (diff) | |
| download | STC-modified-e730c593429bdd5a73da5b02e7559b1f0fd21e19.tar.gz STC-modified-e730c593429bdd5a73da5b02e7559b1f0fd21e19.zip | |
Some more docs. Renamed (half-)internal template parameter i_size => i_ssize. Updated external cpp maps for benchmarks.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/cmap_api.md | 14 | ||||
| -rw-r--r-- | docs/cset_api.md | 10 | ||||
| -rw-r--r-- | docs/csmap_api.md | 12 | ||||
| -rw-r--r-- | docs/csset_api.md | 8 |
4 files changed, 22 insertions, 22 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 2c6274ae..76fbda92 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -38,7 +38,7 @@ See the c++ class [std::unordered_map](https://en.cppreference.com/w/cpp/contain #define i_tag // alternative typename: cmap_{i_tag}. i_tag defaults to i_val #define i_hash_functor // advanced, see examples/functor.c for similar usage. #define i_eq_functor // advanced, see examples/functor.c for similar usage. -#define i_size // define cmap_X_sizet. default int32_t. If defined, table expand 2x (else 1.5x) +#define i_ssize // default int32_t. If defined, table expand 2x (else 1.5x) #include <stc/cmap.h> ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. @@ -47,20 +47,20 @@ See the c++ class [std::unordered_map](https://en.cppreference.com/w/cpp/contain ```c cmap_X cmap_X_init(void); -cmap_X cmap_X_with_capacity(cmap_X_sizet cap); +cmap_X cmap_X_with_capacity(i_ssize cap); cmap_X cmap_X_clone(cmap_x map); void cmap_X_clear(cmap_X* self); void cmap_X_copy(cmap_X* self, const cmap_X* other); float cmap_X_max_load_factor(const cmap_X* self); // default: 0.85f -bool cmap_X_reserve(cmap_X* self, cmap_X_sizet size); +bool cmap_X_reserve(cmap_X* self, i_ssize size); void cmap_X_shrink_to_fit(cmap_X* self); void cmap_X_drop(cmap_X* self); // destructor bool cmap_X_empty(const cmap_X* self ); -cmap_X_sizet cmap_X_size(const cmap_X* self); -cmap_X_sizet cmap_X_capacity(const cmap_X* self); // buckets * max_load_factor -cmap_X_sizet cmap_X_bucket_count(const cmap_X* self); // num. of allocated buckets +i_ssize cmap_X_size(const cmap_X* self); +i_ssize cmap_X_capacity(const cmap_X* self); // buckets * max_load_factor +i_ssize cmap_X_bucket_count(const cmap_X* self); // num. of allocated buckets const cmap_X_mapped* cmap_X_at(const cmap_X* self, i_keyraw rkey); // rkey must be in map cmap_X_mapped* cmap_X_at_mut(cmap_X* self, i_keyraw rkey); // mutable at @@ -83,7 +83,7 @@ void cmap_X_erase_entry(cmap_X* self, cmap_X_value* entry); cmap_X_iter cmap_X_begin(const cmap_X* self); cmap_X_iter cmap_X_end(const cmap_X* self); void cmap_X_next(cmap_X_iter* it); -cmap_X_iter cmap_X_advance(cmap_X_iter it, cmap_X_sizet n); +cmap_X_iter cmap_X_advance(cmap_X_iter it, cmap_X_ssize n); cmap_X_value cmap_X_value_clone(cmap_X_value val); cmap_X_raw cmap_X_value_toraw(cmap_X_value* pval); diff --git a/docs/cset_api.md b/docs/cset_api.md index 27e633b4..34b6f3eb 100644 --- a/docs/cset_api.md +++ b/docs/cset_api.md @@ -21,7 +21,7 @@ A **cset** is an associative container that contains a set of unique objects of #define i_tag // alternative typename: cmap_{i_tag}. i_tag defaults to i_val #define i_hash_functor // advanced, see examples/functor.c for similar usage. #define i_eq_functor // advanced, see examples/functor.c for similar usage. -#define i_size // defines cset_X_sizet. default int32_t. If defined, table expand 2x (else 1.5x) +#define i_ssize // default int32_t. If defined, table expand 2x (else 1.5x) #include <stc/cset.h> ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. @@ -36,14 +36,14 @@ cset_X cset_X_clone(cset_x set); void cset_X_clear(cset_X* self); void cset_X_copy(cset_X* self, const cset_X* other); float cset_X_max_load_factor(const cset_X* self); // default: 0.85 -bool cset_X_reserve(cset_X* self, cset_X_sizet size); +bool cset_X_reserve(cset_X* self, i_ssize size); void cset_X_shrink_to_fit(cset_X* self); void cset_X_drop(cset_X* self); // destructor -cset_X_sizet cset_X_size(const cset_X* self); // num. of allocated buckets -cset_X_sizet cset_X_capacity(const cset_X* self); // buckets * max_load_factor +i_ssize cset_X_size(const cset_X* self); // num. of allocated buckets +i_ssize cset_X_capacity(const cset_X* self); // buckets * max_load_factor bool cset_X_empty(const cset_X* self); -cset_X_sizet cset_X_bucket_count(const cset_X* self); +i_ssize cset_X_bucket_count(const cset_X* self); bool cset_X_contains(const cset_X* self, i_keyraw rkey); const cset_X_value* cset_X_get(const cset_X* self, i_keyraw rkey); // return NULL if not found diff --git a/docs/csmap_api.md b/docs/csmap_api.md index 59185081..19a654d6 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -34,7 +34,7 @@ See the c++ class [std::map](https://en.cppreference.com/w/cpp/container/map) fo #define i_tag // alternative typename: csmap_{i_tag}. i_tag defaults to i_val #define i_cmp_functor // advanced, see examples/functor.c for similar usage. -#define i_size // defines csmap_X_sizet type; defaults to int32_t +#define i_ssize // defaults to int32_t #include <stc/csmap.h> ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. @@ -43,8 +43,8 @@ See the c++ class [std::map](https://en.cppreference.com/w/cpp/container/map) fo ```c csmap_X csmap_X_init(void); -csset_X csmap_X_with_capacity(csmap_X_sizet cap); -bool csmap_X_reserve(csmap_X* self, csmap_X_sizet cap); +csset_X csmap_X_with_capacity(i_ssize cap); +bool csmap_X_reserve(csmap_X* self, i_ssize cap); void csmap_X_shrink_to_fit(csmap_X* self); csmap_X csmap_X_clone(csmap_x map); @@ -53,8 +53,8 @@ void csmap_X_copy(csmap_X* self, const csmap_X* other); void csmap_X_drop(csmap_X* self); // destructor bool csmap_X_empty(const csmap_X* self); -csmap_X_sizet csmap_X_size(const csmap_X* self); -csmap_X_sizet csmap_X_capacity(const csmap_X* self); +i_ssize csmap_X_size(const csmap_X* self); +i_ssize csmap_X_capacity(const csmap_X* self); const csmap_X_mapped* csmap_X_at(const csmap_X* self, i_keyraw rkey); // rkey must be in map csmap_X_mapped* csmap_X_at_mut(csmap_X* self, i_keyraw rkey); // mutable at @@ -82,7 +82,7 @@ csmap_X_iter csmap_X_erase_range(csmap_X* self, csmap_X_iter it1, csmap csmap_X_iter csmap_X_begin(const csmap_X* self); csmap_X_iter csmap_X_end(const csmap_X* self); void csmap_X_next(csmap_X_iter* iter); -csmap_X_iter csmap_X_advance(csmap_X_iter it, csmap_X_sizet n); +csmap_X_iter csmap_X_advance(csmap_X_iter it, i_ssize n); csmap_X_value csmap_X_value_clone(csmap_X_value val); csmap_X_raw csmap_X_value_toraw(csmap_X_value* pval); diff --git a/docs/csset_api.md b/docs/csset_api.md index 4618bd18..c696eab5 100644 --- a/docs/csset_api.md +++ b/docs/csset_api.md @@ -20,7 +20,7 @@ See the c++ class [std::set](https://en.cppreference.com/w/cpp/container/set) fo #define i_cmp_functor // advanced, see examples/functor.c for similar usage. #define i_tag // alternative typename: csset_{i_tag}. i_tag defaults to i_val -#define i_size // defines csset_X_sizet type; defaults to int32_t +#define i_ssize // defaults to int32_t #include <stc/csset.h> ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. @@ -29,8 +29,8 @@ See the c++ class [std::set](https://en.cppreference.com/w/cpp/container/set) fo ```c csset_X csset_X_init(void); -csset_X csset_X_with_capacity(csset_X_sizet cap); -bool csset_X_reserve(csset_X* self, csset_X_sizet cap); +csset_X csset_X_with_capacity(i_ssize cap); +bool csset_X_reserve(csset_X* self, i_ssize cap); void csset_X_shrink_to_fit(csset_X* self); csset_X csset_X_clone(csset_x set); @@ -38,7 +38,7 @@ void csset_X_clear(csset_X* self); void csset_X_copy(csset_X* self, const csset_X* other); void csset_X_drop(csset_X* self); // destructor -csset_X_sizet csset_X_size(const csset_X* self); +i_ssize csset_X_size(const csset_X* self); bool csset_X_empty(const csset_X* self); const csset_X_value* csset_X_get(const csset_X* self, i_keyraw rkey); // const get |
