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