On Monday, 6 July 2015 at 17:35:22 UTC, Vlad Levenfeld wrote:
On Sunday, 5 July 2015 at 00:07:59 UTC, Laeeth Isharc wrote:
Posted short write-up here. Please make it better...
http://wiki.dlang.org/Transforming_slice_of_structs_into_struct_of_slices
In John Colvin's solution, should
al
On Sunday, 5 July 2015 at 00:07:59 UTC, Laeeth Isharc wrote:
Posted short write-up here. Please make it better...
http://wiki.dlang.org/Transforming_slice_of_structs_into_struct_of_slices
In John Colvin's solution, should
alias TransformMembers(alias TypeTransform, alias
NameTransform,
Posted short write-up here. Please make it better...
http://wiki.dlang.org/Transforming_slice_of_structs_into_struct_of_slices
I can use FieldTypeTuple and FieldNameTuple, but I am a bit
lost as to how without static foreach to loop through these in
order to generate a mixin to declare the new type. I can turn
it into a string, but what is the better option?
The simplest solution is something like:
template SOA(S
On 07/03/15 12:52, Laeeth Isharc via Digitalmars-d-learn wrote:
> I have an array of structs eg
>
> struct PriceBar
> {
> DateTime date;
> double open;
> double high;
> double low;
> double close;
> }
>
> (which fields are present in this particular struct will depend on template
> arg
Not necessarily the best solution to the problem, but I just
wanted to show this because I think it's kinda cool:
https://gist.github.com/John-Colvin/103d3c064ad6cb4cf435#file-transformmembers-d
Very impressive - now I have to try to understand how it works...!
On Friday, 3 July 2015 at 10:52:03 UTC, Laeeth Isharc wrote:
I have an array of structs eg
struct PriceBar
{
DateTime date;
double open;
double high;
double low;
double close;
}
(which fields are present in this particular struct will depend
on template arguments).
what is the best
see https://github.com/economicmodeling/soa
Thanks v much for this.
Figured out in the meantime one solution here (probably quite
ugly):
https://gist.github.com/Laeeth/9174498f9b79dc90ac18
On Friday, 3 July 2015 at 10:52:03 UTC, Laeeth Isharc wrote:
I have an array of structs eg
struct PriceBar
{
DateTime date;
double open;
double high;
double low;
double close;
}
(which fields are present in this particular struct will depend
on template arguments).
what is the best
I have an array of structs eg
struct PriceBar
{
DateTime date;
double open;
double high;
double low;
double close;
}
(which fields are present in this particular struct will depend
on template arguments).
what is the best way to turn these at compile time into a struct
of arrays? e
10 matches
Mail list logo