Skip to content

Commit

Permalink
Fix broken performance test build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhoberock committed Mar 10, 2011
1 parent d19e434 commit a82b6ed
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 26 deletions.
6 changes: 2 additions & 4 deletions performance/copy_if.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PREAMBLE = \
"""
#include <thrust/detail/device/cuda/copy_if.h>
#include <thrust/detail/backend/cuda/copy_if.h>
#include <thrust/copy.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
Expand All @@ -20,8 +20,6 @@ PREAMBLE = \
INITIALIZE = \
"""

//cudaSetDevice(1);

thrust::host_vector<int> h_input($InputSize); thrust::sequence(h_input.begin(), h_input.end());
thrust::host_vector<int> h_stencil = unittest::random_integers<bool>($InputSize);
thrust::host_vector<int> h_output($InputSize, -1);
Expand Down Expand Up @@ -52,7 +50,7 @@ FINALIZE = \
RECORD_BANDWIDTH((2*sizeof(int) + 2*sizeof(float)) * double($InputSize));
"""

Functions = ['thrust::copy_if','thrust::detail::device::cuda::copy_if']
Functions = ['thrust::copy_if','thrust::detail::backend::cuda::copy_if']
InputSizes = [2**N for N in range(20, 27)]

TestVariables = [('Function',Functions), ('InputSize', InputSizes)]
Expand Down
8 changes: 4 additions & 4 deletions performance/gather.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PREAMBLE = \

INITIALIZE = \
"""
thrust::host_vector<$InputType> h_input = thrusttest::random_integers<$InputType>($InputSize);
thrust::host_vector<$InputType> h_input = unittest::random_integers<$InputType>($InputSize);
thrust::host_vector<int> h_map(thrust::make_counting_iterator(0),
thrust::make_counting_iterator($InputSize));
std::random_shuffle(h_map.begin(), h_map.end());
Expand All @@ -17,15 +17,15 @@ INITIALIZE = \
thrust::device_vector<int> d_map = h_map;
thrust::device_vector<$InputType> d_result($InputSize);

thrust::gather(h_result.begin(), h_result.end(), h_map.begin(), h_input.begin());
thrust::gather(d_result.begin(), d_result.end(), d_map.begin(), d_input.begin());
thrust::gather(h_map.begin(), h_map.end(), h_input.begin(), h_result.begin());
thrust::gather(d_map.begin(), d_map.end(), d_input.begin(), d_result.begin());

ASSERT_EQUAL(h_result, d_result);
"""

TIME = \
"""
thrust::gather(d_result.begin(), d_result.end(), d_map.begin(), d_input.begin());
thrust::gather(d_map.begin(), d_map.end(), d_input.begin(), d_result.begin());
"""

FINALIZE = \
Expand Down
6 changes: 3 additions & 3 deletions performance/indirect_sort.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ PREAMBLE = \
__host__ __device__
bool operator()(IndexType a, IndexType b)
{
return comp(thrust::detail::device::dereference(first, a),
thrust::detail::device::dereference(first, b));
return comp(thrust::detail::backend::dereference(first, a),
thrust::detail::backend::dereference(first, b));
}
};

Expand All @@ -37,7 +37,7 @@ PREAMBLE = \

thrust::device_vector<T> temp(first, last);

thrust::gather(first, last, permutation.begin(), temp.begin());
thrust::gather(permutation.begin(), permutation.end(), temp.begin(), first);
}
"""

Expand Down
6 changes: 3 additions & 3 deletions performance/merge_sort.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PREAMBLE = \
"""
#include <thrust/sort.h>
#include <thrust/detail/device/cuda/detail/stable_merge_sort.h>
#include <thrust/detail/backend/cuda/detail/stable_merge_sort.h>
"""

INITIALIZE = \
Expand All @@ -12,15 +12,15 @@ INITIALIZE = \

// test sort
thrust::stable_sort(h_keys.begin(), h_keys.end());
thrust::detail::device::cuda::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());
thrust::detail::backend::cuda::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());

