|
Ublas : |
Subject: Re: [ublas] ATLAS binding: error when multiplying a complex matrix by a real matrix
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2012-09-29 02:56:02
As an additional note:
if your matrices are so big that you can't afford the copy of the whole
matrix, you can as well just copy only a few rows at a time(assuming the
left argument being complex) and do a blockwise multiplication, i.e. one
call to gemm for every block and re/im-part. Most implementations of
gemm do this step internally anyway, so a whole copy is likely only a
waste of memory.
On 2012-09-28 18:18, Michael Lehn wrote:
> Am 28.09.2012 um 18:05 schrieb Florent Teichteil:
>
>> Thank you very much for your response.
>>
>> Actually, ublas does support it, at least multiplication of complex
>> matrix by a real one (the other way gives a compilation error):
>
> Ok, but compared to using an optimized BLAS implementation will beat
> the generic implementation of ublas by far. For big matrices the
> performance gain by using ATLAS will most certainly compensate the
> extra copying (assuming you have enough memory and allocate the extra
> matrix only once). I think this is at least worth trying.
>
> Cheers,
>
> Michael
>
>
>>
>> ublas::axpy_prod(C, R, O) -> works
>> ublas::axpy_prod(R, C, O) -> does not work
>>
>> where C is complex, R is real, and O is complex
>>
>> Cheers
>> Florent
>>
>> Le 28/09/2012 17:42, Michael Lehn a écrit :
>>> Am 28.09.2012 um 17:22 schrieb Florent Teichteil:
>>>
>>>> Hi all,
>>>>
>>>> I am trying to multiply a complex matrix by a real one using gemm:
>>>>
>>>> atlas::gemm(m1, m2, r);
>>>>
>>>
>>> This operation is not supported by ATLAS (or any other standard
>>> BLAS implementation).
>>>
>>> cheers,
>>>
>>> Michael
>>>
>>> _______________________________________________
>>> ublas mailing list
>>> ublas_at_[hidden]
>>> http://lists.boost.org/mailman/listinfo.cgi/ublas
>>> Sent to: florent.teichteil_at_[hidden]
>>>
>> _______________________________________________
>> ublas mailing list
>> ublas_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/ublas
>> Sent to: michael.lehn_at_[hidden]
>>
>>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: Oswin.Krause_at_[hidden]