File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1141,6 +1141,8 @@ namespace xt
11411141 std::size_t simd_size = inner_loop_size / simd_type::size;
11421142 std::size_t simd_rest = inner_loop_size % simd_type::size;
11431143
1144+ bool e1_is_contiguous = E1 ::contiguous_layout || e1 .is_contiguous ();
1145+
11441146 auto fct_stepper = e2 .stepper_begin (e1 .shape ());
11451147 auto res_stepper = e1 .stepper_begin (e1 .shape ());
11461148
@@ -1191,7 +1193,7 @@ namespace xt
11911193 fct_stepper.to_begin ();
11921194
11931195 // need to step E1 as well if not contigous assign (e.g. view)
1194- if (!E1 ::contiguous_layout)
1196+ if (!E1 ::contiguous_layout && !e1_is_contiguous )
11951197 {
11961198 res_stepper.to_begin ();
11971199 for (std::size_t i = 0 ; i < idx.size (); ++i)
@@ -1266,7 +1268,7 @@ namespace xt
12661268 fct_stepper.to_begin ();
12671269
12681270 // need to step E1 as well if not contigous assign (e.g. view)
1269- if (!E1 ::contiguous_layout)
1271+ if (!E1 ::contiguous_layout && !e1_is_contiguous )
12701272 {
12711273 res_stepper.to_begin ();
12721274 for (std::size_t i = 0 ; i < idx.size (); ++i)
@@ -1311,7 +1313,7 @@ namespace xt
13111313 fct_stepper.to_begin ();
13121314
13131315 // need to step E1 as well if not contigous assign (e.g. view)
1314- if (!E1 ::contiguous_layout)
1316+ if (!E1 ::contiguous_layout && !e1_is_contiguous )
13151317 {
13161318 res_stepper.to_begin ();
13171319 for (std::size_t i = 0 ; i < idx.size (); ++i)
You can’t perform that action at this time.
0 commit comments