Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/.clang-format → .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ BinPackArguments: true
BinPackParameters: true
AlwaysBreakAfterReturnType: AllDefinitions

# These are disabled for version 6 compatibility
# StatementMacros: ["PyObject_HEAD"]
# AlignConsecutiveMacros: true
StatementMacros: ["PyObject_HEAD", "Py_BEGIN_ALLOW_THREADS", "Py_END_ALLOW_THREADS"]
AlignConsecutiveMacros: true
6 changes: 3 additions & 3 deletions lib/msprime.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
#include "msprime.h"

/* State machine for the simulator object. */
#define MSP_STATE_NEW 0
#define MSP_STATE_NEW 0
#define MSP_STATE_INITIALISED 1
#define MSP_STATE_SIMULATING 2
#define MSP_STATE_DEBUGGING 3
#define MSP_STATE_SIMULATING 2
#define MSP_STATE_DEBUGGING 3

/* Draw a random variable from a truncated Beta(a, b) distribution,
* by rejecting draws above the truncation point x.
Expand Down
42 changes: 21 additions & 21 deletions lib/msprime.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,40 @@
#include "object_heap.h"
#include "rate_map.h"

#define MSP_MODEL_HUDSON 0
#define MSP_MODEL_SMC 1
#define MSP_MODEL_HUDSON 0
#define MSP_MODEL_SMC 1
#define MSP_MODEL_SMC_PRIME 2
#define MSP_MODEL_BETA 3
#define MSP_MODEL_DIRAC 4
#define MSP_MODEL_DTWF 5
#define MSP_MODEL_SWEEP 6
#define MSP_MODEL_WF_PED 7
#define MSP_MODEL_SMC_K 8
#define MSP_MODEL_BETA 3
#define MSP_MODEL_DIRAC 4
#define MSP_MODEL_DTWF 5
#define MSP_MODEL_SWEEP 6
#define MSP_MODEL_WF_PED 7
#define MSP_MODEL_SMC_K 8

/* Exit codes from msp_run to distinguish different reasons for exiting
* before coalescence. */
#define MSP_EXIT_COALESCENCE 0
#define MSP_EXIT_MAX_EVENTS 1
#define MSP_EXIT_MAX_TIME 2
#define MSP_EXIT_COALESCENCE 0
#define MSP_EXIT_MAX_EVENTS 1
#define MSP_EXIT_MAX_TIME 2
#define MSP_EXIT_MODEL_COMPLETE 3

#define MSP_NODE_IS_RE_EVENT (1u << 17)
#define MSP_NODE_IS_CA_EVENT (1u << 18)
#define MSP_NODE_IS_MIG_EVENT (1u << 19)
#define MSP_NODE_IS_CEN_EVENT (1u << 20)
#define MSP_NODE_IS_GC_EVENT (1u << 21)
#define MSP_NODE_IS_RE_EVENT (1u << 17)
#define MSP_NODE_IS_CA_EVENT (1u << 18)
#define MSP_NODE_IS_MIG_EVENT (1u << 19)
#define MSP_NODE_IS_CEN_EVENT (1u << 20)
#define MSP_NODE_IS_GC_EVENT (1u << 21)
#define MSP_NODE_IS_PASS_THROUGH (1u << 22)

/* Flags for verify */
#define MSP_VERIFY_BREAKPOINTS (1 << 1)

/* Flags for mutgen */
#define MSP_KEEP_SITES (1 << 0)
#define MSP_KEEP_SITES (1 << 0)
#define MSP_DISCRETE_SITES (1 << 1)

/* Pedigree states */
#define MSP_PED_STATE_UNCLIMBED 0
#define MSP_PED_STATE_CLIMBING 1
#define MSP_PED_STATE_UNCLIMBED 0
#define MSP_PED_STATE_CLIMBING 1
#define MSP_PED_STATE_CLIMB_COMPLETE 2

typedef tsk_id_t population_id_t;
Expand Down Expand Up @@ -136,8 +136,8 @@ typedef struct hull_t_t {
avl_node_t right_avl_node;
} hull_t;

#define MSP_POP_STATE_INACTIVE 0
#define MSP_POP_STATE_ACTIVE 1
#define MSP_POP_STATE_INACTIVE 0
#define MSP_POP_STATE_ACTIVE 1
#define MSP_POP_STATE_PREVIOUSLY_ACTIVE 2

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/test_ancestry.c
Original file line number Diff line number Diff line change
Expand Up @@ -3394,7 +3394,7 @@ test_bottleneck_simulation(void)
tsk_table_collection_free(&tables);
}

#define SIMPLE_BOTTLENECK 0
#define SIMPLE_BOTTLENECK 0
#define INSTANTANEOUS_BOTTLENECK 1

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/testlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define MSP_TEST_EXACT_FLOAT_COMPARISONS
#endif

#define ALPHABET_BINARY 0
#define ALPHABET_BINARY 0
#define ALPHABET_NUCLEOTIDE 1

/* Global variables used for test in state in the test suite */
Expand Down
Loading