implemented segmented scan cuda