     
     
     
-//     // save value into shared memory  TODO: remove later!!!
-//     s_in[load_idx] = in_even;
-//     s_in[load_idx + 1] = in_odd;
-//     
-//     // TODO: is this needed?
-//     __threadfence_block();
+    // save value into shared memory  TODO: remove later!!!
+    s_in[load_idx] = in_even;
+    s_in[load_idx + 1] = in_odd;
+    
+    // TODO: is this needed?
+    __threadfence_block();
     
     // compute count of consecutive zeros before even value
     // TODO: reimplement after getting it all to work

    ((short2*)s_in)[load_idx].y = zeros_before_even & 0xF;
    ((short2*)s_in)[load_idx + 1].x = in_odd;
    ((short2*)s_in)[load_idx + 1].y = zeros_before_odd & 0xF;
    __threadfence_block();
    
    

//     }
//     assert(zeros_before_even == ref_zeros_before_even);
    
    // TODO: set to true if any nonzero value follows thread's even value
    bool ref_nonzero_follows = false;
    for(int i = load_idx + 1; i < 64; i++) {
        if(s_in[i]) {
            ref_nonzero_follows = true;
            break;
        }
    }
    
    // count of consecutive zeros before odd value (either one more than 
    // even if even is zero or none if even value itself is nonzero)
