Changed foreign import to match paper
add extra __syncthreads() to block tree reduction

this avoids a race condition when reading and writing partial results to shared memory