 
 #include "libhmsbeagle/GPU/GPUImplDefs.h"
 
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
 #define DETERMINE_INDICES() \
     int state = threadIdx.x; \
     int patIdx = threadIdx.y; \

        }
        __syncthreads();
    }
    
    if (tx == 0) {
        dSum1[blockIdx.x] = sum1[0];
        dSum2[blockIdx.x] = sum2[0];

        sum2[tx] = 0.0;
        sum3[tx] = 0.0;
    }

    __syncthreads();

    for (unsigned int s = SUM_SITES_BLOCK_SIZE / 2; s > 0; s >>= 1) {
        if (tx < s) {
            sum1[tx] += sum1[tx + s];
