parameters: (emitter, registers, left, right,
                                       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, left, right,
                                       aggregators, lhs, rhs, count):
    """Emit inner loop for N rows x M cols multiplication."""
    emitter.EmitComment('General NxM lanes loop.')
    emitter.EmitNumericalLabel(1)
    emitter.EmitNewline()
    emitter.EmitComment('Subtract counter.')
    emitter.EmitSubs(count, count, emitter.ImmediateConstant(8))
    emitter.EmitNewline()
  
    left_load = [registers.DoubleRegister() for unused_i in range(left)]
    right_load = [registers.DoubleRegister() for unused_i in range(right)]
  
    emitter.EmitVLoadA(1, 8, left_load, emitter.DereferenceIncrement(lhs, 64))
    emitter.EmitVLoadA(1, 8, right_load, emitter.DereferenceIncrement(rhs, 64))
  
    emitter.EmitPldOffset(lhs, emitter.ImmediateConstant(64))
    emitter.EmitPldOffset(rhs, emitter.ImmediateConstant(64))
  
    multiply_results = [registers.QuadRegister()
                        for unused_i in range(left * right)]
  
    for row in range(left):
      for col in range(right):
        index = row * right + col
        emitter.EmitVMull('u8', multiply_results[index], right_load[col],
                          left_load[row])
  
    for i in range(left * right):
      emitter.EmitVPadal('u16', aggregators[i], multiply_results[i])
  
    emitter.EmitNewline()
    emitter.EmitComment('Loop break.')
    emitter.EmitBneBack(1)
    emitter.EmitNewline()
  
    registers.FreeRegisters(left_load + right_load + multiply_results)
function_tokens: def GenerateNxMLoadMultiplyAggregate ( emitter , registers , left , right , aggregators , lhs , rhs , count ) : emitter . EmitComment ( 'General NxM lanes loop.' ) emitter . EmitNumericalLabel ( 1 ) emitter . EmitNewline ( ) emitter . EmitComment ( 'Subtract counter.' ) emitter . EmitSubs ( count , count , emitter . ImmediateConstant ( 8 ) ) emitter . EmitNewline ( ) left_load = [ registers . DoubleRegister ( ) for unused_i in range ( left ) ] right_load = [ registers . DoubleRegister ( ) for unused_i in range ( right ) ] emitter . EmitVLoadA ( 1 , 8 , left_load , emitter . DereferenceIncrement ( lhs , 64 ) ) emitter . EmitVLoadA ( 1 , 8 , right_load , emitter . DereferenceIncrement ( rhs , 64 ) ) emitter . EmitPldOffset ( lhs , emitter . ImmediateConstant ( 64 ) ) emitter . EmitPldOffset ( rhs , emitter . ImmediateConstant ( 64 ) ) multiply_results = [ registers . QuadRegister ( ) for unused_i in range ( left * right ) ] for row in range ( left ) : for col in range ( right ) : index = row * right + col emitter . EmitVMull ( 'u8' , multiply_results [ index ] , right_load [ col ] , left_load [ row ] ) for i in range ( left * right ) : emitter . EmitVPadal ( 'u16' , aggregators [ i ] , multiply_results [ i ] ) emitter . EmitNewline ( ) emitter . EmitComment ( 'Loop break.' ) emitter . EmitBneBack ( 1 ) emitter . EmitNewline ( ) registers . FreeRegisters ( left_load + right_load + multiply_results )