Hey Karl,

So today I went back to ViennaCL. I tried to move the equivalence
column&trans <=> row&notrans upwards in the dispatching mechanism but it
turns out to be impossible, because matrix<T,row_major> is not (and should
not be) convertible to matrix<T, column_major>, rendering the underlying
signature inappropriate...
I am very skeptical so as to how to handle this problem. I am thinking
about changing the internal signature to something more "low-level",

void gemm(bool /*is_A_trans*/, bool /*is_B_trans*/

        ,const vcl_size_t /*M*/, const vcl_size_t /*N*/, const
vcl_size_t /*K*/, const T /*alpha*/

        ,viennacl::backend::mem_handle  const & /*A*/ , const
vcl_size_t /*A_internal_size1*/, const vcl_size_t /*A_internal_size2*/

        ,const vcl_size_t /*A_start1*/, const vcl_size_t /*A_start2*/,
const vcl_size_t /*A_inc1*/, const vcl_size_t /*A_inc2*/

        ,viennacl::backend::mem_handle  const & /*B*/, const
vcl_size_t /*B_internal_size1*/, const vcl_size_t /*B_internal_size2*/

        ,const vcl_size_t /*B_start1*/, const vcl_size_t /*B_start2*/,
const vcl_size_t /*B_inc1*/, const vcl_size_t /*B_inc2*/

        ,const T /*beta*/, viennacl::backend::mem_handle & /*C*/,
const vcl_size_t /*C_internal_size1*/, const vcl_size_t
/*C_internal_size2*/

        ,const vcl_size_t /*C_start1*/, const vcl_size_t /*C_start2*/,
const vcl_size_t /*C_inc1*/, const vcl_size_t /*C_inc2*/);


Where all the layouts would be assumed to be column-major, like in the
standard-blas interface.
While this solution is acceptable to me, I fear that it will introduce a
lack of harmony considering that some other functions will stay otherwise
like

template <typename NumericT, typename F,

                typename ScalarType1>

void am(matrix_base<NumericT, F> & mat1,

              matrix_base<NumericT, F> const & mat2, ScalarType1 const
& alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool
flip_sign_alpha)


The only reasonable solution I see is to clearly separate in the code the
functions which could be linked with BLAS (and give them a lower level
signature), from the other ones. For example, putting them in two separate
files... is there any problem with doing this?

Best regards,
Philippe
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to