2727
2828#include  < oneapi/mkl/rng/device.hpp> 
2929
30- 
3130namespace  dpnp ::backend::ext::rng::device::dispatch
3231{
3332namespace  mkl_rng_dev  =  oneapi::mkl::rng::device;
3433
3534template  <typename  funcPtrT,
36-           template  <typename  fnT, typename  E, typename  T, typename  M> typename  factory,
35+           template  <typename  fnT, typename  E, typename  T, typename  M>
36+           typename  factory,
3737          int  _no_of_engines,
3838          int  _no_of_types,
3939          int  _no_of_methods>
@@ -44,8 +44,10 @@ class Dispatch3DTableBuilder
4444    const  std::vector<funcPtrT> row_per_method () const 
4545    {
4646        std::vector<funcPtrT> per_method = {
47-             factory<funcPtrT, E, T, mkl_rng_dev::gaussian_method::by_default>{}.get (),
48-             factory<funcPtrT, E, T, mkl_rng_dev::gaussian_method::box_muller2>{}.get (),
47+             factory<funcPtrT, E, T, mkl_rng_dev::gaussian_method::by_default>{}
48+                 .get (),
49+             factory<funcPtrT, E, T, mkl_rng_dev::gaussian_method::box_muller2>{}
50+                 .get (),
4951        };
5052        assert (per_method.size () == _no_of_methods);
5153        return  per_method;
@@ -54,21 +56,21 @@ class Dispatch3DTableBuilder
5456    template  <typename  E>
5557    auto  table_per_type_and_method () const 
5658    {
57-         std::vector<std::vector<funcPtrT>>
58-                    table_by_type = { row_per_method<E, bool >(),
59-                                      row_per_method<E, int8_t >(),
60-                                      row_per_method<E, uint8_t >(),
61-                                      row_per_method<E, int16_t >(),
62-                                      row_per_method<E, uint16_t >(),
63-                                      row_per_method<E, int32_t >(),
64-                                      row_per_method<E, uint32_t >(),
65-                                      row_per_method<E, int64_t >(),
66-                                      row_per_method<E, uint64_t >(),
67-                                      row_per_method<E, sycl::half>(),
68-                                      row_per_method<E, float >(),
69-                                      row_per_method<E, double >(),
70-                                      row_per_method<E, std::complex <float >>(),
71-                                      row_per_method<E, std::complex <double >>()};
59+         std::vector<std::vector<funcPtrT>> table_by_type = { 
60+             row_per_method<E, bool >(),
61+             row_per_method<E, int8_t >(),
62+             row_per_method<E, uint8_t >(),
63+             row_per_method<E, int16_t >(),
64+             row_per_method<E, uint16_t >(),
65+             row_per_method<E, int32_t >(),
66+             row_per_method<E, uint32_t >(),
67+             row_per_method<E, int64_t >(),
68+             row_per_method<E, uint64_t >(),
69+             row_per_method<E, sycl::half>(),
70+             row_per_method<E, float >(),
71+             row_per_method<E, double >(),
72+             row_per_method<E, std::complex <float >>(),
73+             row_per_method<E, std::complex <double >>()};
7274        assert (table_by_type.size () == _no_of_types);
7375        return  table_by_type;
7476    }
@@ -78,12 +80,15 @@ class Dispatch3DTableBuilder
7880    ~Dispatch3DTableBuilder () = default ;
7981
8082    template  <std::uint8_t ... VecSizes>
81-     void  populate (funcPtrT table[][_no_of_types][_no_of_methods], std::integer_sequence<std::uint8_t , VecSizes...>) const 
83+     void  populate (funcPtrT table[][_no_of_types][_no_of_methods],
84+                   std::integer_sequence<std::uint8_t , VecSizes...>) const 
8285    {
83-         const  auto  map_by_engine = {table_per_type_and_method<mkl_rng_dev::mrg32k3a<VecSizes>>()...,
84-                                     table_per_type_and_method<mkl_rng_dev::philox4x32x10<VecSizes>>()...,
85-                                     table_per_type_and_method<mkl_rng_dev::mcg31m1<VecSizes>>()...,
86-                                     table_per_type_and_method<mkl_rng_dev::mcg59<VecSizes>>()...};
86+         const  auto  map_by_engine = {
87+             table_per_type_and_method<mkl_rng_dev::mrg32k3a<VecSizes>>()...,
88+             table_per_type_and_method<
89+                 mkl_rng_dev::philox4x32x10<VecSizes>>()...,
90+             table_per_type_and_method<mkl_rng_dev::mcg31m1<VecSizes>>()...,
91+             table_per_type_and_method<mkl_rng_dev::mcg59<VecSizes>>()...};
8792        assert (map_by_engine.size () == _no_of_engines);
8893
8994        std::uint16_t  engine_id = 0 ;
@@ -101,4 +106,4 @@ class Dispatch3DTableBuilder
101106        }
102107    }
103108};
104- } //  dpnp::backend::ext::rng::device::dispatch
109+ } //  namespace  dpnp::backend::ext::rng::device::dispatch
0 commit comments