summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjon <jonrevold@gmail.com>2020-04-08 12:32:27 +0200
committerjon <jonrevold@gmail.com>2020-04-08 12:32:27 +0200
commiteaf9d0f1938a8812f49b9cf2ee90b9b6e9ef2732 (patch)
tree46063a21fd0dee01ce6c8722b9aff243087eba12
parent210211835da283462f8fab553dee47f40ee612d4 (diff)
downloadct_sequence-eaf9d0f1938a8812f49b9cf2ee90b9b6e9ef2732.tar.gz
vork
-rw-r--r--src/a3.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/a3.c b/src/a3.c
index ed76211..038bd6a 100644
--- a/src/a3.c
+++ b/src/a3.c
@@ -92,29 +92,6 @@ static void inner(uint32_t x){
}
static void inner_bias(uint32_t x){
- /*
- uint32_t r;
-
- //if(t >= CROSSOVER){
- if(t & CROSSOVER_MASK){
- uint8_t *p;
-
- r = 0;
- p = m_32ik+(t*M32_SIZE);
- memcpy(&r,p,M32_SIZE);
- memcpy(p,&x,M32_SIZE);
- t = r == 0 ? 0 : x-r;
- }else{
- uint8_t *p;
-
- r = 0;
- p = m+(t*M24_SIZE);
- memcpy(&r,p,M24_SIZE);
- memcpy(p,&x,M24_SIZE);
- t = (x-r) & 0x00FFFFFF;
- }
- */
-
uint32_t r;
uint32_t i;
uint8_t *p;
@@ -131,19 +108,12 @@ static void inner_bias(uint32_t x){
m_off = ~m_sel & m32_off;
m_off += m_size*t;
p = m+m_off;
- r = 0;
-
- //TODO: get rid of memcpy
- //memcpy(&r,p,m_size);
-
memcpy(&r,p,M32_SIZE);
i = r;
- i &= ~m_mask;
r &= m_mask;
+ i &= ~m_mask;
i |= x & m_mask;
memcpy(p,&i,M32_SIZE);
- //memcpy(p,&x,m_size);
-
rnzero = (-(int32_t)r)>>31; //FFFFetc.. if r != 0
rxdiff = x-r;
rxdiff &= m_mask;