| 1 |
#ifndef HAVE_DEFINED_STRIDED_H |
| 2 |
#define HAVE_DEFINED_STRIDED_H |
| 3 |
|
| 4 |
#include <stdint-gcc.h> |
| 5 |
#include <stdbool.h> |
| 6 |
#include <stddef.h> |
| 7 |
|
| 8 |
#define DEF_STRIDED_LD_ST_FORM_1(T) \ |
| 9 |
void __attribute__((noinline)) \ |
| 10 |
vec_strided_load_store_##T##_form_1 (T *restrict out, T *restrict in, \ |
| 11 |
long stride, size_t size) \ |
| 12 |
{ \ |
| 13 |
for (size_t i = 0; i < size; i++) \ |
| 14 |
out[i * stride] = in[i * stride]; \ |
| 15 |
} |
| 16 |
#define DEF_STRIDED_LD_ST_FORM_1_WRAP(T) DEF_STRIDED_LD_ST_FORM_1(T) |
| 17 |
#define RUN_STRIDED_LD_ST_FORM_1(T, out, in, stride, size) \ |
| 18 |
vec_strided_load_store_##T##_form_1 (out, in, stride, size) |
| 19 |
#define RUN_STRIDED_LD_ST_FORM_1_WRAP(T, out, in, stride, size) \ |
| 20 |
RUN_STRIDED_LD_ST_FORM_1(T, out, in, stride, size) |
| 21 |
|
| 22 |
#endif |