check thrust::exclusive_scan call, it generate segment fault