exploit cache locality
@@ -53,12 +53,12 @@ void pack_input_for_tiling(QUANTIZED_NOT_PACKED input[],
}
}
#pragma omp parallel for schedule(dynamic)
+ for (unsigned int row = 0; row < in_height; ++row) {
+ for (unsigned int col = 0; col < in_width; ++col) {
for (unsigned int in_ch_high = 0; in_ch_high < in_channels; in_ch_high += InTypeBitWidth) {
for (unsigned int in_ch_low = 0; in_ch_low < InTypeBitWidth; ++in_ch_low) {
unsigned int in_ch = in_ch_high + in_ch_low;
if (in_ch >= in_channels) break;
- for (unsigned int row = 0; row < in_height; ++row) {
- for (unsigned int col = 0; col < in_width; ++col) {
QUANTIZED_NOT_PACKED val = input[row * in_width * in_channels + col * in_channels + in_ch];
for (unsigned int in_bit_ch = 0; in_bit_ch < in_bitwidth; ++in_bit_ch) {
QUANTIZED_NOT_PACKED bit = (val >> in_bit_ch) & 1;
