parameters: (emitter, registers, kernel_m, kernel_n,
                                        aggregators, lhs, rhs, count)
docstring: Emit inner loop for N rows x M cols multiplication.
docstring_summary: Emit inner loop for N rows x M cols multiplication.
docstring_tokens: Emit inner loop for N rows x M cols multiplication .
function: def _GenerateNxMLoadMultiplyAggregate(emitter, registers, kernel_m, kernel_n,
                                        aggregators, lhs, rhs, count):
    """Emit inner loop for N rows x M cols multiplication."""
    emitter.EmitNewline()
    emitter.EmitComment('General NxM lanes loop.')
    emitter.EmitNumericalLabel(1)
    emitter.EmitNewline()
    emitter.EmitComment('Subtract counter.')
    emitter.EmitSubs(count, count, emitter.ImmediateConstant(8))
    emitter.EmitNewline()
  
    lhs_load = [registers.DoubleRegister() for unused_i in range(kernel_m)]
    rhs_load = [registers.DoubleRegister() for unused_i in range(kernel_n)]
  
    emitter.EmitVLoadAE(8 * kernel_m, 8, lhs_load, lhs, 64)
    emitter.EmitVLoadAE(8 * kernel_n, 8, rhs_load, rhs, 64)
  
    emitter.EmitPldOffset(lhs, emitter.ImmediateConstant(64))
    emitter.EmitPldOffset(rhs, emitter.ImmediateConstant(64))
  
    results = [
        registers.QuadRegister() for unused_i in range(kernel_m * kernel_n)
    ]
  
    for row in range(kernel_m):
      for col in range(kernel_n):
        index = row * kernel_n + col
        emitter.EmitVMull('u8', results[index], rhs_load[col], lhs_load[row])
  
    for i in range(kernel_m * kernel_n):
      emitter.EmitVPadal('u16', aggregators[i], results[i])
  
    emitter.EmitNewline()
    emitter.EmitComment('Loop break.')
    emitter.EmitBgtBack(1)
  
    registers.FreeRegisters(lhs_load + rhs_load + results)
function_tokens: def _GenerateNxMLoadMultiplyAggregate ( emitter , registers , kernel_m , kernel_n , aggregators , lhs , rhs , count ) : emitter . EmitNewline ( ) emitter . EmitComment ( 'General NxM lanes loop.' ) emitter . EmitNumericalLabel ( 1 ) emitter . EmitNewline ( ) emitter . EmitComment ( 'Subtract counter.' ) emitter . EmitSubs ( count , count , emitter . ImmediateConstant ( 8 ) ) emitter . EmitNewline ( ) lhs_load = [ registers . DoubleRegister ( ) for unused_i in range ( kernel_m ) ] rhs_load = [ registers . DoubleRegister ( ) for unused_i in range ( kernel_n ) ] emitter . EmitVLoadAE ( 8 * kernel_m , 8 , lhs_load , lhs , 64 ) emitter . EmitVLoadAE ( 8 * kernel_n , 8 , rhs_load , rhs , 64 ) emitter . EmitPldOffset ( lhs , emitter . ImmediateConstant ( 64 ) ) emitter . EmitPldOffset ( rhs , emitter . ImmediateConstant ( 64 ) ) results = [ registers . QuadRegister ( ) for unused_i in range ( kernel_m * kernel_n ) ] for row in range ( kernel_m ) : for col in range ( kernel_n ) : index = row * kernel_n + col emitter . EmitVMull ( 'u8' , results [ index ] , rhs_load [ col ] , lhs_load [ row ] ) for i in range ( kernel_m * kernel_n ) : emitter . EmitVPadal ( 'u16' , aggregators [ i ] , results [ i ] ) emitter . EmitNewline ( ) emitter . EmitComment ( 'Loop break.' ) emitter . EmitBgtBack ( 1 ) registers . FreeRegisters ( lhs_load + rhs_load + results )