@@ -65,6 +65,14 @@ cdef class _SyclPlatform:
6565 DPCTLCString_Delete(self ._version)
6666
6767
68+ cdef void _init_helper(_SyclPlatform platform, DPCTLSyclPlatformRef PRef):
69+ " Populate attributes of class from opaque reference PRef"
70+ platform._platform_ref = PRef
71+ platform._name = DPCTLPlatform_GetName(PRef)
72+ platform._version = DPCTLPlatform_GetVersion(PRef)
73+ platform._vendor = DPCTLPlatform_GetVendor(PRef)
74+
75+
6876cdef class SyclPlatform(_SyclPlatform):
6977 """ SyclPlatform(self, arg=None)
7078 Python class representing ``cl::sycl::platform`` class.
@@ -73,13 +81,6 @@ cdef class SyclPlatform(_SyclPlatform):
7381 SyclPlatform(filter_selector) - create platform selected by filter
7482 selector
7583 """
76- @staticmethod
77- cdef void _init_helper(_SyclPlatform platform, DPCTLSyclPlatformRef PRef):
78- platform._platform_ref = PRef
79- platform._name = DPCTLPlatform_GetName(PRef)
80- platform._version = DPCTLPlatform_GetVersion(PRef)
81- platform._vendor = DPCTLPlatform_GetVendor(PRef)
82-
8384 @staticmethod
8485 cdef SyclPlatform _create(DPCTLSyclPlatformRef pref):
8586 """
@@ -90,7 +91,7 @@ cdef class SyclPlatform(_SyclPlatform):
9091 """
9192 cdef _SyclPlatform p = _SyclPlatform.__new__ (_SyclPlatform)
9293 # Initialize the attributes of the SyclPlatform object
93- SyclPlatform. _init_helper(< _SyclPlatform> p, pref)
94+ _init_helper(< _SyclPlatform> p, pref)
9495 return SyclPlatform(p)
9596
9697 cdef int _init_from__SyclPlatform(self , _SyclPlatform other):
@@ -114,7 +115,7 @@ cdef class SyclPlatform(_SyclPlatform):
114115 if PRef is NULL :
115116 return - 1
116117 else :
117- SyclPlatform. _init_helper(self , PRef)
118+ _init_helper(self , PRef)
118119 return 0
119120
120121 cdef DPCTLSyclPlatformRef get_platform_ref(self ):
@@ -169,7 +170,7 @@ cdef class SyclPlatform(_SyclPlatform):
169170 " Could not create a SyclPlatform from default selector"
170171 )
171172 else :
172- SyclPlatform. _init_helper(self , PRef)
173+ _init_helper(self , PRef)
173174 else :
174175 raise ValueError (
175176 " Invalid argument. Argument should be a str object specifying "
0 commit comments