@@ -100,7 +100,8 @@ struct dpctl_capi
100100 DPCTLSyclKernelRef (* SyclKernel_GetKernelRef_ )(PySyclKernelObject * );
101101 PySyclKernelObject * (* SyclKernel_Make_ )(DPCTLSyclKernelRef );
102102
103- DPCTLSyclKernelBundleRef (* SyclProgram_GetKernelBundleRef_ )(PySyclProgramObject * );
103+ DPCTLSyclKernelBundleRef (* SyclProgram_GetKernelBundleRef_ )(
104+ PySyclProgramObject * );
104105 PySyclProgramObject * (* SyclProgram_Make_ )(DPCTLSyclKernelBundleRef );
105106
106107 // tensor
@@ -551,8 +552,8 @@ template <> struct type_caster<sycl::kernel>
551552 return true;
552553 }
553554 else {
554- throw py ::type_error (
555- "Input is of unexpected type, expected dpctl.program.SyclKernel" );
555+ throw py ::type_error ("Input is of unexpected type, expected "
556+ " dpctl.program.SyclKernel" );
556557 }
557558 }
558559
@@ -567,22 +568,28 @@ template <> struct type_caster<sycl::kernel>
567568 DPCTL_TYPE_CASTER (sycl ::kernel , _ ("dpctl.program.SyclKernel" ));
568569};
569570
570- /* This type caster associates ``sycl::kernel_bundle<sycl::bundle_state::executable>`` C++ class with
571+ /* This type caster associates
572+ * ``sycl::kernel_bundle<sycl::bundle_state::executable>`` C++ class with
571573 * :class:`dpctl.program.SyclProgram` for the purposes of generation of
572574 * Python bindings by pybind11.
573575 */
574- template < > struct type_caster < sycl ::kernel_bundle < sycl ::bundle_state ::executable >>
576+ template < >
577+ struct type_caster < sycl ::kernel_bundle < sycl ::bundle_state ::executable >>
575578{
576579public :
577580 bool load (handle src , bool )
578581 {
579582 PyObject * source = src .ptr ();
580583 auto & api = ::dpctl ::detail ::dpctl_capi ::get ();
581584 if (api .PySyclProgram_Check_ (source )) {
582- DPCTLSyclKernelBundleRef KBRef = api .SyclProgram_GetKernelBundleRef_ (
583- reinterpret_cast < PySyclProgramObject * > (source ));
584- value = std ::make_unique < sycl ::kernel_bundle < sycl ::bundle_state ::executable >>(
585- * (reinterpret_cast < sycl ::kernel_bundle < sycl ::bundle_state ::executable > * > (KBRef )));
585+ DPCTLSyclKernelBundleRef KBRef =
586+ api .SyclProgram_GetKernelBundleRef_ (
587+ reinterpret_cast < PySyclProgramObject * > (source ));
588+ value = std ::make_unique <
589+ sycl ::kernel_bundle < sycl ::bundle_state ::executable >>(
590+ * (reinterpret_cast <
591+ sycl ::kernel_bundle < sycl ::bundle_state ::executable > * > (
592+ KBRef )));
586593 return true;
587594 }
588595 else {
@@ -591,15 +598,18 @@ template <> struct type_caster<sycl::kernel_bundle<sycl::bundle_state::executabl
591598 }
592599 }
593600
594- static handle cast (sycl ::kernel_bundle < sycl ::bundle_state ::executable > src , return_value_policy , handle )
601+ static handle cast (sycl ::kernel_bundle < sycl ::bundle_state ::executable > src ,
602+ return_value_policy ,
603+ handle )
595604 {
596605 auto & api = ::dpctl ::detail ::dpctl_capi ::get ();
597- auto tmp =
598- api . SyclProgram_Make_ ( reinterpret_cast < DPCTLSyclKernelBundleRef > (& src ));
606+ auto tmp = api . SyclProgram_Make_ (
607+ reinterpret_cast < DPCTLSyclKernelBundleRef > (& src ));
599608 return handle (reinterpret_cast < PyObject * > (tmp ));
600609 }
601610
602- DPCTL_TYPE_CASTER (sycl ::kernel_bundle < sycl ::bundle_state ::executable > , _ ("dpctl.program.SyclProgram" ));
611+ DPCTL_TYPE_CASTER (sycl ::kernel_bundle < sycl ::bundle_state ::executable > ,
612+ _ ("dpctl.program.SyclProgram" ));
603613};
604614} // namespace detail
605615} // namespace pybind11
0 commit comments