An question about compile-time parameters
Hey all,
So I was trying to make a Matrix struct:
When using these Matrices, its guaranteed that
rows*cols is a power of two.
I have another struct that uses a Matrix:
And I fill this state with a series of kronecker products of 2x2 Matrices T times, ensuring that the resulting output is definitely of shape [2**T, 1]. That looks like this:
Here there is an issue. I cannot put filled_matrix into self.state.
I figured this is because the compiler cannot figure out the shape of filled_matrix, even though it is guaranteed to be a Matrix[2**T, 1]. However, if I turn from compiler-time parameters to dynamic parameters, I am not sure how to create the ComplexSIMD as a struct property.
Is there a way to use ComplexSIMD while also achieving this behaviour? Or will I need to use UnsafePointer instead.0 Replies