mirror of
https://github.com/intel/isa-l.git
synced 2025-07-01 17:03:26 +02:00
build: Remove unneeded file types.h
The file types.h has long been misnamed and overlaps with functionality in the test helper routines. Change-Id: I774047d3a0074198b67a6b4e909f1e2ce1938195 Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
parent
cfdd3497d1
commit
112dd72c01
2
Doxyfile
2
Doxyfile
@ -17,7 +17,7 @@ INPUT = isa-l.h \
|
||||
doc/test.md \
|
||||
doc/build.md
|
||||
|
||||
EXCLUDE = include/test.h include/types.h include/unaligned.h
|
||||
EXCLUDE = include/test.h include/unaligned.h
|
||||
EXCLUDE_PATTERNS = */include/*_multibinary.h
|
||||
EXAMPLE_PATH = . crc raid erasure_code igzip
|
||||
PAPER_TYPE = letter
|
||||
|
@ -3,7 +3,7 @@ CLEANFILES =
|
||||
LDADD =
|
||||
AM_MAKEFLAGS = --no-print-directory
|
||||
noinst_HEADERS =
|
||||
pkginclude_HEADERS = include/test.h include/types.h
|
||||
pkginclude_HEADERS = include/test.h
|
||||
noinst_LTLIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
INCLUDE = -I $(srcdir)/include/
|
||||
|
@ -72,7 +72,7 @@ lsrc_x86_64 += \
|
||||
src_include += -I $(srcdir)/crc
|
||||
extern_hdrs += include/crc.h include/crc64.h
|
||||
|
||||
other_src += include/reg_sizes.asm include/types.h include/test.h \
|
||||
other_src += include/reg_sizes.asm include/test.h \
|
||||
crc/crc_ref.h crc/crc64_ref.h
|
||||
|
||||
check_tests += crc/crc16_t10dif_test \
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include "crc.h"
|
||||
#include "types.h"
|
||||
#include "crc_ref.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifndef TEST_SEED
|
||||
# define TEST_SEED 0x1234
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "crc.h"
|
||||
#include "types.h"
|
||||
#include "crc_ref.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifndef TEST_SEED
|
||||
# define TEST_SEED 0x1234
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "crc64.h"
|
||||
#include "types.h"
|
||||
#include "crc64_ref.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifndef TEST_SEED
|
||||
# define TEST_SEED 0x1234
|
||||
|
@ -149,5 +149,4 @@ perf_tests += erasure_code/gf_vect_mul_perf \
|
||||
|
||||
other_tests += erasure_code/gen_rs_matrix_limits
|
||||
|
||||
other_src += include/test.h \
|
||||
include/types.h
|
||||
other_src += include/test.h
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> // for memset, memcmp
|
||||
#include "erasure_code.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_LEN 8192
|
||||
#define TEST_SIZE (TEST_LEN/2)
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> // for memset, memcmp
|
||||
#include "erasure_code.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_LEN 8192
|
||||
#define TEST_SIZE (TEST_LEN/2)
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> // for memset, memcmp
|
||||
#include "erasure_code.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
//By default, test multibinary version
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> // for memset, memcmp
|
||||
#include "erasure_code.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifndef ALIGN_SIZE
|
||||
# define ALIGN_SIZE 16
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> // for memset, memcmp
|
||||
#include "erasure_code.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_LEN 8192
|
||||
#define TEST_SIZE (TEST_LEN/2)
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> // for memset, memcmp
|
||||
#include "erasure_code.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifndef FUNCTION_UNDER_TEST
|
||||
# define FUNCTION_UNDER_TEST gf_vect_dot_prod
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> // for memset, memcmp
|
||||
#include "erasure_code.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifndef ALIGN_SIZE
|
||||
# define ALIGN_SIZE 32
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <stdint.h>
|
||||
#include "igzip_checksums.h"
|
||||
#include "checksum_test_ref.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifndef TEST_SEED
|
||||
# define TEST_SEED 0x1234
|
||||
|
@ -30,6 +30,15 @@
|
||||
#ifndef _TEST_H
|
||||
#define _TEST_H
|
||||
|
||||
/**
|
||||
* @file test.h
|
||||
* @brief Test helper include for common perf and test macros
|
||||
*
|
||||
* This is a helper file to enable short and simple tests. Not intended for use
|
||||
* in library functions or production. Includes helper routines for alignment,
|
||||
* benchmark timing, and filesize.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -41,6 +50,29 @@ extern "C" {
|
||||
# define inline __inline
|
||||
#endif
|
||||
|
||||
/* Make os-independent alignment attribute, alloc and free. */
|
||||
#if defined __unix__ || defined __APPLE__
|
||||
# define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
|
||||
# define __forceinline static inline
|
||||
# define aligned_free(x) free(x)
|
||||
#else
|
||||
# ifdef __MINGW32__
|
||||
# define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
|
||||
# define posix_memalign(p, algn, len) (NULL == (*((char**)(p)) = (void*) _aligned_malloc(len, algn)))
|
||||
# define aligned_free(x) _aligned_free(x)
|
||||
# else
|
||||
# define DECLARE_ALIGNED(decl, alignval) __declspec(align(alignval)) decl
|
||||
# define posix_memalign(p, algn, len) (NULL == (*((char**)(p)) = (void*) _aligned_malloc(len, algn)))
|
||||
# define aligned_free(x) _aligned_free(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
# define DEBUG_PRINT(x) printf x
|
||||
#else
|
||||
# define DEBUG_PRINT(x) do {} while (0)
|
||||
#endif
|
||||
|
||||
/* Decide wether to use benchmark time as an approximation or a minimum. Fewer
|
||||
* calls to the timer are required for the approximation case.*/
|
||||
#define BENCHMARK_MIN_TIME 0
|
||||
|
@ -1,77 +0,0 @@
|
||||
/**********************************************************************
|
||||
Copyright(c) 2011-2015 Intel Corporation All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Intel Corporation nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file types.h
|
||||
* @brief Defines standard width types.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __TYPES_H
|
||||
#define __TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef __MINGW32__
|
||||
# include <_mingw.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined __unix__ || defined __APPLE__
|
||||
# define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
|
||||
# define __forceinline static inline
|
||||
# define aligned_free(x) free(x)
|
||||
#else
|
||||
# ifdef __MINGW32__
|
||||
# define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
|
||||
# define posix_memalign(p, algn, len) (NULL == (*((char**)(p)) = (void*) _aligned_malloc(len, algn)))
|
||||
# define aligned_free(x) _aligned_free(x)
|
||||
# else
|
||||
# define DECLARE_ALIGNED(decl, alignval) __declspec(align(alignval)) decl
|
||||
# define posix_memalign(p, algn, len) (NULL == (*((char**)(p)) = (void*) _aligned_malloc(len, algn)))
|
||||
# define aligned_free(x) _aligned_free(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
# define DEBUG_PRINT(x) printf x
|
||||
#else
|
||||
# define DEBUG_PRINT(x) do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //__TYPES_H
|
1
make.inc
1
make.inc
@ -333,7 +333,6 @@ install: $(sort $(extern_hdrs)) | $(install_dirs) $(lib_name) $(so_lib_name) isa
|
||||
install -m 644 $(lib_name) $(prefix)/lib/libisal.a
|
||||
install -m 644 $^ $(prefix)/include/isa-l/.
|
||||
install -m 664 isa-l.h $(prefix)/include/.
|
||||
install -m 664 include/types.h $(prefix)/include/isa-l/.
|
||||
install -m 664 $(so_lib_name) $(prefix)/lib/$(so_lib_ver)
|
||||
(cd $(prefix)/lib && ln -f -s $(so_lib_ver) $(soname) && ln -f -s $(so_lib_ver) $(so_lib_inst))
|
||||
ifeq ($(shell uname),Darwin)
|
||||
|
@ -40,8 +40,7 @@ lsrc_x86_64 += mem/mem_zero_detect_avx.asm \
|
||||
|
||||
extern_hdrs += include/mem_routines.h
|
||||
|
||||
other_src += include/test.h \
|
||||
include/types.h
|
||||
other_src += include/test.h
|
||||
|
||||
check_tests += mem/mem_zero_detect_test
|
||||
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include <string.h>
|
||||
#include "mem_routines.h"
|
||||
#include "test.h"
|
||||
#include "types.h"
|
||||
|
||||
#define TEST_LEN 8*1024
|
||||
#define TEST_TYPE_STR "_warm"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include "mem_routines.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_MEM 10*1024*1024
|
||||
#define TEST_LEN 8*1024
|
||||
|
@ -56,7 +56,7 @@ lsrc_x86_32 += \
|
||||
|
||||
extern_hdrs += include/raid.h
|
||||
|
||||
other_src += include/test.h include/types.h
|
||||
other_src += include/test.h
|
||||
|
||||
check_tests += raid/xor_gen_test raid/pq_gen_test raid/xor_check_test raid/pq_check_test
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include "raid.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_SOURCES 16
|
||||
#define TEST_LEN 1024
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include<stdlib.h>
|
||||
#include<limits.h>
|
||||
#include "raid.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_SOURCES 16
|
||||
#define TEST_LEN 1024
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include "raid.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_SOURCES 16
|
||||
#define TEST_LEN 1024
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "raid.h"
|
||||
#include "types.h"
|
||||
|
||||
#define TEST_SOURCES 16
|
||||
#define TEST_LEN 16*1024
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include "raid.h"
|
||||
#include "types.h"
|
||||
#include "test.h"
|
||||
|
||||
#define TEST_SOURCES 16
|
||||
#define TEST_LEN 1024
|
||||
|
Loading…
x
Reference in New Issue
Block a user