List Info

Thread: dotc and dotu in glas




dotc and dotu in glas
user name
2006-05-02 07:02:14
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



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
>>>glaslists.boost.org
>>>http
://lists.boost.org/mailman/listinfo.cgi/glas
>>>      
>>>
>>_______________________________________________
>>glas mailing list
>>glaslists.boost.org
>>http
://lists.boost.org/mailman/listinfo.cgi/glas
>>    
>>
>
>_______________________________________________
>glas mailing list
>glaslists.boost.org
>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.Meerbergenfft.be
http://www.fft.be
============================================



_______________________________________________
glas mailing list
glaslists.boost.org
http
://lists.boost.org/mailman/listinfo.cgi/glas
dotc and dotu in glas
user name
2006-05-02 07:46:39
Quoting Karl Meerbergen <Karl.Meerbergenfft.be>:

> 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
> >>>glaslists.boost.org
> >>>http
://lists.boost.org/mailman/listinfo.cgi/glas
> >>>
> >>>
> >>_______________________________________________
> >>glas mailing list
> >>glaslists.boost.org
> >>http
://lists.boost.org/mailman/listinfo.cgi/glas
> >>
> >>
> >
> >_______________________________________________
> >glas mailing list
> >glaslists.boost.org
> >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.Meerbergenfft.be
> http://www.fft.be
> ============================================
>
>
>
> _______________________________________________
> glas mailing list
> glaslists.boost.org
> http
://lists.boost.org/mailman/listinfo.cgi/glas
>
_______________________________________________
glas mailing list
glaslists.boost.org
http
://lists.boost.org/mailman/listinfo.cgi/glas
dotc and dotu in glas
user name
2006-05-09 21:39:56
I've just tested and added to the glas-core a dotu-function
function as 
well as a conj-function. These can also be combined to
perform a dotc 
(using the expression 'dotu(conj(v),w)').

The dotu(v,w) expression and the dotu(conj(v),w) expression
are 
supported by the glas backend, the blas backend (dispatched
to dotu and 
dotc and to dot for the non-complex types) and the VSIPL++
backend 
(dispatched to vsip::dot and vsip::cvjdot)

This functionality can be used to support an LA toolbox that
would 
implement syntax in line with the discussion on this
subject.

toon

Sanz, Christophe wrote:
> Quoting Karl Meerbergen <Karl.Meerbergenfft.be>:
> 
>> 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
>>>>> glaslists.boost.org
>>>>> http
://lists.boost.org/mailman/listinfo.cgi/glas
>>>>>
>>>>>
>>>>
_______________________________________________
>>>> glas mailing list
>>>> glaslists.boost.org
>>>> http
://lists.boost.org/mailman/listinfo.cgi/glas
>>>>
>>>>
>>> _______________________________________________
>>> glas mailing list
>>> glaslists.boost.org
>>> 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.Meerbergenfft.be
>> http://www.fft.be
>> ============================================
>>
>>
>>
>> _______________________________________________
>> glas mailing list
>> glaslists.boost.org
>> http
://lists.boost.org/mailman/listinfo.cgi/glas
>>
> _______________________________________________
> glas mailing list
> glaslists.boost.org
> http
://lists.boost.org/mailman/listinfo.cgi/glas
> 


-- 
Toon Knapen

------------------------------------------------
Check out our training program on acoustics
and register on-line at http://www.fft.be/?id=35
_______________________________________________
glas mailing list
glaslists.boost.org
http
://lists.boost.org/mailman/listinfo.cgi/glas
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )