File: orcarray.h

package info (click to toggle)
orc 1%3A0.4.22-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,644 kB
  • ctags: 5,588
  • sloc: ansic: 75,452; sh: 11,363; xml: 4,281; makefile: 306
file content (45 lines) | stat: -rw-r--r-- 971 bytes parent folder | download | duplicates (4)
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
43
44
45

#ifndef _ORC_ARRAY_H_
#define _ORC_ARRAY_H_

#include <orc-test/orctest.h>
#include <orc-test/orcrandom.h>
#include <orc/orc.h>
#include <orc/orcdebug.h>

#define ORC_OOB_VALUE 0xa5

typedef struct _OrcArray OrcArray;
struct _OrcArray {
  void *data;
  int stride;
  int element_size;
  int n,m;

  void *alloc_data;
  int alloc_len;
  void *aligned_data;
};

enum {
  ORC_PATTERN_RANDOM = 0,
  ORC_PATTERN_FLOAT_SMALL,
  ORC_PATTERN_FLOAT_SPECIAL,
  ORC_PATTERN_FLOAT_DENORMAL
};

OrcArray *orc_array_new (int n, int m, int element_size, int misalignment,
    int alignment);
void orc_array_free (OrcArray *array);

void orc_array_set_pattern (OrcArray *array, int value);
void orc_array_set_random (OrcArray *array, OrcRandomContext *context);
void orc_array_set_pattern_2 (OrcArray *array, OrcRandomContext *context,
    int type);


int orc_array_compare (OrcArray *array1, OrcArray *array2, int flags);
int orc_array_check_out_of_bounds (OrcArray *array);

#endif