From 47a1a9535d2f4d6d5cdc2da6f2622c6f54a9a822 Mon Sep 17 00:00:00 2001 From: Moritz Kneilmann Date: Tue, 13 Sep 2022 11:45:41 +0200 Subject: [PATCH] Add warning regarding different struct layouts on Apple M1 #210 --- ocl-core/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ocl-core/src/lib.rs b/ocl-core/src/lib.rs index 401e2579..39d71d12 100644 --- a/ocl-core/src/lib.rs +++ b/ocl-core/src/lib.rs @@ -236,6 +236,9 @@ mod traits { /// /// Can also be implemented for custom types as long as layout and /// alignment are conserved between Rust and OpenCL (repr "C"). + /// + /// On some platforms (repr "C") might not be enough. At least this appears + /// to be the case when using the Apple's M1 driver. pub unsafe trait OclPrm: Debug + Clone + Copy + Default + PartialEq + Send + Sync + 'static {} impl_unsafe!(OclPrm: u8, i8, u16, i16, u32, i32, u64, i64, usize, isize, f32, f64,