File size: 812 Bytes
7502e01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
  "name": "loop_004",
  "op_type": "loop_004",
  "description": "Compute the integer dot product of two uint64 arrays",
  "tags": [
    "simd-loop"
  ],
  "axes": {
    "N": {
      "type": "var",
      "description": "Array length"
    }
  },
  "inputs": {
    "a": {
      "shape": [
        "N"
      ],
      "dtype": "int64"
    },
    "b": {
      "shape": [
        "N"
      ],
      "dtype": "int64"
    }
  },
  "outputs": {
    "res": {
      "shape": null,
      "dtype": "uint64",
      "description": "Scalar result"
    }
  },
  "reference": "import numpy as np\n\ndef run(a, b):\n    return np.uint64(\n        np.sum(a.astype(np.uint64) * b.astype(np.uint64),\n               dtype=np.uint64))\n",
  "simd_loop_meta": {
    "output_inplace": false,
    "array_pad": 0,
    "scratch": []
  }
}