List Info

Thread: dotc and dotu in glas




dotc and dotu in glas
user name
2006-05-01 17:32:55
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
dotc and dotu in glas
user name
2006-05-01 17:59:41
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
dotc and dotu in glas
user name
2006-05-01 19:25:50
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
[1-3]

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