Skip to content

Commit

Permalink
pll_set_tip_clv now accepts a parameter indicating whether input arra…
Browse files Browse the repository at this point in the history
…y is padded
  • Loading branch information
xflouris committed May 12, 2017
1 parent 9ebcb41 commit dba4e07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,8 @@ PLL_EXPORT int pll_set_tip_states(pll_partition_t * partition,
//TODO: <DOC> We should account for padding before calling this function
PLL_EXPORT int pll_set_tip_clv(pll_partition_t * partition,
unsigned int tip_index,
const double * clv)
const double * clv,
int padding)
{
unsigned int i,j,k;

Expand All @@ -1009,7 +1010,7 @@ PLL_EXPORT int pll_set_tip_clv(pll_partition_t * partition,
memcpy(tipclv, clv, partition->states*sizeof(double));
tipclv += partition->states_padded;
}
clv += partition->states_padded;
clv += padding ? partition->states_padded : partition->states;
}

/* if asc_bias is set, we initialize the additional positions */
Expand Down
6 changes: 5 additions & 1 deletion src/pll.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
#define PLL_FAILURE 0
#define PLL_SUCCESS 1

#define PLL_FALSE 0
#define PLL_TRUE 1

#define PLL_ALIGNMENT_CPU 8
#define PLL_ALIGNMENT_SSE 16
#define PLL_ALIGNMENT_AVX 32
Expand Down Expand Up @@ -505,7 +508,8 @@ PLL_EXPORT int pll_set_tip_states(pll_partition_t * partition,

PLL_EXPORT int pll_set_tip_clv(pll_partition_t * partition,
unsigned int tip_index,
const double * clv);
const double * clv,
int padding);

PLL_EXPORT void pll_set_pattern_weights(pll_partition_t * partition,
const unsigned int * pattern_weights);
Expand Down

0 comments on commit dba4e07

Please sign in to comment.