File size: 2,143 Bytes
f25167e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
  "name": "reference_loop_037",
  "definition": "loop_037",
  "dataset": "simd-loop",
  "author": "reference",
  "spec": {
    "language": "cpp",
    "target_hardware": [
      "aarch64"
    ],
    "entry_point": "kernel.cpp::inner_loop_037",
    "dependencies": [],
    "isa_features": [],
    "compile_flags": [
      "-O2",
      "-std=c++14",
      "-fno-vectorize",
      "-fno-slp-vectorize"
    ],
    "link_flags": []
  },
  "sources": [
    {
      "path": "loop_037.h",
      "content": "// Auto-generated by scripts/gen_simd_loop_harness.py \u2014 do not hand-edit.\n#pragma once\n#include <stdint.h>\n\ntypedef struct { float re; float im; } cfloat32_t;\n\nstruct loop_037_data {\n    cfloat32_t *a0;\n    cfloat32_t *b0;\n    cfloat32_t *c0;\n    uint64_t size;\n};\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nint armbench_entry_loop_037(void *a0, void *b0, int64_t size, void *res_out);\n#ifdef __cplusplus\n}\n#endif\n"
    },
    {
      "path": "loop_037.cpp",
      "content": "// Auto-generated by scripts/gen_simd_loop_harness.py \u2014 do not hand-edit.\n#include \"loop_037.h\"\n#include <stdint.h>\n\nextern \"C\" void inner_loop_037(struct loop_037_data *data);\n\nextern \"C\" int armbench_entry_loop_037(void *a0, void *b0, int64_t size, void *res_out) {\n    struct loop_037_data _kd;\n    _kd.a0 = static_cast<cfloat32_t *>(a0);\n    _kd.b0 = static_cast<cfloat32_t *>(b0);\n    _kd.c0 = static_cast<cfloat32_t *>(res_out);\n    _kd.size = static_cast<uint64_t>(size);\n    inner_loop_037(&_kd);\n    return 0;\n}\n"
    },
    {
      "path": "kernel.cpp",
      "content": "#include \"loop_037.h\"\n#include <stdint.h>\n\nextern \"C\" void inner_loop_037(struct loop_037_data *data) {\n    cfloat32_t *a = data->a0; cfloat32_t *b = data->b0; cfloat32_t *c = data->c0;\n    uint64_t size = data->size;\n    for (uint64_t i = 0; i < size; i++) {\n        c[i].re = (a[i].re * b[i].re) - (a[i].im * b[i].im);\n        c[i].im = (a[i].re * b[i].im) + (a[i].im * b[i].re);\n    }\n}\n"
    }
  ],
  "description": "Scalar reference (auto-vectorization disabled) for loop_037. Baseline for speedup measurement."
}