Skip to content

Commit b0e9ba1

Browse files
authored
style1AUG2021 (#806)
1 parent 70007a5 commit b0e9ba1

File tree

4 files changed

+93
-93
lines changed

4 files changed

+93
-93
lines changed

dpnp/dpnp_algo/dpnp_algo.pxd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ cdef extern from "dpnp_iface.hpp":
224224

225225

226226
# C function pointer to the C library template functions
227-
ctypedef void(*fptr_1out_t)(void *, size_t)
228-
ctypedef void(*fptr_1in_1out_t)(void * , void * , size_t)
229-
ctypedef void(*fptr_2in_1out_t)(void *, const void * , const size_t, const long * , const size_t,
230-
const void * , const size_t, const long * , const size_t, const long * )
231-
ctypedef void(*fptr_blas_gemm_2in_1out_t)(void * , void * , void * , size_t, size_t, size_t)
232-
ctypedef void(*dpnp_reduction_c_t)(void * , const void * , const size_t*, const size_t, const long*, const size_t, const void * , const long*)
227+
ctypedef void(*fptr_1out_t)(void * , size_t)
228+
ctypedef void(*fptr_1in_1out_t)(void *, void * , size_t)
229+
ctypedef void(*fptr_2in_1out_t)(void * , const void * , const size_t, const long * , const size_t,
230+
const void *, const size_t, const long * , const size_t, const long * )
231+
ctypedef void(*fptr_blas_gemm_2in_1out_t)(void *, void * , void * , size_t, size_t, size_t)
232+
ctypedef void(*dpnp_reduction_c_t)(void *, const void * , const size_t*, const size_t, const long*, const size_t, const void * , const long*)
233233

234234
cpdef dparray dpnp_astype(dparray array1, dtype_target)
235235
cpdef dparray dpnp_flatten(dparray array1)
@@ -282,7 +282,7 @@ Array creation routines
282282
cpdef dpnp_descriptor dpnp_arange(start, stop, step, dtype)
283283
cpdef dparray dpnp_array(object obj, object dtype=*)
284284
cpdef dparray dpnp_init_val(shape, dtype, value)
285-
cpdef dpnp_descriptor dpnp_full(result_shape, value_in, result_dtype) # same as dpnp_init_val
285+
cpdef dpnp_descriptor dpnp_full(result_shape, value_in, result_dtype) # same as dpnp_init_val
286286

287287
"""
288288
Mathematical functions

dpnp/dpnp_algo/dpnp_algo_arraycreation.pyx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ __all__ += [
5656
]
5757

5858

59-
ctypedef void(*custom_1in_1out_func_ptr_t)(void *, void * , const int , size_t * , size_t * , const size_t, const size_t)
60-
ctypedef void(*ftpr_custom_vander_1in_1out_t)(void * , void * , size_t, size_t, int)
61-
ctypedef void(*custom_indexing_1out_func_ptr_t)(void * , const size_t , const size_t , const int)
62-
ctypedef void(*fptr_dpnp_trace_t)(const void *, void * , const size_t * , const size_t)
59+
ctypedef void(*custom_1in_1out_func_ptr_t)(void * , void * , const int , size_t * , size_t * , const size_t, const size_t)
60+
ctypedef void(*ftpr_custom_vander_1in_1out_t)(void *, void * , size_t, size_t, int)
61+
ctypedef void(*custom_indexing_1out_func_ptr_t)(void *, const size_t , const size_t , const int)
62+
ctypedef void(*fptr_dpnp_trace_t)(const void * , void * , const size_t * , const size_t)
6363

6464

6565
cpdef utils.dpnp_descriptor dpnp_copy(utils.dpnp_descriptor x1, order, subok):
@@ -87,7 +87,7 @@ cpdef utils.dpnp_descriptor dpnp_diag(utils.dpnp_descriptor v, int k):
8787

8888
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_DIAG, param1_type, param1_type)
8989

90-
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
90+
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
9191

9292
cdef custom_1in_1out_func_ptr_t func = <custom_1in_1out_func_ptr_t > kernel_data.ptr
9393
cdef dparray_shape_type result_shape = result.shape
@@ -105,12 +105,12 @@ cpdef utils.dpnp_descriptor dpnp_full(result_shape, value_in, result_dtype):
105105
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_FULL, dtype_in, DPNP_FT_NONE)
106106

107107
# Create single-element input fill array with type given by FPTR data
108-
cdef dparray_shape_type shape_in = (1,)
108+
cdef dparray_shape_type shape_in = (1,)
109109
cdef utils.dpnp_descriptor array_fill = utils.create_output_descriptor(shape_in, kernel_data.return_type, None)
110110
array_fill.get_pyobj()[0] = value_in
111111

112112
# ceate result array with type given by FPTR data
113-
cdef dparray_shape_type result_shape_c = utils._object_to_tuple(result_shape)
113+
cdef dparray_shape_type result_shape_c = utils._object_to_tuple(result_shape)
114114
cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape_c, kernel_data.return_type, None)
115115

116116
cdef fptr_1in_1out_t func = <fptr_1in_1out_t > kernel_data.ptr
@@ -127,7 +127,7 @@ cpdef dparray dpnp_full_like(result_shape, value_in, result_dtype):
127127
# get the FPTR data structure
128128
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_FULL_LIKE, dtype_in, DPNP_FT_NONE)
129129

130-
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
130+
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
131131
# Create single-element input array with type given by FPTR data
132132
cdef dparray_shape_type shape_in = (1,)
133133
cdef dparray array_in = dparray(shape_in, dtype=result_type)
@@ -174,7 +174,7 @@ cpdef dparray dpnp_identity(n, result_dtype):
174174

175175
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_IDENTITY, dtype_in, DPNP_FT_NONE)
176176

177-
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
177+
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
178178

179179
cdef dparray result = dparray((n, n), dtype=result_type)
180180

@@ -284,7 +284,7 @@ cpdef dparray dpnp_trace(arr, offset=0, axis1=0, axis2=1, dtype=None, out=None):
284284

285285
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_TRACE, param1_type, param2_type)
286286

287-
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
287+
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
288288
cdef dparray result = dparray(diagonal_arr.shape[:-1], dtype=result_type)
289289

290290
cdef fptr_dpnp_trace_t func = <fptr_dpnp_trace_t > kernel_data.ptr
@@ -307,7 +307,7 @@ cpdef dparray dpnp_tri(N, M=None, k=0, dtype=numpy.float):
307307

308308
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_TRI, param1_type, param1_type)
309309

310-
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
310+
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
311311

312312
result = dparray(shape=(N, M), dtype=result_type)
313313

@@ -331,7 +331,7 @@ cpdef dparray dpnp_tril(dparray m, int k):
331331

332332
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_TRIL, param1_type, param1_type)
333333

334-
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
334+
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
335335

336336
cdef custom_1in_1out_func_ptr_t func = <custom_1in_1out_func_ptr_t > kernel_data.ptr
337337

@@ -364,7 +364,7 @@ cpdef dparray dpnp_vander(dparray x1, int N, int increasing):
364364

365365
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_VANDER, param1_type, DPNP_FT_NONE)
366366

367-
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
367+
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
368368
cdef dparray result = dparray((x1.size, N), dtype=result_type)
369369

370370
cdef ftpr_custom_vander_1in_1out_t func = <ftpr_custom_vander_1in_1out_t > kernel_data.ptr

dpnp/dpnp_iface_arraycreation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def full(shape, fill_value, dtype=None, order='C'):
655655
pass
656656
else:
657657
if dtype is None:
658-
dtype = numpy.array(fill_value).dtype.type #TODO simplify
658+
dtype = numpy.array(fill_value).dtype.type # TODO simplify
659659

660660
return dpnp_full(shape, fill_value, dtype).get_pyobj()
661661

0 commit comments

Comments
 (0)