Skip to content

Commit 900b1be

Browse files
committed
Removed uses of this->method in usm_ndarray
1 parent df6114d commit 900b1be

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

dpctl/apis/include/dpctl4pybind11.hpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ class usm_ndarray : public py::object
829829

830830
char *get_data() const
831831
{
832-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
832+
PyUSMArrayObject *raw_ar = usm_array_ptr();
833833

834834
auto const &api = ::dpctl::detail::dpctl_capi::get();
835835
return api.UsmNDArray_GetData_(raw_ar);
@@ -842,24 +842,24 @@ class usm_ndarray : public py::object
842842

843843
int get_ndim() const
844844
{
845-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
845+
PyUSMArrayObject *raw_ar = usm_array_ptr();
846846

847847
auto const &api = ::dpctl::detail::dpctl_capi::get();
848848
return api.UsmNDArray_GetNDim_(raw_ar);
849849
}
850850

851851
const py::ssize_t *get_shape_raw() const
852852
{
853-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
853+
PyUSMArrayObject *raw_ar = usm_array_ptr();
854854

855855
auto const &api = ::dpctl::detail::dpctl_capi::get();
856856
return api.UsmNDArray_GetShape_(raw_ar);
857857
}
858858

859859
const std::vector<py::ssize_t> get_shape_vector() const
860860
{
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();
863863

864864
std::vector<py::ssize_t> shape_vector(raw_sh, raw_sh + nd);
865865
return shape_vector;
@@ -873,21 +873,21 @@ class usm_ndarray : public py::object
873873

874874
const py::ssize_t *get_strides_raw() const
875875
{
876-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
876+
PyUSMArrayObject *raw_ar = usm_array_ptr();
877877

878878
auto const &api = ::dpctl::detail::dpctl_capi::get();
879879
return api.UsmNDArray_GetStrides_(raw_ar);
880880
}
881881

882882
const std::vector<py::ssize_t> get_strides_vector() const
883883
{
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();
886886

887887
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();
891891
if (is_c_contig) {
892892
const auto &contig_strides = c_contiguous_strides(nd, raw_sh);
893893
return contig_strides;
@@ -909,7 +909,7 @@ class usm_ndarray : public py::object
909909

910910
py::ssize_t get_size() const
911911
{
912-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
912+
PyUSMArrayObject *raw_ar = usm_array_ptr();
913913

914914
auto const &api = ::dpctl::detail::dpctl_capi::get();
915915
int ndim = api.UsmNDArray_GetNDim_(raw_ar);
@@ -926,7 +926,7 @@ class usm_ndarray : public py::object
926926

927927
std::pair<py::ssize_t, py::ssize_t> get_minmax_offsets() const
928928
{
929-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
929+
PyUSMArrayObject *raw_ar = usm_array_ptr();
930930

931931
auto const &api = ::dpctl::detail::dpctl_capi::get();
932932
int nd = api.UsmNDArray_GetNDim_(raw_ar);
@@ -960,7 +960,7 @@ class usm_ndarray : public py::object
960960

961961
sycl::queue get_queue() const
962962
{
963-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
963+
PyUSMArrayObject *raw_ar = usm_array_ptr();
964964

965965
auto const &api = ::dpctl::detail::dpctl_capi::get();
966966
DPCTLSyclQueueRef QRef = api.UsmNDArray_GetQueueRef_(raw_ar);
@@ -969,45 +969,45 @@ class usm_ndarray : public py::object
969969

970970
int get_typenum() const
971971
{
972-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
972+
PyUSMArrayObject *raw_ar = usm_array_ptr();
973973

974974
auto const &api = ::dpctl::detail::dpctl_capi::get();
975975
return api.UsmNDArray_GetTypenum_(raw_ar);
976976
}
977977

978978
int get_flags() const
979979
{
980-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
980+
PyUSMArrayObject *raw_ar = usm_array_ptr();
981981

982982
auto const &api = ::dpctl::detail::dpctl_capi::get();
983983
return api.UsmNDArray_GetFlags_(raw_ar);
984984
}
985985

986986
int get_elemsize() const
987987
{
988-
PyUSMArrayObject *raw_ar = this->usm_array_ptr();
988+
PyUSMArrayObject *raw_ar = usm_array_ptr();
989989

990990
auto const &api = ::dpctl::detail::dpctl_capi::get();
991991
return api.UsmNDArray_GetElementSize_(raw_ar);
992992
}
993993

994994
bool is_c_contiguous() const
995995
{
996-
int flags = this->get_flags();
996+
int flags = get_flags();
997997
auto const &api = ::dpctl::detail::dpctl_capi::get();
998998
return static_cast<bool>(flags & api.USM_ARRAY_C_CONTIGUOUS_);
999999
}
10001000

10011001
bool is_f_contiguous() const
10021002
{
1003-
int flags = this->get_flags();
1003+
int flags = get_flags();
10041004
auto const &api = ::dpctl::detail::dpctl_capi::get();
10051005
return static_cast<bool>(flags & api.USM_ARRAY_F_CONTIGUOUS_);
10061006
}
10071007

10081008
bool is_writable() const
10091009
{
1010-
int flags = this->get_flags();
1010+
int flags = get_flags();
10111011
auto const &api = ::dpctl::detail::dpctl_capi::get();
10121012
return static_cast<bool>(flags & api.USM_ARRAY_WRITABLE_);
10131013
}

0 commit comments

Comments
 (0)