Skip to content

Commit 4b4eba0

Browse files
authored
Replace dpstd usage with oneDPL names (oneapi-src#653)
* Add include of oneDPL numeric header to ensure std::transform_reduce and std::reduce are available. Signed-off-by: timmie.smith <[email protected]> * Include of oneDPL numeric header to make std::transform_reduce and std::reduce available. Signed-off-by: timmie.smith <[email protected]> * Replace usage of outdated dpstd with oneDPL name and namespace.
1 parent f7f66e9 commit 4b4eba0

File tree

12 files changed

+200
-200
lines changed

12 files changed

+200
-200
lines changed

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/binary_search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int main() {
5050

5151
//function object to be passed to sort function
5252

53-
//Calling the dpstd binary search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
53+
//Calling the oneDPL binary search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
5454
// Default comparator is the operator < used here.
5555
const auto i = oneapi::dpl::binary_search(policy,keys_begin,keys_end,vals_begin,vals_end,result_begin);
5656

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/lower_bound.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main() {
4444
// use policy for algorithms execution
4545
auto policy = make_device_policy(q);
4646

47-
//Calling the dpstd upper_bound algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
47+
//Calling the oneDPL upper_bound algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
4848
// Default comparator is the operator < used here.
4949

5050
oneapi::dpl::lower_bound(policy,keys_begin,keys_end,vals_begin,vals_end,result_begin);

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/maximum_function.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ int main() {
2424
buffer<int,1> buf(v.data(), range<1>(N));
2525
buffer<int,1> buf_res(result.data(), range<1>(N));
2626

27-
//dpstd buffer iterators for both the input and the result vectors
27+
//oneDPL buffer iterators for both the input and the result vectors
2828
auto start_v = oneapi::dpl::begin(buf);
2929
auto end_v = oneapi::dpl::end(buf);
3030
auto start_res = oneapi::dpl::begin(buf_res);
3131
auto end_res = oneapi::dpl::end(buf_res);
3232

3333
//use std::fill to initialize the result vector
3434
std::fill(oneapi::dpl::execution::dpcpp_default,start_res, end_res, 0);
35-
//usage of dpstd::maximum<> function call within the std::exclusive_scan function
35+
//usage of dpl::maximum<> function call within the std::exclusive_scan function
3636
std::exclusive_scan(oneapi::dpl::execution::dpcpp_default, start_v, end_v, start_res, int(0), oneapi::dpl::maximum<int>() );
3737
}
3838

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/minimum_function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int main() {
2424
buffer buf(v);
2525
buffer buf_res(result);
2626

27-
//dpstd buffer iterators for both the input and the result vectors
27+
//oneDPL buffer iterators for both the input and the result vectors
2828
auto start_v = oneapi::dpl::begin(buf);
2929
auto end_v = oneapi::dpl::end(buf);
3030
auto start_res = oneapi::dpl::begin(buf_res);

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/reduce_segment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ int main() {
4949
auto policy = make_device_policy(q);
5050
//auto pair_iters = make_pair <std::vector::iterator, std::vector::iterator>
5151

52-
//Calling the dpstd reduce by search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
52+
//Calling the oneDPL reduce by search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
5353
// Default comparator is the operator < used here.
54-
// dpstd::reduce_by_segment returns a pair of iterators to the result_key_begin and result_vals_begin respectively
54+
// dpl::reduce_by_segment returns a pair of iterators to the result_key_begin and result_vals_begin respectively
5555
int count_keys,count_vals = 0;
5656

5757
auto pair_iters = oneapi::dpl::reduce_by_segment(make_device_policy(q), keys_begin, keys_end, vals_begin, result_key_begin, result_vals_begin);

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/upper_bound.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int main() {
4646
// use policy for algorithms execution
4747
auto policy = make_device_policy(q);
4848

49-
//Calling the dpstd upper_bound algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
49+
//Calling the oneDPL upper_bound algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
5050
// Default comparator is the operator < used here.
5151

5252
oneapi::dpl::upper_bound(make_device_policy(q),keys_begin,keys_end,vals_begin,vals_end,result_begin);

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/src/binary_search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int main() {
5050

5151
//function object to be passed to sort function
5252

53-
//Calling the dpstd binary search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
53+
//Calling the oneDPL binary search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
5454
// Default comparator is the operator < used here.
5555
const auto i = oneapi::dpl::binary_search(policy,keys_begin,keys_end,vals_begin,vals_end,result_begin);
5656

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/src/maximum_function.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ int main() {
2222
buffer<int,1> buf(v.data(), range<1>(N));
2323
buffer<int,1> buf_res(result.data(), range<1>(N));
2424

25-
//dpstd buffer iterators for both the input and the result vectors
25+
//oneDPL buffer iterators for both the input and the result vectors
2626
auto start_v = oneapi::dpl::begin(buf);
2727
auto end_v = oneapi::dpl::end(buf);
2828
auto start_res = oneapi::dpl::begin(buf_res);
2929
auto end_res = oneapi::dpl::end(buf_res);
3030

3131
//use std::fill to initialize the result vector
3232
std::fill(oneapi::dpl::execution::dpcpp_default,start_res, end_res, 0);
33-
//usage of dpstd::maximum<> function call within the std::exclusive_scan function
33+
//usage of dpl::maximum<> function call within the std::exclusive_scan function
3434
std::exclusive_scan(oneapi::dpl::execution::dpcpp_default, start_v, end_v, start_res, int(0), oneapi::dpl::maximum<int>() );
3535
}
3636

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/src/minimum_function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int main() {
2222
buffer buf(v);
2323
buffer buf_res(result);
2424

25-
//dpstd buffer iterators for both the input and the result vectors
25+
//oneDPL buffer iterators for both the input and the result vectors
2626
auto start_v = oneapi::dpl::begin(buf);
2727
auto end_v = oneapi::dpl::end(buf);
2828
auto start_res = oneapi::dpl::begin(buf_res);

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/src/reduce_segment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ int main() {
5050
auto policy = make_device_policy(q);
5151
//auto pair_iters = make_pair <std::vector::iterator, std::vector::iterator>
5252

53-
//Calling the dpstd reduce by search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
53+
//Calling the oneDPL reduce by search algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
5454
// Default comparator is the operator < used here.
55-
// dpstd::reduce_by_segment returns a pair of iterators to the result_key_begin and result_vals_begin respectively
55+
// dpl::reduce_by_segment returns a pair of iterators to the result_key_begin and result_vals_begin respectively
5656
int count_keys,count_vals = 0;
5757

5858
auto pair_iters = oneapi::dpl::reduce_by_segment(make_device_policy(q), keys_begin, keys_end, vals_begin, result_key_begin, result_vals_begin);

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/src/upper_bound.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int main() {
4646
// use policy for algorithms execution
4747
auto policy = make_device_policy(q);
4848

49-
//Calling the dpstd upper_bound algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
49+
//Calling the oneDPL upper_bound algorithm. We pass in the policy, the buffer iterators for the input vectors and the output.
5050
// Default comparator is the operator < used here.
5151

5252
oneapi::dpl::upper_bound(make_device_policy(q),keys_begin,keys_end,vals_begin,vals_end,result_begin);

0 commit comments

Comments
 (0)