File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ use vortex_fastlanes::RLEArray;
2121
2222#[ allow( clippy:: cognitive_complexity) ]
2323pub fn cuda_rle_decompress ( rle : & RLEArray , ctx : Arc < CudaContext > ) -> VortexResult < ArrayRef > {
24+ assert_eq ! ( rle. offset( ) , 0 ) ;
25+ assert_eq ! (
26+ rle. values_idx_offsets( )
27+ . scalar_at( 0 )
28+ . as_primitive( )
29+ . as_:: <u64 >( )
30+ . vortex_expect( "non null offset" ) ,
31+ 0u64
32+ ) ;
33+
2434 match_each_native_ptype ! ( rle. values( ) . dtype( ) . as_ptype( ) , |V | {
2535 match_each_unsigned_integer_ptype!( rle. values_idx_offsets( ) . dtype( ) . as_ptype( ) , |O | {
2636 // RLE indices are always u16 (or u8 if downcasted).
6070 Indices : UnsignedPType + DeviceRepr ,
6171 Offsets : UnsignedPType + DeviceRepr ,
6272{
63- assert_eq ! ( indices. len( ) % 1024 , 0 ) ;
64-
6573 let kernel_func = cuda_rle_kernel :: < Indices , Values , Offsets > ( ctx. clone ( ) ) ?;
6674 let num_chunks =
6775 u32:: try_from ( indices. len ( ) . div_ceil ( 1024 ) ) . vortex_expect ( "num chunks overflow" ) ;
You can’t perform that action at this time.
0 commit comments