Skip to content

Commit 62d75c0

Browse files
committed
Update tskit C API to version 1.3.1
1 parent 16d5be2 commit 62d75c0

14 files changed

Lines changed: 79 additions & 79 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.1
1+
2.1.2

RcppTskit/inst/include/tskit/tskit/core.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" {
4242

4343
#ifdef __GNUC__
4444
#define TSK_WARN_UNUSED __attribute__((warn_unused_result))
45-
#define TSK_UNUSED(x) TSK_UNUSED_##x __attribute__((__unused__))
45+
#define TSK_UNUSED(x) TSK_UNUSED_##x __attribute__((__unused__))
4646
#else
4747
#define TSK_WARN_UNUSED
4848
#define TSK_UNUSED(x) TSK_UNUSED_##x
@@ -93,11 +93,11 @@ missing data.
9393
* on the thread above.
9494
*/
9595
typedef int64_t tsk_id_t;
96-
#define TSK_MAX_ID INT64_MAX - 1
96+
#define TSK_MAX_ID INT64_MAX - 1
9797
#define TSK_ID_STORAGE_TYPE KAS_INT64
9898
#else
9999
typedef int32_t tsk_id_t;
100-
#define TSK_MAX_ID INT32_MAX - 1
100+
#define TSK_MAX_ID INT32_MAX - 1
101101
#define TSK_ID_STORAGE_TYPE KAS_INT32
102102
#endif
103103

@@ -109,7 +109,7 @@ The ``tsk_size_t`` type is an unsigned integer used for any size or count value.
109109
@endrst
110110
*/
111111
typedef uint64_t tsk_size_t;
112-
#define TSK_MAX_SIZE UINT64_MAX
112+
#define TSK_MAX_SIZE UINT64_MAX
113113
#define TSK_SIZE_STORAGE_TYPE KAS_UINT64
114114

115115
/**
@@ -152,7 +152,7 @@ to the API or ABI are introduced, i.e., the addition of a new function.
152152
The library patch version. Incremented when any changes not relevant to the
153153
to the API or ABI are introduced, i.e., internal refactors of bugfixes.
154154
*/
155-
#define TSK_VERSION_PATCH 0
155+
#define TSK_VERSION_PATCH 1
156156
/** @} */
157157

158158
/*

RcppTskit/inst/include/tskit/tskit/kastore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ to the API or ABI are introduced, i.e., the addition of a new function.
157157
The library patch version. Incremented when any changes not relevant to the
158158
to the API or ABI are introduced, i.e., internal refactors of bugfixes.
159159
*/
160-
#define KAS_VERSION_PATCH 1
160+
#define KAS_VERSION_PATCH 2
161161
/** @} */
162162

163163
#define KAS_HEADER_SIZE 64

RcppTskit/inst/include/tskit/tskit/tables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4607,7 +4607,7 @@ tsk_id_t tsk_table_collection_check_integrity(
46074607
/* Undocumented methods */
46084608

46094609
/* Flags for ibd_segments */
4610-
#define TSK_IBD_STORE_PAIRS (1 << 0)
4610+
#define TSK_IBD_STORE_PAIRS (1 << 0)
46114611
#define TSK_IBD_STORE_SEGMENTS (1 << 1)
46124612

46134613
/* TODO be systematic about where "result" should be in the params

RcppTskit/inst/include/tskit/tskit/trees.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ sequence.
663663
@endrst
664664
665665
@param self A pointer to a tsk_treeseq_t object.
666-
@return Returns a pointer to the time units.
666+
@return Returns a pointer to the null-terminated file uuid.
667667
*/
668668
const char *tsk_treeseq_get_file_uuid(const tsk_treeseq_t *self);
669669

RcppTskit/src/tskit/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.1
1+
2.1.2

RcppTskit/src/tskit/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,8 @@ tsk_search_sorted(const double *restrict array, tsk_size_t size, double value)
883883
upper = mid;
884884
}
885885
}
886-
offset = (int64_t)(array[lower] < value);
887-
return (tsk_size_t)(lower + offset);
886+
offset = (int64_t) (array[lower] < value);
887+
return (tsk_size_t) (lower + offset);
888888
}
889889

890890
/* Rounds the specified double to the closest multiple of 10**-num_digits. If

RcppTskit/src/tskit/haplotype_matching.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,15 +572,15 @@ static inline bool
572572
element_in(
573573
const uint64_t *restrict A, tsk_id_t u, const tsk_id_t state, tsk_size_t num_words)
574574
{
575-
tsk_size_t index = ((tsk_size_t) u) * num_words + (tsk_size_t)(state / 64);
575+
tsk_size_t index = ((tsk_size_t) u) * num_words + (tsk_size_t) (state / 64);
576576
return (A[index] & (1ULL << (state % 64))) != 0;
577577
}
578578

579579
static inline void
580580
set_optimal_value(
581581
uint64_t *restrict A, tsk_id_t u, const tsk_size_t num_words, tsk_id_t state)
582582
{
583-
tsk_size_t index = ((tsk_size_t) u) * num_words + (tsk_size_t)(state / 64);
583+
tsk_size_t index = ((tsk_size_t) u) * num_words + (tsk_size_t) (state / 64);
584584
tsk_bug_assert(((tsk_size_t) state) / 64 < num_words);
585585
A[index] |= 1ULL << (state % 64);
586586
}
@@ -815,7 +815,7 @@ tsk_ls_hmm_redistribute_transitions(tsk_ls_hmm_t *self)
815815
* iterating over the roots. See the existing parsimony implementations
816816
* for an example. */
817817
for (root = tsk_tree_get_left_root(&self->tree); root != TSK_NULL;
818-
root = right_sib[root]) {
818+
root = right_sib[root]) {
819819
stack[0].tree_node = root;
820820
stack[0].old_state = T_old[T_index[root]].value_index;
821821
stack[0].new_state
@@ -966,7 +966,7 @@ tsk_ls_hmm_run_forward(tsk_ls_hmm_t *self, int32_t *haplotype)
966966
}
967967

968968
for (t_ret = tsk_tree_first(&self->tree); t_ret == TSK_TREE_OK;
969-
t_ret = tsk_tree_next(&self->tree)) {
969+
t_ret = tsk_tree_next(&self->tree)) {
970970
ret = tsk_ls_hmm_update_tree(self, TSK_DIR_FORWARD);
971971
if (ret != 0) {
972972
goto out;
@@ -1166,7 +1166,7 @@ tsk_ls_hmm_run_backward(
11661166
}
11671167

11681168
for (t_ret = tsk_tree_last(&self->tree); t_ret == TSK_TREE_OK;
1169-
t_ret = tsk_tree_prev(&self->tree)) {
1169+
t_ret = tsk_tree_prev(&self->tree)) {
11701170
ret = tsk_ls_hmm_update_tree(self, TSK_DIR_REVERSE);
11711171
if (ret != 0) {
11721172
goto out;
@@ -1492,7 +1492,7 @@ tsk_compressed_matrix_decode(tsk_compressed_matrix_t *self, double *values)
14921492
}
14931493

14941494
for (t_ret = tsk_tree_first(&tree); t_ret == TSK_TREE_OK;
1495-
t_ret = tsk_tree_next(&tree)) {
1495+
t_ret = tsk_tree_next(&tree)) {
14961496
ret = tsk_tree_get_sites(&tree, &sites, &num_tree_sites);
14971497
if (ret != 0) {
14981498
goto out;

0 commit comments

Comments
 (0)