1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- @target : mipsjun
- @profile: `[
- {
- "stackBaseAddress" : 5888,
- "initFunction": "multiplica(0)",
- "id": "core0"
- },
- {
- "stackBaseAddress" : 6016,
- "initFunction": "multiplica(5)",
- "id": "core1"
- },
- {
- "stackBaseAddress" : 6144,
- "initFunction": "multiplica(10)",
- "id": "core2"
- },
- {
- "stackBaseAddress" : 6272,
- "initFunction": "multiplica(15)",
- "id": "core3"
- }
- ]`
- package main;
- const (
- LIN = 20
- COL = 20
- NUM_LINHAS_MULT = 5
- )
- var (
- matrizA [LIN][COL]int // `block:A`
- matrizB [LIN][COL]int // `block:A`
- matrizR [LIN][COL]int // `block:A`
- )
- func multiplica(initial int) {
- aux := 0
- limit := initial + NUM_LINHAS_MULT
- for i := initial; i < limit; i++ {
- for j := 0; j < COL; j++ {
- for k := 0; k < LIN; k++ {
- aux = aux + (matrizA[i][k] * matrizB[k][j])
- }
- matrizR[i][j] = aux
- aux = 0
- }
- }
- //x()
- }
- /**
- func x() int {
- return 1
- }
- */
|