-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symbolic_vector and symbolic_matrix ? #47
Comments
Hello Albert, There was an important change in the codebase and we are working towards
|
How exactly would that look like? You mean I just do
and via that preprocessor directive, it would automatically generate the kernel from this code? |
Albert, have a look at the following example on how we currently interface the kernel generator: |
Yes, the rationale for the refactoring explained above is to be able to generate an 'optimal' kernel for an operation such as
without requiring the user to write any 'extra' code. |
Ah, ok! So, it would be best to just write "normal" ViennaCL code at the moment and I can expect that from this code, ViennaCL is able to generate the appropriate kernel (once the refactoring is done). |
Yes, exactly ! 2013/11/20 Albert Zeyer notifications@github.com
|
Yes, the idea is that user code gets incrementally faster without being rewritten. :-)
In such case it is better to explicitly create a temporary object outside the loop, so that there is no unnecessary reallocation of memory buffers:
This, however, is an optimization detail which we will document in an optimization guide once the functionality is fully available. |
That's pretty cool. :) When can I expect this to be ready? |
Pfuh, now that's a really tough question now... Depends on the complexity of the operation and the degree of optimization you expect. For the element-wise operation you mentioned on SO you can already write 'standard' code right now without writing your own kernels, e.g.
Although this is not optimal in raw performance, it is likely that you have other, more expensive operations elsewhere, so you only want to avoid writing your own kernels. |
There is no way to avoid that temporary vector In Octave/Matlab, you can just do |
I should mention that, when everything is integrated, there will be no 2013/11/20 Albert Zeyer notifications@github.com
|
Albert: The current code base still requires the |
Closing this issue now because symbolic_vector and symbolic_matrix are no longer provided. |
In the doc, there is the following example:
However, I don't see those types anywhere defined in the code. So, is the doc outdated/wrong?
(A bit OT: I want to do something like this. I also asked on SO about it.)
The text was updated successfully, but these errors were encountered: