![]() |
Blitz Support : |
From: Julian Cummings (cummings_at_[hidden])
Date: 2003-12-30 16:59:55
Hello Andrius,
I don't think interlaced arrays will help you here, since you want each
component stored separately in contiguous memory. If you really need
the components stored separately,
you should just create three separate objects of type
Array<std::complex<double>,2>, one for each component. You could then
interlace these arrays if there were some advantage to doing that, but I
would test the performance effects carefully. You cannot have an Array
of TinyVectors where the TinyVector components are not stored
contiguously. If you start with an Array of TinyVectors, you would have
to extract each component and assign it to a separate scalar Array to
get the component data copied into contiguous memory.
Regards, Julian C.
Andrius Kurtinaitis wrote:
> Hello,
> is it possible to create multicomponent interlaced arrays in blitz?
> My data point consists of three complex values. It would look like this:
> TinyVector<std::complex<double>, 3>
> The array would be then
> Array<TinyVector<std::complex<double>, 3>, 2>
> - I need two-dimensional arrays.
> But I would like to store the components separately by component, so
> that first I have complex data arrays of the first component, then the
> second and the third one. I need continuous component data for other
> algorithms, such as fft and spline interpolation.
> Any help will be highly appreciated.
>
> Andrius Kurtinaitis
>
> _______________________________________________
> Blitz-support mailing list
> Blitz-support_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
-- Dr. Julian C. Cummings E-mail: cummings_at_[hidden] California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125