File: orctest.h

package info (click to toggle)
orc 1:0.4.6-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,856 kB
  • ctags: 2,889
  • sloc: ansic: 29,000; sh: 10,220; xml: 2,508; makefile: 196
file content (37 lines) | stat: -rw-r--r-- 1,060 bytes parent folder | download
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

#ifndef _ORC_TEST_TEST_H_
#define _ORC_TEST_TEST_H_

#include <orc/orc.h>
#include <orc/orcutils.h>

ORC_BEGIN_DECLS

typedef enum {
  ORC_TEST_FAILED = 0,
  ORC_TEST_INDETERMINATE = 1,
  ORC_TEST_OK = 2
} OrcTestResult;

#define ORC_TEST_FLAGS_BACKUP (1<<0)
#define ORC_TEST_FLAGS_FLOAT (1<<1)

void orc_test_init (void);
OrcTestResult orc_test_gcc_compile (OrcProgram *p);
OrcTestResult orc_test_gcc_compile_neon (OrcProgram *p);
OrcTestResult orc_test_gcc_compile_c64x (OrcProgram *p);
void orc_test_random_bits (void *data, int n_bytes);
OrcTestResult orc_test_compare_output (OrcProgram *program);
OrcTestResult orc_test_compare_output_full (OrcProgram *program, int flags);
OrcTestResult orc_test_compare_output_backup (OrcProgram *program);

OrcProgram *orc_test_get_program_for_opcode (OrcStaticOpcode *opcode);
OrcProgram *orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode);
OrcProgram *orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode);

void orc_test_performance (OrcProgram *program, int flags);

ORC_END_DECLS

#endif