File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1141,6 +1141,8 @@ namespace xt
1141
1141
std::size_t simd_size = inner_loop_size / simd_type::size;
1142
1142
std::size_t simd_rest = inner_loop_size % simd_type::size;
1143
1143
1144
+ bool e1_is_contiguous = E1 ::contiguous_layout || e1 .is_contiguous ();
1145
+
1144
1146
auto fct_stepper = e2 .stepper_begin (e1 .shape ());
1145
1147
auto res_stepper = e1 .stepper_begin (e1 .shape ());
1146
1148
@@ -1191,7 +1193,7 @@ namespace xt
1191
1193
fct_stepper.to_begin ();
1192
1194
1193
1195
// 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 )
1195
1197
{
1196
1198
res_stepper.to_begin ();
1197
1199
for (std::size_t i = 0 ; i < idx.size (); ++i)
@@ -1266,7 +1268,7 @@ namespace xt
1266
1268
fct_stepper.to_begin ();
1267
1269
1268
1270
// 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 )
1270
1272
{
1271
1273
res_stepper.to_begin ();
1272
1274
for (std::size_t i = 0 ; i < idx.size (); ++i)
@@ -1311,7 +1313,7 @@ namespace xt
1311
1313
fct_stepper.to_begin ();
1312
1314
1313
1315
// 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 )
1315
1317
{
1316
1318
res_stepper.to_begin ();
1317
1319
for (std::size_t i = 0 ; i < idx.size (); ++i)
You can’t perform that action at this time.
0 commit comments