From: Tim-Philipp Müller Date: Fri, 27 Apr 2018 13:00:54 +0000 (+0100) Subject: orc-test: decorate public symbols with ORC_TEST_API X-Git-Tag: orc-0.4.33~175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32dcb3e31d5aba9141738c48dcd13e30e8edd9c1;p=platform%2Fupstream%2Forc.git orc-test: decorate public symbols with ORC_TEST_API We'll use that later to control symbol visibility and exported symbols. --- diff --git a/orc-test/orcarray.h b/orc-test/orcarray.h index 3466f6c..be07eff 100644 --- a/orc-test/orcarray.h +++ b/orc-test/orcarray.h @@ -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 diff --git a/orc-test/orcprofile.h b/orc-test/orcprofile.h index 277fd59..7c11a12 100644 --- a/orc-test/orcprofile.h +++ b/orc-test/orcprofile.h @@ -28,7 +28,7 @@ #ifndef _ORC_PROFILE_H_ #define _ORC_PROFILE_H_ -#include +#include 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); /** diff --git a/orc-test/orcrandom.h b/orc-test/orcrandom.h index 757b982..4b49f00 100644 --- a/orc-test/orcrandom.h +++ b/orc-test/orcrandom.h @@ -2,7 +2,7 @@ #ifndef _ORC_RANDOM_H_ #define _ORC_RANDOM_H_ -#include +#include 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 diff --git a/orc-test/orctest.h b/orc-test/orctest.h index 4aab067..eddb0c7 100644 --- a/orc-test/orctest.h +++ b/orc-test/orctest.h @@ -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