Boost logo

Glas :

Re: [glas] dotc and dotu in glas

From: Sanz, Christophe (Christophe.Sanz_at_[hidden])
Date: 2006-05-02 03:46:39


Quoting Karl Meerbergen <Karl.Meerbergen_at_[hidden]>:

> As far as I understand, Toon was talking about core syntax, not
> functionality:
> is there a problem with dot(conj(x),y) for the euclidean inner product?
>
> Karl
>

Possibly not but there seem to remain some ambiguity pertaining to the choice of
the proper specialisation of the dot function for collection of complex types.
The maths would suggest that it is dotc while (eg:) the MTL would suggest that
it is dotu. Possibly the latter option was just too straightforward to be
avoided in first place but retaining option 1 could be well worth a
confirmation. Was that Matthias meant?
>
>
> Matthias Troyer wrote:
>
> >I want to strongly support Andrew's statement. If one wants only one
> >dot product then the proper inner product for a complex Hilbert space
> >needs to be chosen.
> >
> >Matthias
> >
> >On May 1, 2006, at 10:59 AM, Andrew Lumsdaine wrote:
> >
> >
> >
> >>Both are needed.
> >>
> >>In the Iterative Template Library, both are required in order for the
> >>solvers to work properly with complex vectors.
> >>
> >>Mathematically, dotc() is a proper inner product for a complex Hilbert
> >>space, dotu() is not. If a single dot() function is going to be used
> >>for inner product, mathematically it must be equivalent to dotc().
> >>
> >>Use cases are very important when creating interfaces for a generic
> >>library. I would suggest taking a look at ITL and IETL to see how
> >>generic linear concepts at this level of abstraction are used.
> >>
> >>Toon Knapen wrote:
> >>
> >>
> >>>I was wondering if we need an equivalent for both the dotc and
> >>>dotu of
> >>>BLAS in glas? I suggest to only have _one_ dot function (which is
> >>>equivalent to the dot in blas for vectors of reals and which
> >>>corresponds
> >>>to dotu for vectors of complex values). To perform the equivalent of
> >>>dotc one could then write dot(conj(x),y). This is IMHO clearer and
> >>>the
> >>>expression-template mechanism will avoid that this compound
> >>>expression
> >>>will induce a performance penalty.
> >>>
> >>>I just added an equivalent to dotc but I plan to add the solution as
> >>>described above, benchmark both and than remove the dotc equivalent
> >>>afterwards (supposing the benchmark will not show any performance
> >>>differences of both approaches).
> >>>
> >>>toon
> >>>
> >>>
> >>>_______________________________________________
> >>>glas mailing list
> >>>glas_at_[hidden]
> >>>http://lists.boost.org/mailman/listinfo.cgi/glas
> >>>
> >>>
> >>_______________________________________________
> >>glas mailing list
> >>glas_at_[hidden]
> >>http://lists.boost.org/mailman/listinfo.cgi/glas
> >>
> >>
> >
> >_______________________________________________
> >glas mailing list
> >glas_at_[hidden]
> >http://lists.boost.org/mailman/listinfo.cgi/glas
> >
> >
> >
>
>
> --
> ==============================================
> Karl Meerbergen
>
> Free Field Technologies
>
> NEW ADDRESS FROM FEBRUARY 1st ONWARD:
>
> Axis Park Louvain-la-Neuve
> rue Emile Francqui, 1
> B-1435 Mont-Saint Guibert - BELGIUM
>
> Company Phone: +32 10 45 12 26
> Company Fax: +32 10 45 46 26
> Mobile Phone: +32 474 26 66 59
> Home Phone: +32 2 306 38 10
> mailto:Karl.Meerbergen_at_[hidden]
> http://www.fft.be
> ============================================
>
>
>
> _______________________________________________
> glas mailing list
> glas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/glas
>