2013/10/17 Philippe Tillet <phil.til...@gmail.com>
> Hey hey,
>
> Well, the main problem I have with incorporating implicit_vector_base
> inside vector_base is that this sounds like replacing inheritance with
> switches on enum :P
> However, I think I have found a solution which will satisfy both of us:
>
> viennacl::vector_base<> already have this constructor:
> explicit vector_base(size_type vec_size, viennacl::context ctx =
> viennacl::context())
>
> Actually, what I want to do is to make implicit_vector_base<> inherit from
> vector_base<> and use this constructor. I don't really know why I thought
> about a common base, rather than this much better approach.
>
(Forgot to mention, it still requires an additional constructor parameter
to disable the handle creation, but that doesn't shock me)
> Sleepily,
> Philippe
>
>
> 2013/10/17 Karl Rupp <r...@iue.tuwien.ac.at>
>
>> Hey,
>>
>>
>> > After thinking more about it, I see a conceptual flaw in that approach,
>>
>>> since implicit_vector cannot be used as l-value, while vector_base<>
>>> can, it would lead to very misleading code, where implicit_vectors would
>>> have (empty, or throwing exceptions) operator overloads... The risk here
>>> is that vector_base<> would become a holdall.
>>>
>>
>> Well, you can disable operator= in all symbolic types directly, thus
>> preventing any lvalue problems :-)
>>
>>
>> > What is so bad about having a common overload which would hold the size
>> > and the opencl context, and then two separate sub-classes? Am I missing
>> > something?
>>
>> It is the combinatorial explosion for tests and such. Already now we have
>> to split up tests into one for each numeric type to keep the memory
>> consumption under control. When using {implicit_vector_base, vector_base}
>> \times { implicit_matrix_base, matrix_base }, compilation times for tests
>> will grow by another factor of four. This is a clear disadvantage for
>> having two separate base classes. On the other hand, I don't see a real
>> advantage. Maybe I miss something?
>>
>> Best regards,
>> Karli
>>
>>
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel