Hi KarlI will try out the method you suggested. I have a second question
regarding FFT. Is there any example in VCL to compute a 2D FFT? Can you share
some pointers to that?Also, when computing the FFT do we have to ensure that
the data is dyadic (or to be zero-padded to make it dyadic)? Thanks and Regards
Sumit
From: Karl Rupp <r...@iue.tuwien.ac.at>
To: Sumit Kumar <dost_4_e...@yahoo.com>; viennacl-devel
<viennacl-devel@lists.sourceforge.net>
Sent: Tuesday, March 1, 2016 7:24 PM
Subject: Re: [ViennaCL-devel] Examples of importing raw buffers
Hi Sumit,
sorry, I overlooked this email in my mailers threaded view.
> I have a question here:
> a.) Suppose I have three raw buffers (let us assume float); I would like
> to do something like this:
> v = (I- a) / (W-a+EPS), where I, W and a are the three buffers and EPS
> is a scalar to prevent a division by 0 operation.
>
> b.) I know I can wrap these buffers to Eigen matrices and then copy them
> to VCL using the API's. However, is there a way to do this step in a 1
> shot operation without acutally wrapping them to Eigen? Essentially,
> this is an element-wise subtraction and a division happening
> simultaneously, and both are embarrassingly parallel operations.
You can just use vector operations. something like
viennacl::vector<T> eps = viennacl::scalar_vector<T>(N, EPS);
v = viennacl::linalg::element_div(I - a, W - a + eps);
should do it.
> The second question I have is w.r.t OpenCL SDK selection:
> a.) Let us assume I have an Intel CPU with an AMD GPU. VCL supports
> OpenCL backends for both CPU and GPU and I have the liberty to choose
> any device and any backend.
> b.) If I were to have this combination, how would I go about building
> the code? Do I need to download SDK's for both combinations (so that I
> can distribute both binaries?). I had posed this question on the OpenCL
> users group in LinkedIn but got no response so thought of asking you
> instead.
The Intel OpenCL SDK will only support CPUs. The only way to get access
to the AMD GPU is to install the AMD GPU driver (formerly this was
bundled in the AMD APP SDK). You have to query the OpenCL platform
properties (e.g. vendor name) at runtime to select the correct platform.
In ViennaCL you can, for example, check the id() of the platform, which
is usually the same for a given vendor across different machines.
Best regards,
Karli
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel