File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 33
44//! This file is a simple C-compatible API that is called from the cudf-test-harness at CI time.
55
6- use std :: sync :: LazyLock ;
7-
6+ use arrow_schema :: DataType ;
7+ use arrow_schema :: ffi :: FFI_ArrowSchema ;
88use futures:: executor:: block_on;
9+ use std:: sync:: LazyLock ;
910use vortex:: array:: IntoArray ;
1011use vortex:: array:: arrays:: PrimitiveArray ;
1112use vortex:: array:: session:: ArraySession ;
12- use vortex:: error:: VortexResult ;
1313use vortex:: expr:: session:: ExprSession ;
1414use vortex:: io:: session:: RuntimeSession ;
1515use vortex:: layout:: session:: LayoutSession ;
@@ -31,11 +31,16 @@ static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
3131
3232/// External array
3333#[ unsafe( no_mangle) ]
34- pub extern "C" fn export_array ( array_ptr : & mut ArrowDeviceArray ) -> i32 {
34+ pub extern "C" fn export_array (
35+ schema_ptr : & mut FFI_ArrowSchema ,
36+ array_ptr : & mut ArrowDeviceArray ,
37+ ) -> i32 {
3538 let mut ctx = CudaSession :: create_execution_ctx ( & SESSION ) . unwrap ( ) ;
3639
3740 let primitive = PrimitiveArray :: from_iter ( 0u32 ..1024 ) ;
3841
42+ * schema_ptr = FFI_ArrowSchema :: try_from ( DataType :: UInt32 ) . unwrap ( ) ;
43+
3944 match block_on ( primitive. into_array ( ) . export_device_array ( & mut ctx) ) {
4045 Ok ( exported) => {
4146 * array_ptr = exported;
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ mod session;
1515mod stream;
1616mod stream_pool;
1717
18- pub ( crate ) use arrow:: CanonicalDeviceArrayExport ;
1918pub use arrow:: ExportDeviceArray ;
2019pub use canonical:: CanonicalCudaExt ;
2120pub use device_buffer:: CudaBufferExt ;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ use std::fmt::Debug;
55use std:: sync:: Arc ;
66
77use cudarc:: driver:: CudaContext ;
8- use vortex_array:: ArrayRef ;
98use vortex_array:: VortexSessionExecute ;
109use vortex_array:: vtable:: ArrayId ;
1110use vortex_error:: VortexResult ;
@@ -14,7 +13,6 @@ use vortex_session::SessionExt;
1413use vortex_utils:: aliases:: dash_map:: DashMap ;
1514
1615use crate :: ExportDeviceArray ;
17- use crate :: arrow:: ArrowDeviceArray ;
1816use crate :: arrow:: CanonicalDeviceArrayExport ;
1917use crate :: executor:: CudaExecute ;
2018pub use crate :: executor:: CudaExecutionCtx ;
You can’t perform that action at this time.
0 commit comments