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 @@ -1135,6 +1135,8 @@ namespace xt
11351135        std::size_t  simd_size = inner_loop_size / simd_type::size;
11361136        std::size_t  simd_rest = inner_loop_size % simd_type::size;
11371137
1138+         bool  e1_is_contiguous = E1 ::contiguous_layout || e1 .is_contiguous ();
1139+ 
11381140        auto  fct_stepper = e2 .stepper_begin (e1 .shape ());
11391141        auto  res_stepper = e1 .stepper_begin (e1 .shape ());
11401142
@@ -1185,7 +1187,7 @@ namespace xt
11851187                fct_stepper.to_begin ();
11861188
11871189                //  need to step E1 as well if not contigous assign (e.g. view)
1188-                 if  (!E1 ::contiguous_layout)
1190+                 if  (!E1 ::contiguous_layout && !e1_is_contiguous )
11891191                {
11901192                    res_stepper.to_begin ();
11911193                    for  (std::size_t  i = 0 ; i < idx.size (); ++i)
@@ -1260,7 +1262,7 @@ namespace xt
12601262                        fct_stepper.to_begin ();
12611263
12621264                        //  need to step E1 as well if not contigous assign (e.g. view)
1263-                         if  (!E1 ::contiguous_layout)
1265+                         if  (!E1 ::contiguous_layout && !e1_is_contiguous )
12641266                        {
12651267                            res_stepper.to_begin ();
12661268                            for  (std::size_t  i = 0 ; i < idx.size (); ++i)
@@ -1305,7 +1307,7 @@ namespace xt
13051307                fct_stepper.to_begin ();
13061308
13071309                //  need to step E1 as well if not contigous assign (e.g. view)
1308-                 if  (!E1 ::contiguous_layout)
1310+                 if  (!E1 ::contiguous_layout && !e1_is_contiguous )
13091311                {
13101312                    res_stepper.to_begin ();
13111313                    for  (std::size_t  i = 0 ; i < idx.size (); ++i)
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments