@@ -397,7 +397,7 @@ int ConvolutionDepthWise_arm::forward(const Mat& bottom_blob, Mat& top_blob, con
397397 int h = bottom_blob.h ;
398398 int channels = bottom_blob.c ;
399399 size_t elemsize = bottom_blob.elemsize ;
400- int packing = bottom_blob.packing ;
400+ int elempack = bottom_blob.elempack ;
401401
402402 const int kernel_extent_w = dilation_w * (kernel_w - 1 ) + 1 ;
403403 const int kernel_extent_h = dilation_h * (kernel_h - 1 ) + 1 ;
@@ -455,8 +455,8 @@ int ConvolutionDepthWise_arm::forward(const Mat& bottom_blob, Mat& top_blob, con
455455
456456 int outw = (w - kernel_extent_w) / stride_w + 1 ;
457457 int outh = (h - kernel_extent_h) / stride_h + 1 ;
458- int out_packing = num_output % 4 == 0 ? 4 : 1 ;
459- size_t out_elemsize = elemsize / packing * out_packing ;
458+ int out_elempack = num_output % 4 == 0 ? 4 : 1 ;
459+ size_t out_elemsize = elemsize / elempack * out_elempack ;
460460
461461 if (opt.use_packing_layout )
462462 {
@@ -482,17 +482,17 @@ int ConvolutionDepthWise_arm::forward(const Mat& bottom_blob, Mat& top_blob, con
482482 }
483483 }
484484
485- top_blob.create (outw, outh, num_output / out_packing , out_elemsize, out_packing , opt.blob_allocator );
485+ top_blob.create (outw, outh, num_output / out_elempack , out_elemsize, out_elempack , opt.blob_allocator );
486486 if (top_blob.empty ())
487487 return -100 ;
488488
489489 // depth-wise
490- if (channels == group / packing && group / packing == num_output / packing )
490+ if (channels == group / elempack && group / elempack == num_output / elempack )
491491 {
492- if (packing == 4 )
492+ if (elempack == 4 )
493493 {
494494 #pragma omp parallel for num_threads(opt.num_threads)
495- for (int g=0 ; g<group / packing ; g++)
495+ for (int g=0 ; g<group / elempack ; g++)
496496 {
497497 float * outptr = top_blob.channel (g);
498498 const float * kptr = (const float *)weight_data_pack4 + maxk * g * 4 ;
@@ -561,20 +561,20 @@ int ConvolutionDepthWise_arm::forward(const Mat& bottom_blob, Mat& top_blob, con
561561 }
562562 }
563563
564- const int channels_g = channels * packing / group;
564+ const int channels_g = channels * elempack / group;
565565 const int num_output_g = num_output / group;
566566
567567 // unpacking
568568 Mat bottom_blob_bordered_unpacked = bottom_blob_bordered;
569- if (packing == 4 && channels_g % 4 != 0 )
569+ if (elempack == 4 && channels_g % 4 != 0 )
570570 {
571571 convert_packing (bottom_blob_bordered, bottom_blob_bordered_unpacked, 1 , opt.workspace_allocator , opt.num_threads );
572572 }
573573
574574 Mat top_blob_unpacked = top_blob;
575- if (num_output_g % 4 != 0 && out_packing == 4 )
575+ if (num_output_g % 4 != 0 && out_elempack == 4 )
576576 {
577- top_blob_unpacked.create (outw, outh, num_output, elemsize / packing , 1 , opt.workspace_allocator );
577+ top_blob_unpacked.create (outw, outh, num_output, elemsize / elempack , 1 , opt.workspace_allocator );
578578 if (top_blob_unpacked.empty ())
579579 return -100 ;
580580 }
@@ -843,7 +843,7 @@ int ConvolutionDepthWise_arm::forward(const Mat& bottom_blob, Mat& top_blob, con
843843 }
844844
845845 // packing
846- if (num_output_g % 4 != 0 && out_packing == 4 )
846+ if (num_output_g % 4 != 0 && out_elempack == 4 )
847847 {
848848 convert_packing (top_blob_unpacked, top_blob, 4 , opt.blob_allocator , opt.num_threads );
849849 }
0 commit comments