ASSERT_EQUAL(d_keys, h_keys);
"""

TIME = \
"""
thrust::copy(d_keys_copy.begin(), d_keys_copy.end(), d_keys.begin());
thrust::detail::device::cuda::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());
thrust::detail::backend::cuda::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());
"""

FINALIZE = \
Expand Down
4 changes: 2 additions & 2 deletions performance/merge_sort_by_key.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INITIALIZE = \

// test sort
thrust::stable_sort_by_key(h_keys.begin(), h_keys.end(), h_values.begin());
thrust::detail::device::cuda::detail::stable_merge_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin(), thrust::less<$KeyType>());
thrust::detail::backend::cuda::detail::stable_merge_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin(), thrust::less<$KeyType>());

ASSERT_EQUAL(d_keys, h_keys);
ASSERT_EQUAL(d_values, h_values);
Expand All @@ -27,7 +27,7 @@ INITIALIZE = \
TIME = \
"""
thrust::copy(d_keys_copy.begin(), d_keys_copy.end(), d_keys.begin());
thrust::detail::device::cuda::detail::stable_merge_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin(), thrust::less<$KeyType>());
thrust::detail::backend::cuda::detail::stable_merge_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin(), thrust::less<$KeyType>());
"""

FINALIZE = \
Expand Down
6 changes: 3 additions & 3 deletions performance/omp_merge_sort.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PREAMBLE = \
"""
#include <thrust/sort.h>
#include <thrust/detail/device/omp/detail/stable_merge_sort.h>
#include <thrust/detail/backend/omp/detail/stable_merge_sort.h>
"""

INITIALIZE = \
Expand All @@ -12,15 +12,15 @@ INITIALIZE = \

// test sort
thrust::stable_sort(h_keys.begin(), h_keys.end());
thrust::detail::device::omp::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());
thrust::detail::backend::omp::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());

ASSERT_EQUAL(d_keys, h_keys);
"""

TIME = \
"""
thrust::copy(d_keys_copy.begin(), d_keys_copy.end(), d_keys.begin());
thrust::detail::device::omp::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());
thrust::detail::backend::omp::detail::stable_merge_sort(d_keys.begin(), d_keys.end(), thrust::less<$KeyType>());
"""

FINALIZE = \
Expand Down
6 changes: 3 additions & 3 deletions performance/radix_sort.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PREAMBLE = \
"""
#include <thrust/sort.h>
#include <thrust/detail/device/cuda/detail/stable_radix_sort.h>
#include <thrust/detail/backend/cuda/detail/stable_radix_sort.h>
"""

INITIALIZE = \
Expand All @@ -12,15 +12,15 @@ INITIALIZE = \

// test sort
thrust::stable_sort(h_keys.begin(), h_keys.end());
thrust::detail::device::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());
thrust::detail::backend::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());

ASSERT_EQUAL(d_keys, h_keys);
"""

TIME = \
"""
thrust::copy(d_keys_copy.begin(), d_keys_copy.end(), d_keys.begin());
thrust::detail::device::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());
thrust::detail::backend::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());
"""

FINALIZE = \
Expand Down
4 changes: 2 additions & 2 deletions performance/radix_sort_bits.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ INITIALIZE = \

// test sort
thrust::stable_sort(h_keys.begin(), h_keys.end());
thrust::detail::device::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());
thrust::detail::backend::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());

ASSERT_EQUAL(d_keys, h_keys);
"""

TIME = \
"""
thrust::copy(d_keys_copy.begin(), d_keys_copy.end(), d_keys.begin());
thrust::detail::device::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());
thrust::detail::backend::cuda::detail::stable_radix_sort(d_keys.begin(), d_keys.end());
"""

FINALIZE = \
Expand Down
4 changes: 2 additions & 2 deletions performance/radix_sort_by_key.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INITIALIZE = \

// test sort
thrust::stable_sort_by_key(h_keys.begin(), h_keys.end(), h_values.begin());
thrust::detail::device::cuda::detail::stable_radix_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin());
thrust::detail::backend::cuda::detail::stable_radix_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin());

ASSERT_EQUAL(d_keys, h_keys);
ASSERT_EQUAL(d_values, h_values);
Expand All @@ -27,7 +27,7 @@ INITIALIZE = \
TIME = \
"""
thrust::copy(d_keys_copy.begin(), d_keys_copy.end(), d_keys.begin());
thrust::detail::device::cuda::detail::stable_radix_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin());
thrust::detail::backend::cuda::detail::stable_radix_sort_by_key(d_keys.begin(), d_keys.end(), d_values.begin());
"""

FINALIZE = \
Expand Down

0 comments on commit a82b6ed

Please sign in to comment.