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< is misleading, I am using the more verbose but clearer
approach :
element_less_than(X, scalar_vector<NumericType>(X.size(), 0.42)).
The verbosity is a problem, but a minor one, so I will ignore it for now (I
think end users can live with that :P).
Anyway, my problem is that the
VIENNACL_GENERATE_BINARY_ELEMENTOPERATION_OVERLOADS which generates
functions and function overloads for element_* does not handle
implicit_vector<>. For now, I can just add the proper overloads. But my
problem is actually that, right now, implicit_vector<>'s meaning has
diverged, with the use of the kernel generator.
scalar_vector<float> v(N,0);
x += v;
y = element_less_than(x,v);
makes perfect sense when using the OpenCL backend, but does not make sense
with the OPENMP and the CUDA backend.
How to handle this divergence? It does look extremely complicated to me.
Philippe
------------------------------------------------------------------------------
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