orc-test: decorate public symbols with ORC_TEST_API
authorTim-Philipp Müller <tim@centricular.com>
Fri, 27 Apr 2018 13:00:54 +0000 (14:00 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 27 Apr 2018 23:27:47 +0000 (00:27 +0100)
We'll use that later to control symbol visibility and
exported symbols.

orc-test/orcarray.h
orc-test/orcprofile.h
orc-test/orcrandom.h
orc-test/orctest.h

index 3466f6c..be07eff 100644 (file)
@@ -28,17 +28,27 @@ enum {
   ORC_PATTERN_FLOAT_DENORMAL
 };
 
+ORC_TEST_API
 OrcArray *orc_array_new (int n, int m, int element_size, int misalignment,
     int alignment);
+
+ORC_TEST_API
 void orc_array_free (OrcArray *array);
 
+ORC_TEST_API
 void orc_array_set_pattern (OrcArray *array, int value);
+
+ORC_TEST_API
 void orc_array_set_random (OrcArray *array, OrcRandomContext *context);
+
+ORC_TEST_API
 void orc_array_set_pattern_2 (OrcArray *array, OrcRandomContext *context,
     int type);
 
-
+ORC_TEST_API
 int orc_array_compare (OrcArray *array1, OrcArray *array2, int flags);
+
+ORC_TEST_API
 int orc_array_check_out_of_bounds (OrcArray *array);
 
 #endif
index 277fd59..7c11a12 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef _ORC_PROFILE_H_
 #define _ORC_PROFILE_H_
 
-#include <orc/orcutils.h>
+#include <orc-test/orctest.h>
 
 ORC_BEGIN_DECLS
 
@@ -59,9 +59,16 @@ struct _OrcProfile {
   int hist_count[ORC_PROFILE_HIST_LENGTH];
 };
 
+ORC_TEST_API
 unsigned long orc_profile_stamp(void);
+
+ORC_TEST_API
 void orc_profile_init(OrcProfile *prof);
+
+ORC_TEST_API
 void orc_profile_stop_handle(OrcProfile *prof);
+
+ORC_TEST_API
 void orc_profile_get_ave_std (OrcProfile *prof, double *ave_p, double *std_p);
 
 /**
index 757b982..4b49f00 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _ORC_RANDOM_H_
 #define _ORC_RANDOM_H_
 
-#include <orc/orcutils.h>
+#include <orc-test/orctest.h>
 
 ORC_BEGIN_DECLS
 
@@ -11,9 +11,16 @@ struct _OrcRandomContext {
   unsigned int x;
 };
 
-void orc_random_init (OrcRandomContext *context, int seed);
-void orc_random_bits (OrcRandomContext *context, void *data, int n_bytes);
-void orc_random_floats (OrcRandomContext *context, float *data, int n);
+ORC_TEST_API
+void         orc_random_init (OrcRandomContext *context, int seed);
+
+ORC_TEST_API
+void         orc_random_bits (OrcRandomContext *context, void *data, int n_bytes);
+
+ORC_TEST_API
+void         orc_random_floats (OrcRandomContext *context, float *data, int n);
+
+ORC_TEST_API
 unsigned int orc_random (OrcRandomContext *context);
 
 ORC_END_DECLS
index 4aab067..eddb0c7 100644 (file)
@@ -7,6 +7,10 @@
 
 ORC_BEGIN_DECLS
 
+#ifndef ORC_TEST_API
+#define ORC_TEST_API extern
+#endif
+
 typedef enum {
   ORC_TEST_FAILED = 0,
   ORC_TEST_INDETERMINATE = 1,
@@ -17,23 +21,48 @@ typedef enum {
 #define ORC_TEST_FLAGS_FLOAT (1<<1)
 #define ORC_TEST_FLAGS_EMULATE (1<<2)
 
-void orc_test_init (void);
+ORC_TEST_API
+void          orc_test_init (void);
+
+ORC_TEST_API
 OrcTestResult orc_test_gcc_compile (OrcProgram *p);
+
+ORC_TEST_API
 OrcTestResult orc_test_gcc_compile_neon (OrcProgram *p);
+
+ORC_TEST_API
 OrcTestResult orc_test_gcc_compile_c64x (OrcProgram *p);
+
+ORC_TEST_API
 OrcTestResult orc_test_gcc_compile_mips (OrcProgram *p);
-void orc_test_random_bits (void *data, int n_bytes);
+
+ORC_TEST_API
+void          orc_test_random_bits (void *data, int n_bytes);
+
+ORC_TEST_API
 OrcTestResult orc_test_compare_output (OrcProgram *program);
+
+ORC_TEST_API
 OrcTestResult orc_test_compare_output_full (OrcProgram *program, int flags);
+
+ORC_TEST_API
 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);
+ORC_TEST_API
+OrcProgram *  orc_test_get_program_for_opcode (OrcStaticOpcode *opcode);
+
+ORC_TEST_API
+OrcProgram *  orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode);
+
+ORC_TEST_API
+OrcProgram *  orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode);
+
+ORC_TEST_API
+void          orc_test_performance (OrcProgram *program, int flags);
 
-void orc_test_performance (OrcProgram *program, int flags);
-double orc_test_performance_full (OrcProgram *program, int flags,
-    const char *target);
+ORC_TEST_API
+double        orc_test_performance_full (OrcProgram *program, int flags,
+                                         const char *target);
 
 ORC_END_DECLS