Replaced hardcoded sizes with get_sizes function
WIP: runtime error for partition, sort_by_key and stable_sort_by_key
MODIFY
test/test_adjacent_difference.cpp
test/test_adjacent_difference.cpp
@@ -254,7 +254,7 @@ void AdjacentDifferenceKernel(int const N, int* array)
TEST(AdjacentDifferenceTests, TestAdjacentDifferenceDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_binary_search.cpp
test/test_binary_search.cpp
@@ -486,7 +486,7 @@ void BinarySearchKernel(int const N, int* in_array, int*result_array, int search
TEST(BinarySearchTests, TestBinarySearchDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);
@@ -500,7 +500,7 @@ TEST(BinarySearchTests, TestBinarySearchDevice)
thrust::host_vector<int> h_result(size*2,-1);
thrust::device_vector<int> d_result(size*2,-1);
- for(int search_value = 0; search_value < size*2; search_value++)
+ for(int search_value = 0; search_value < (int)size*2; search_value++)
{
SCOPED_TRACE(testing::Message() << "searching for " <<search_value);

MODIFY
test/test_copy.cpp
test/test_copy.cpp
@@ -729,7 +729,7 @@ void CopyKernel(int const N, int* in_array, int *out_array)
TEST(CopyTests, TestCopyDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_fill.cpp
test/test_fill.cpp
@@ -554,7 +554,7 @@ TEST(FillTests, TestFillDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_partition.cpp
test/test_partition.cpp
@@ -1814,7 +1814,7 @@ TEST(PartitionTests,TestPartitionDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);
@@ -1865,7 +1865,7 @@ TEST(PartitionTests,TestPartitionCopyDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);
@@ -1924,7 +1924,7 @@ TEST(PartitionTests,TestStablePartitionDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_remove.cpp
test/test_remove.cpp
@@ -895,7 +895,7 @@ TEST(RemoveTests, TestRemoveDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_replace.cpp
test/test_replace.cpp
@@ -848,7 +848,7 @@ TEST(ReplaceTests, TestReplaceDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_scan.cpp
test/test_scan.cpp
@@ -705,7 +705,7 @@ void InclusiveScanKernel(int const N, int* in_array, int *out_array)
TEST(ScanTests, TestInclusiveScanDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);
@@ -751,7 +751,7 @@ void ExclusiveScanKernel(int const N, int* in_array, int *out_array)
TEST(ScanTests, TestExclusiveScanDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_sort.cpp
test/test_sort.cpp
@@ -453,7 +453,7 @@ TEST(SortTests, TestSortDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_sort_by_key.cpp
test/test_sort_by_key.cpp
@@ -273,7 +273,7 @@ TEST(SortByKeyTests, TestSortByKeyDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for (auto size: std::vector<size_t>{0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for (auto size: get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_stable_sort.cpp
test/test_stable_sort.cpp
@@ -206,7 +206,7 @@ TEST(StableSortTests, TestStableSortDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_stable_sort_by_key.cpp
test/test_stable_sort_by_key.cpp
@@ -198,7 +198,7 @@ TEST(StableSortByKeyTests, TestStableSortByKeyDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for (auto size: std::vector<size_t>{0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for (auto size: get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_uninitialized_copy.cpp
test/test_uninitialized_copy.cpp
@@ -298,7 +298,7 @@ void UninitializedCopyKernel(int const N, int* in_array, int *out_array)
TEST(UninitializedCopyTests, TestUninitializedCopyDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

MODIFY
test/test_uninitialized_fill.cpp
test/test_uninitialized_fill.cpp
@@ -330,7 +330,7 @@ TEST(UninitializedFillTests, TestUninitializedFillDevice)
{
SCOPED_TRACE(testing::Message() << "with device_id= " << test::set_device_from_ctest());
- for(auto size: {0, 1, 2, 4, 6, 12, 16, 24, 32, 64, 84, 128, 160, 256} )
+ for(auto size : get_sizes() )
{
SCOPED_TRACE(testing::Message() << "with size= " << size);

Replaced hardcoded sizes with get_sizes function
WIP: runtime error for partition, sort_by_key and stable_sort_by_key