Skip to content

Commit d8e4d24

Browse files
committed
style
1 parent 52fca49 commit d8e4d24

File tree

7 files changed

+159
-88
lines changed

7 files changed

+159
-88
lines changed

dpnp/backend/custom_kernels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void custom_blas_dot_c(void* array1_in, void* array2_in, void* result1, size_t s
160160
};
161161

162162
auto kernel_func = [&](cl::sycl::handler& cgh) {
163-
cgh.parallel_for<class custom_blas_dot_c_kernel<_DataType> >(gws, kernel_parallel_for_func);
163+
cgh.parallel_for<class custom_blas_dot_c_kernel<_DataType>>(gws, kernel_parallel_for_func);
164164
};
165165

166166
event = DPNP_QUEUE.submit(kernel_func);

dpnp/backend/custom_kernels_elemwise.cpp

Lines changed: 81 additions & 80 deletions
Large diffs are not rendered by default.

dpnp/backend/custom_kernels_manipulation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void custom_elemwise_transpose_c(void* array1_in,
9292
};
9393

9494
auto kernel_func = [&](cl::sycl::handler& cgh) {
95-
cgh.parallel_for<class custom_elemwise_transpose_c_kernel<_DataType> >(gws, kernel_parallel_for_func);
95+
cgh.parallel_for<class custom_elemwise_transpose_c_kernel<_DataType>>(gws, kernel_parallel_for_func);
9696
};
9797

9898
event = DPNP_QUEUE.submit(kernel_func);

dpnp/backend/custom_kernels_mathematical.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void custom_elemwise_absolute_c(void* array1_in, const std::vector<long>& input_
6666
};
6767

6868
auto kernel_func = [&](cl::sycl::handler& cgh) {
69-
cgh.parallel_for<class custom_elemwise_absolute_c_kernel<_DataType> >(gws, kernel_parallel_for_func);
69+
cgh.parallel_for<class custom_elemwise_absolute_c_kernel<_DataType>>(gws, kernel_parallel_for_func);
7070
};
7171

7272
event = DPNP_QUEUE.submit(kernel_func);

dpnp/backend/custom_kernels_statistics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void custom_cov_c(void* array1_in, void* result1, size_t nrows, size_t ncols)
129129
};
130130

131131
auto kernel_func = [&](cl::sycl::handler& cgh) {
132-
cgh.parallel_for<class custom_cov_c_kernel<_DataType> >(gws, kernel_parallel_for_func);
132+
cgh.parallel_for<class custom_cov_c_kernel<_DataType>>(gws, kernel_parallel_for_func);
133133
};
134134

135135
event = DPNP_QUEUE.submit(kernel_func);
@@ -361,7 +361,7 @@ void custom_var_c(
361361
};
362362

363363
auto kernel_func = [&](cl::sycl::handler& cgh) {
364-
cgh.parallel_for<class custom_var_c_kernel<_DataType, _ResultType> >(gws, kernel_parallel_for_func);
364+
cgh.parallel_for<class custom_var_c_kernel<_DataType, _ResultType>>(gws, kernel_parallel_for_func);
365365
};
366366

367367
event = DPNP_QUEUE.submit(kernel_func);

examples/example3.cpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
//*****************************************************************************
2+
// Copyright (c) 2016-2020, Intel Corporation
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are met:
7+
// - Redistributions of source code must retain the above copyright notice,
8+
// this list of conditions and the following disclaimer.
9+
// - Redistributions in binary form must reproduce the above copyright notice,
10+
// this list of conditions and the following disclaimer in the documentation
11+
// and/or other materials provided with the distribution.
12+
//
13+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
17+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
// THE POSSIBILITY OF SUCH DAMAGE.
24+
//*****************************************************************************
25+
26+
/**
27+
* Example 3.
28+
*
29+
* This example shows simple usage of the DPNP C++ Backend library
30+
* to calculate cos of input vector elements
31+
*
32+
* Possible compile line:
33+
* clang++ -g -fPIC examples/example3.cpp -Idpnp -Idpnp/backend -Ldpnp -Wl,-rpath='$ORIGIN'/dpnp -ldpnp_backend_c -o example3
34+
*
35+
*/
36+
137
#include <iostream>
238

339
#include "backend_iface.hpp"

examples/example7.cpp

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
1-
// clang++ -g -fPIC examples/example7.cpp -Idpnp -Idpnp/backend -Ldpnp -Wl,-rpath='$ORIGIN'/dpnp -ldpnp_backend_c -o example7
2-
// ./example7
1+
//*****************************************************************************
2+
// Copyright (c) 2016-2020, Intel Corporation
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are met:
7+
// - Redistributions of source code must retain the above copyright notice,
8+
// this list of conditions and the following disclaimer.
9+
// - Redistributions in binary form must reproduce the above copyright notice,
10+
// this list of conditions and the following disclaimer in the documentation
11+
// and/or other materials provided with the distribution.
12+
//
13+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
17+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
// THE POSSIBILITY OF SUCH DAMAGE.
24+
//*****************************************************************************
25+
26+
/**
27+
* Example 7.
28+
*
29+
* This example shows simple usage of the DPNP C++ Backend library
30+
* to calculate eigenvalues and eigenvectors of a symmetric matrix
31+
*
32+
* Possible compile line:
33+
* clang++ -g -fPIC examples/example7.cpp -Idpnp -Idpnp/backend -Ldpnp -Wl,-rpath='$ORIGIN'/dpnp -ldpnp_backend_c -o example7
34+
*
35+
*/
36+
337
#include <iostream>
438

539
#include "backend_iface.hpp"
@@ -11,7 +45,7 @@ int main(int, char**)
1145

1246
dpnp_queue_initialize_c(QueueOptions::CPU_SELECTOR);
1347

14-
double* array = (double*)dpnp_memory_alloc_c(len * sizeof(double));
48+
int* array = (int*)dpnp_memory_alloc_c(len * sizeof(int));
1549
double* result = (double*)dpnp_memory_alloc_c(size * sizeof(double));
1650

1751
/* init input diagonal array like:

0 commit comments

Comments
 (0)