@@ -829,7 +829,7 @@ class usm_ndarray : public py::object
829
829
830
830
char * get_data () const
831
831
{
832
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
832
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
833
833
834
834
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
835
835
return api .UsmNDArray_GetData_ (raw_ar );
@@ -842,24 +842,24 @@ class usm_ndarray : public py::object
842
842
843
843
int get_ndim () const
844
844
{
845
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
845
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
846
846
847
847
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
848
848
return api .UsmNDArray_GetNDim_ (raw_ar );
849
849
}
850
850
851
851
const py ::ssize_t * get_shape_raw () const
852
852
{
853
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
853
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
854
854
855
855
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
856
856
return api .UsmNDArray_GetShape_ (raw_ar );
857
857
}
858
858
859
859
const std ::vector < py ::ssize_t > get_shape_vector () const
860
860
{
861
- auto raw_sh = this -> get_shape_raw ();
862
- auto nd = this -> get_ndim ();
861
+ auto raw_sh = get_shape_raw ();
862
+ auto nd = get_ndim ();
863
863
864
864
std ::vector < py ::ssize_t > shape_vector (raw_sh , raw_sh + nd );
865
865
return shape_vector ;
@@ -873,21 +873,21 @@ class usm_ndarray : public py::object
873
873
874
874
const py ::ssize_t * get_strides_raw () const
875
875
{
876
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
876
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
877
877
878
878
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
879
879
return api .UsmNDArray_GetStrides_ (raw_ar );
880
880
}
881
881
882
882
const std ::vector < py ::ssize_t > get_strides_vector () const
883
883
{
884
- auto raw_st = this -> get_strides_raw ();
885
- auto nd = this -> get_ndim ();
884
+ auto raw_st = get_strides_raw ();
885
+ auto nd = get_ndim ();
886
886
887
887
if (raw_st == nullptr) {
888
- auto is_c_contig = this -> is_c_contiguous ();
889
- auto is_f_contig = this -> is_f_contiguous ();
890
- auto raw_sh = this -> get_shape_raw ();
888
+ auto is_c_contig = is_c_contiguous ();
889
+ auto is_f_contig = is_f_contiguous ();
890
+ auto raw_sh = get_shape_raw ();
891
891
if (is_c_contig ) {
892
892
const auto & contig_strides = c_contiguous_strides (nd , raw_sh );
893
893
return contig_strides ;
@@ -909,7 +909,7 @@ class usm_ndarray : public py::object
909
909
910
910
py ::ssize_t get_size () const
911
911
{
912
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
912
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
913
913
914
914
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
915
915
int ndim = api .UsmNDArray_GetNDim_ (raw_ar );
@@ -926,7 +926,7 @@ class usm_ndarray : public py::object
926
926
927
927
std ::pair < py ::ssize_t , py ::ssize_t > get_minmax_offsets () const
928
928
{
929
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
929
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
930
930
931
931
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
932
932
int nd = api .UsmNDArray_GetNDim_ (raw_ar );
@@ -960,7 +960,7 @@ class usm_ndarray : public py::object
960
960
961
961
sycl ::queue get_queue () const
962
962
{
963
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
963
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
964
964
965
965
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
966
966
DPCTLSyclQueueRef QRef = api .UsmNDArray_GetQueueRef_ (raw_ar );
@@ -969,45 +969,45 @@ class usm_ndarray : public py::object
969
969
970
970
int get_typenum () const
971
971
{
972
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
972
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
973
973
974
974
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
975
975
return api .UsmNDArray_GetTypenum_ (raw_ar );
976
976
}
977
977
978
978
int get_flags () const
979
979
{
980
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
980
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
981
981
982
982
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
983
983
return api .UsmNDArray_GetFlags_ (raw_ar );
984
984
}
985
985
986
986
int get_elemsize () const
987
987
{
988
- PyUSMArrayObject * raw_ar = this -> usm_array_ptr ();
988
+ PyUSMArrayObject * raw_ar = usm_array_ptr ();
989
989
990
990
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
991
991
return api .UsmNDArray_GetElementSize_ (raw_ar );
992
992
}
993
993
994
994
bool is_c_contiguous () const
995
995
{
996
- int flags = this -> get_flags ();
996
+ int flags = get_flags ();
997
997
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
998
998
return static_cast < bool > (flags & api .USM_ARRAY_C_CONTIGUOUS_ );
999
999
}
1000
1000
1001
1001
bool is_f_contiguous () const
1002
1002
{
1003
- int flags = this -> get_flags ();
1003
+ int flags = get_flags ();
1004
1004
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
1005
1005
return static_cast < bool > (flags & api .USM_ARRAY_F_CONTIGUOUS_ );
1006
1006
}
1007
1007
1008
1008
bool is_writable () const
1009
1009
{
1010
- int flags = this -> get_flags ();
1010
+ int flags = get_flags ();
1011
1011
auto const & api = ::dpctl ::detail ::dpctl_capi ::get ();
1012
1012
return static_cast < bool > (flags & api .USM_ARRAY_WRITABLE_ );
1013
1013
}
0 commit comments