Skip to content
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

CountingIterator with bolt::cl::copy #227

Open
jpola opened this issue Feb 9, 2015 · 0 comments
Open

CountingIterator with bolt::cl::copy #227

jpola opened this issue Feb 9, 2015 · 0 comments

Comments

@jpola
Copy link

jpola commented Feb 9, 2015

Hello,

I'm testing new functionality of Bolt 1.3 library on GPU.

I've followed example from follwong page: http://developer.amd.com/community/blog/2013/04/26/details-of-the-bolt-beta/

I found iterator functionality very attractive but the example from the mentioned webpage seems not to work correctly, at least under linux OS:

#include "bolt/cl/device_vector.h"
#include "bolt/cl/iterator/counting_iterator.h"
#include "bolt/cl/copy.h"

int main( int argc, char* argv[] )
{
    bolt::cl::device_vector< int > devV( 100 );
    bolt::cl::copy( bolt::cl::make_counting_iterator< int >( 10 ),
                    bolt::cl::make_counting_iterator< int >( 10 + devV.size( ) ),
                    devV.begin( ) );
}

The input vector is not changed at all. I've executed it using bolt::cl::transform instead of bolt::cl::copy and it is working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant