I've been running into the same issue myself recently, thanks for all the 
exploration here of the different ways of attacking the problem.
In my case, I need the type of a vector to change, i.e. from UInt8, 
UInt16,... up to UInt64, depending on the data, so unlike your case, I 
can't use reshape.
This is an internal structure, so I'm not sure if it should be exposed in 
the type parameters, and for performance, I need the type (a form of Dict) 
to be concrete.
Do you think going very low-level and just defining it always as a 
Vector{UInt8}, and using a pointer (reinterpreted to the correct type) and 
unsafe_load() would
perform well and handle the problem?

On Tuesday, March 1, 2016 at 5:42:31 PM UTC+1, Kristoffer Carlsson wrote:
>
> Just an update. Having an extra "linear dependent" parameter turned out to 
> be a bit of a pain, for example when you want to make containers of the 
> type because if you don't parametrize on all parameters you no longer have 
> a concrete type. Just using a Vector and calling reshape when needed turned 
> out to be smoother.

Reply via email to