Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Philippe Tillet
2013/10/17 Philippe Tillet > 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::ve

Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Philippe Tillet
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:

Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Karl Rupp
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 he

Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Philippe Tillet
Hi again, 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 i

Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Philippe Tillet
Hi 2013/10/16 Karl Rupp > Hi, > > > Rather than introducing yet another base class, what about allowing >> implicit vectors in vector_base<> by suitable constructor arguments? >> This will also keep compilation times under control :-) >> >> >> I'm a bit confused, this solution woul

Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Karl Rupp
Hi, > Rather than introducing yet another base class, what about allowing > implicit vectors in vector_base<> by suitable constructor arguments? > This will also keep compilation times under control :-) > > > I'm a bit confused, this solution would then allocate memory in the case > of

Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Philippe Tillet
Hi hi, 2013/10/16 Karl Rupp > Hi, > > > It seems like the behavior of scalar_vector, unit_vector etc has changed > > a bit since the appearance of the kernel generator. > > I am currently extending the API of the generator, with relational > > operators. I want to design a specific kernel whic

Re: [ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Karl Rupp
Hi, > It seems like the behavior of scalar_vector, unit_vector etc has changed > a bit since the appearance of the kernel generator. > I am currently extending the API of the generator, with relational > operators. I want to design a specific kernel which checks for X[i] < > 0.42, for all i. > Si

[ViennaCL-devel] Common base for implicit_vector_base<> and vector_base<>...makes sense?

2013-10-16 Thread Philippe Tillet
Hi, It seems like the behavior of scalar_vector, unit_vector etc has changed a bit since the appearance of the kernel generator. I am currently extending the API of the generator, with relational operators. I want to design a specific kernel which checks for X[i] < 0.42, for all i. Since operator<