Compare commits

..

2 Commits

Author SHA1 Message Date
David Mak 0c0c2ebc8b [core] coregen/types: Implement StructFields for NDArray
Also rename some fields to better align with their naming in numpy.
2024-11-20 15:39:00 +08:00
David Mak 5576087164 [core] codegen/types: Implement NDArray in terms of i8*
Better aligns with the future implementation of ndstrides.
2024-11-20 15:35:57 +08:00
1 changed files with 2 additions and 8 deletions

View File

@ -326,10 +326,7 @@ impl<'ctx> ArrayLikeIndexer<'ctx> for NDArrayDataProxy<'ctx, '_> {
) )
.unwrap() .unwrap()
}; };
// TODO: Current implementation is transparent
// Current implementation is transparent - The returned pointer type is
// already cast into the expected type, allowing for immediately
// load/store.
ctx.builder ctx.builder
.build_pointer_cast( .build_pointer_cast(
ptr, ptr,
@ -360,10 +357,7 @@ impl<'ctx> ArrayLikeIndexer<'ctx> for NDArrayDataProxy<'ctx, '_> {
); );
let ptr = unsafe { self.ptr_offset_unchecked(ctx, generator, idx, name) }; let ptr = unsafe { self.ptr_offset_unchecked(ctx, generator, idx, name) };
// TODO: Current implementation is transparent
// Current implementation is transparent - The returned pointer type is
// already cast into the expected type, allowing for immediately
// load/store.
ctx.builder ctx.builder
.build_pointer_cast( .build_pointer_cast(
ptr, ptr,