Mercurial > hg > silvet
comparison bqvec/Makefile @ 372:af71cbdab621 tip
Update bqvec code
author | Chris Cannam |
---|---|
date | Tue, 19 Nov 2019 10:13:32 +0000 |
parents | 5d0a2ebb4d17 |
children |
comparison
equal
deleted
inserted
replaced
371:426ce52ef096 | 372:af71cbdab621 |
---|---|
5 # Available options are | 5 # Available options are |
6 # | 6 # |
7 # -DHAVE_IPP Intel's Integrated Performance Primitives are available | 7 # -DHAVE_IPP Intel's Integrated Performance Primitives are available |
8 # -DHAVE_VDSP Apple's Accelerate framework is available | 8 # -DHAVE_VDSP Apple's Accelerate framework is available |
9 # | 9 # |
10 # These are optional (they affect performance, not function) and you | 10 # The above are optional (they affect performance, not function) and |
11 # may define more than one of them. | 11 # you may define more than one of them. |
12 # | 12 # |
13 # The following two options trade off speed against precision for single- | |
14 # precision paths in cases where IPP and VDSP are not available: | |
15 # | |
16 # -DUSE_POMMIER_MATHFUN Use Julien Pommier's SSE/NEON implementation | |
17 # of sincos in 32-bit polar-to-cartesian conversion | |
18 # -DUSE_APPROXIMATE_ATAN2 Use a quick but *very* approximate atan2 | |
19 # function in 32-bit cartesian-to-polar conversion | |
20 # | |
21 # And a handful of miscellaneous flags: | |
22 # | |
23 # -DLACK_SINCOS Math library lacks sincos() function | |
24 # -DNO_COMPLEX_TYPES Don't bother defining bq_complex_t functions | |
25 # -DUSE_SINGLE_PRECISION_COMPLEX Use float, not double, for bq_complex_t | |
26 # -DNO_EXCEPTIONS Don't throw exceptions (abort instead) | |
27 # | |
13 # Add any relevant -I flags for include paths as well. | 28 # Add any relevant -I flags for include paths as well. |
14 # | 29 # |
15 # Note that you must supply the same flags when including bqvec | 30 # Note that you must supply the same flags when including bqvec |
16 # headers later as you are using now when compiling the library. (You | 31 # headers later as you are using now when compiling the library. (You |
17 # may find it simplest to just add the bqvec source files to your | 32 # may find it simplest to just add the bqvec source files to your |
18 # application's build system and not build a bqvec library at all.) | 33 # application's build system and not build a bqvec library at all.) |
19 | 34 |
20 VECTOR_DEFINES := | 35 VECTOR_DEFINES := |
21 | 36 |
22 | 37 |
23 # Add to ALLOCATOR_DEFINES options relating to aligned malloc. | 38 # Add to ALLOCATOR_DEFINES options relating to aligned malloc. |
39 # These are not usually necessary. | |
24 # | 40 # |
25 # Available options are | 41 # Available options are |
26 # | 42 # |
27 # -DHAVE_POSIX_MEMALIGN The posix_memalign call is available in sys/mman.h | 43 # -DHAVE_POSIX_MEMALIGN The posix_memalign call is available in sys/mman.h |
28 # -DLACK_POSIX_MEMALIGN The posix_memalign call is not available | 44 # -DLACK_POSIX_MEMALIGN The posix_memalign call is not available |
29 # | 45 # |
30 # -DMALLOC_IS_ALIGNED The malloc call already returns aligned memory | 46 # -DMALLOC_IS_ALIGNED The malloc call already returns aligned memory |
31 # -DMALLOC_IS_NOT_ALIGNED The malloc call does not return aligned memory | 47 # -DMALLOC_IS_NOT_ALIGNED The malloc call does not return aligned memory |
32 # | 48 # |
33 # -DUSE_OWN_ALIGNED_MALLOC No aligned malloc is available, roll your own | 49 # -DUSE_OWN_ALIGNED_MALLOC If no aligned malloc is available, roll your own |
50 # -DAVOID_OWN_ALIGNED_MALLOC If no aligned malloc is available, refuse to build | |
34 # | 51 # |
35 # -DLACK_BAD_ALLOC The C++ library lacks the std::bad_alloc exception | 52 # -DLACK_BAD_ALLOC The C++ library lacks the std::bad_alloc exception |
36 # | 53 # |
37 # Here "aligned" is assumed to mean "aligned enough for whatever | 54 # Here "aligned" is assumed to mean "aligned enough for whatever |
38 # vector stuff the space will be used for" which most likely means | 55 # vector stuff the space will be used for" which likely means at least |
39 # 16-byte alignment. | 56 # 16-byte alignment. |
40 # | 57 # |
41 # The default is to use _aligned_malloc when building with Visual C++, | 58 # If no options are provided, we will use IPP functions if HAVE_IPP is |
42 # system malloc when building on OS/X, and posix_memalign otherwise. | 59 # defined, or else use _aligned_malloc when building with Visual C++ |
60 # on Windows, roll our own when building with some other compiler on | |
61 # Windows, use system malloc when building on OS/X, and use | |
62 # posix_memalign elsewhere. | |
43 # | 63 # |
44 # Note that you must supply the same flags when including bqvec | 64 # Note that you must supply the same flags when including bqvec |
45 # headers later as you are using now when compiling the library. (You | 65 # headers later as you are using now when compiling the library. (You |
46 # may find it simplest to just add the bqvec source files to your | 66 # may find it simplest to just add the bqvec source files to your |
47 # application's build system and not build a bqvec library at all.) | 67 # application's build system and not build a bqvec library at all.) |
48 | 68 |
49 ALLOCATOR_DEFINES := | 69 ALLOCATOR_DEFINES := |
50 | 70 |
51 | 71 |
52 SRC_DIR := src | 72 # Add any related includes and libraries here |
53 HEADER_DIR := bqvec | 73 # |
54 | 74 THIRD_PARTY_INCLUDES := |
55 SOURCES := $(wildcard $(SRC_DIR)/*.cpp) | 75 THIRD_PARTY_LIBS := |
56 HEADERS := $(wildcard $(HEADER_DIR)/*.h) $(wildcard $(SRC_DIR)/*.h) | |
57 | |
58 OBJECTS := $(SOURCES:.cpp=.o) | |
59 OBJECTS := $(OBJECTS:.c=.o) | |
60 | |
61 CXXFLAGS := $(VECTOR_DEFINES) $(ALLOCATOR_DEFINES) -I. | |
62 | |
63 LIBRARY := libbqvec.a | |
64 | |
65 all: $(LIBRARY) | |
66 | |
67 $(LIBRARY): $(OBJECTS) | |
68 $(AR) rc $@ $^ | |
69 | |
70 clean: | |
71 rm -f $(OBJECTS) | |
72 | |
73 distclean: clean | |
74 rm -f $(LIBRARY) | |
75 | |
76 depend: | |
77 makedepend -Y -fMakefile $(SOURCES) $(HEADERS) | |
78 | 76 |
79 | 77 |
80 # DO NOT DELETE | 78 # If you are including a set of bq libraries into a project, you can |
79 # override variables for all of them (including all of the above) in | |
80 # the following file, which all bq* Makefiles will include if found | |
81 | 81 |
82 src/VectorOpsComplex.o: bqvec/VectorOpsComplex.h bqvec/VectorOps.h | 82 -include ../Makefile.inc-bq |
83 src/VectorOpsComplex.o: bqvec/Restrict.h bqvec/ComplexTypes.h | 83 |
84 src/Allocators.o: bqvec/Allocators.h bqvec/VectorOps.h bqvec/Restrict.h | 84 |
85 bqvec/VectorOpsComplex.o: bqvec/VectorOps.h bqvec/Restrict.h | 85 # This project-local Makefile describes the source files and contains |
86 bqvec/VectorOpsComplex.o: bqvec/ComplexTypes.h | 86 # no routinely user-modifiable parts |
87 bqvec/VectorOps.o: bqvec/Restrict.h | 87 |
88 bqvec/Allocators.o: bqvec/VectorOps.h bqvec/Restrict.h | 88 include build/Makefile.inc |