CuVector and helpers stuff