Boost logo

Glas :

Re: [glas] mapping expressions to backend

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2006-01-18 07:17:12

Wolfgang Bangerth wrote:
>>The first option is that the user asks glas to automatically try to
>>dispatch all expressions to a specific backend. If the backend does not
>>provide a corresponding function, the expression will be evaluated by
>>the fallback (which is the glas implementation itself for instance).
>>For instance: If the user wishes to use BLAS as backend, writing
>>'y+=a*x' will automatically result in a call to axpy.
> I can't imagine why someone would want to use different backends in the same
> program. I would therefore proposed to take option 1. The way this is
> typically done is to give a switch at configure time:
> ./configure --with-backend=blas
> ./configure --with-backend=generic

It is not unthinkable that the generic/glas backend outperforms an
optimised BLAS library for instance on e.g. compile-time-fixed-size

So even though an operation is available in a BLAS library, the
developer might have some additional information which tells him that
the BLAS backend is not the fastest on evaluating a specific expression.