HSA-Libraries / Bolt

Bolt is a C++ template library optimized for GPUs. Bolt provides high-performance library implementations for common algorithms such as scan, reduce, transform, and sort.
Other
372 stars 65 forks source link

ConstantIteratorTest #226

Open jpola opened 9 years ago

jpola commented 9 years ago

The following code from ConstantIteratorTest should use bolt::cl::device_vector, but uses std::vector insted

TYPED_TEST_P( CountingIterator, DeviceTransformVector )

// initialize the data vector to be sequential numbers
std::vector< TypeParam > devVec( 3 );
bolt::cl::transform( devVec.begin( ), devVec.end( ), bolt::cl::make_counting_iterator( 42 ), devVec.begin( ),
bolt::cl::plus< TypeParam >( ) );
EXPECT_EQ( 42, devVec[ 0 ] );
EXPECT_EQ( 43, devVec[ 1 ] );
EXPECT_EQ( 44, devVec[ 2 ] );
}