• Joined on 2024-06-03
lyken pushed to ndstrides-1-model-lifetime at M-Labs/nac3 2024-08-28 11:48:21 +08:00
4e714cb53b redesign
lyken created branch ndstrides-1-model-lifetime in M-Labs/nac3 2024-08-28 11:48:20 +08:00
lyken created pull request M-Labs/nac3#511 2024-08-27 23:47:51 +08:00
standalone & artiq: remove class_names from resolver
lyken pushed to remove-classnames at M-Labs/nac3 2024-08-27 23:47:08 +08:00
c8dfdcfdea standalone & artiq: remove class_names from resolver
lyken created branch remove-classnames in M-Labs/nac3 2024-08-27 23:47:07 +08:00
lyken commented on pull request M-Labs/nac3#509 2024-08-27 23:06:13 +08:00
ndstrides: [1] Introduce models

If you are talking about something like begin_void and begin_with_return, sadly no.

It requires the return model M to somehow be propagated through the .arg().arg().arg() chain until,…

lyken commented on pull request M-Labs/nac3#509 2024-08-27 17:36:51 +08:00
ndstrides: [1] Introduce models

This is a traversal that calculates the correct GEP index of each struct field.

struct NDArrayFields<F: FieldTraversal> {
  data: F::Out<Ptr<Int<Byte>>>,
  itemsize: F::Out<Int<SizeT>>,
 
lyken commented on pull request M-Labs/nac3#509 2024-08-27 17:24:41 +08:00
ndstrides: [1] Introduce models

Passing Option<(&str, Option<M>)> to begin to define the return type may not be a good idea - If the function returns nothing, there is type for M and Rust complains.

lyken commented on pull request M-Labs/nac3#509 2024-08-27 17:22:02 +08:00
ndstrides: [1] Introduce models

Unrelated: Is there any way to improve the situation about the lifetime signature for CallFunction? or is this unavoidable.

lyken commented on pull request M-Labs/nac3#509 2024-08-27 17:08:46 +08:00
ndstrides: [1] Introduce models

I am not sure what should be changed for line 88-94.

You mean let zero = <something else?>

lyken commented on pull request M-Labs/nac3#509 2024-08-27 17:00:38 +08:00
ndstrides: [1] Introduce models

I am not sure if this is a good idea. I intuitively think it is less risky by keeping the generics as lax as possible even if it seems very appealing to constraint the struct, though I only first…

lyken commented on pull request M-Labs/nac3#509 2024-08-27 16:16:05 +08:00
ndstrides: [1] Introduce models

Are there Into implementations to convert Instance into BasicValue and Model into BasicType?

No, they could have been added but I just... didn't do that and kept using Instance::value for…

lyken commented on pull request M-Labs/nac3#509 2024-08-27 16:01:37 +08:00
ndstrides: [1] Introduce models

I was adding the ones I needed to implement ndarrays. I figured I should add these ops on demand.

lyken commented on pull request M-Labs/nac3#509 2024-08-27 16:00:06 +08:00
ndstrides: [1] Introduce models

Oh I forgot to add another interface for it.

lyken commented on pull request M-Labs/nac3#509 2024-08-27 15:59:19 +08:00
ndstrides: [1] Introduce models

Sure

lyken commented on pull request M-Labs/nac3#509 2024-08-27 15:58:58 +08:00
ndstrides: [1] Introduce models

No. An array alloc's length is never coupled with the pointer.

I was doing something like ArraySliceValue before, but the length value didn't have much use and often ends up being redundant.

lyken commented on pull request M-Labs/nac3#509 2024-08-27 15:56:32 +08:00
ndstrides: [1] Introduce models

Bounding say Item: Model<'ctx> requires Array itself to also have 'ctx, then a _PhantomData.

lyken deleted branch to-models from M-Labs/nac3 2024-08-27 12:42:42 +08:00
lyken created branch to-models-save in lyken/nac3 2024-08-27 12:41:10 +08:00
lyken pushed to to-models-save at lyken/nac3 2024-08-27 12:41:10 +08:00
c845924c20 allow ListObject to have TVar item_type
2941e8e865 fixup! fixup! core/ndstrides: implement np_array()
4e3e490b92 fixup! core/object: add ListObject and TupleObject
aad4fafcba fixup! core: refactor to use ListObject / List
9e005e9b07 core/model: fix Ptr::copy_from int types
Compare 10 commits »