ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/Changes
Revision: 1.44
Committed: Fri Mar 25 15:30:02 2022 UTC (2 years, 2 months ago) by root
Branch: MAIN
Changes since 1.43: +1 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.39 TODO: naming of cutnions, index_to_coord, xy_to_s, xy_to_linear/seq, 32/64
2     TODO: returning packed coordinates, really
3     TODO: support order=0?
4     0x0001000c
5     - added ecb_hilbert2d function family.
6 root 1.40 - use __builtin_popcountl on 64 bit clang and gcc.
7 root 1.41 - use 64 bit builtins, not 128 bit builtins, for ctz/clz on 64 bit cpus.
8 root 1.42 - add ecb_clz* functions,
9 root 1.43 - renamed ecb_gray* functions to have trailing bit width.
10 root 1.44 - use ecb_function_ consistently for newly added functions.
11 root 1.39
12 root 1.38 0x0001000b
13     - added ecb_gray*_{de,en}code functions.
14    
15 root 1.37 0x0001000a
16     - added ecb_ptrmix.
17    
18 root 1.34 0x00010009
19 root 1.35 - added ecb_i2a family of functions.
20 root 1.34 - added ECB_64BIT_NATIVE.
21    
22 root 1.15 TODO:
23     08:30:06 <b_jonas> I think it could be worth to add a macro that works like alignof or _Alignof on sane
24     compilers, and like __alignof on MS compilers that support it, see
25     http://msdn.microsoft.com/en-us/library/45t0s5f4.aspx
26     08:30:24 <b_jonas> even if you can't support it on all the old compilers
27     08:31:17 <b_jonas> I'd also like a macro for alignas, but sadly, that seems impossible in general, because
28     the MS compiler only has some half-attempt to do something similar but with different and
29     more broken semantics, see http://msdn.microsoft.com/en-us/library/83ythb65.aspx
30     08:31:35 <b_jonas> but I wonder if some special case could still be worth to support
31     08:32:23 <b_jonas> probably not, because it would just account to making a union with a highly aligned type,
32     which is something I can do on any compiler portably
33    
34     TODO: #define ECB_IS_INTEGRAL(x) !((1 ? 1 : (x)) / 2)
35     #define ECB_IS_INTEGRAL(x) (sizeof ((x) + 1.0f) != sizeof((x) + 1ULL))
36    
37 root 1.28 TODO: ecb_minpot, either using bit tricks or ecb_ldXX
38    
39     TODO: __builtin_popcountll exists...
40    
41 root 1.26 TODO: __builtin_powi
42    
43 root 1.15 TODO: https://gustedt.wordpress.com/2010/06/08/detect-empty-macro-arguments/
44    
45 root 1.13 implement is_constant for c11: https://gustedt.wordpress.com/2013/08/22/testing-compile-time-constness-and-null-pointers-with-c11s-_generic/
46 root 1.12
47     #ifdef _MSC_VER
48    
49     #include <stdlib.h>
50     #define bswap_32(x) _byteswap_ulong(x)
51     #define bswap_64(x) _byteswap_uint64(x)
52    
53     #elif defined(__APPLE__)
54    
55     // Mac OS X / Darwin features
56     #include <libkern/OSByteOrder.h>
57     #define bswap_32(x) OSSwapInt32(x)
58     #define bswap_64(x) OSSwapInt64(x)
59    
60     #elif defined(__sun) || defined(sun)
61    
62     #include <sys/byteorder.h>
63     #define bswap_32(x) BSWAP_32(x)
64     #define bswap_64(x) BSWAP_64(x)
65    
66     #elif defined(__FreeBSD__)
67    
68     #include <sys/endian.h>
69     #define bswap_32(x) bswap32(x)
70     #define bswap_64(x) bswap64(x)
71    
72     #elif defined(__OpenBSD__)
73    
74     #include <sys/types.h>
75     #define bswap_32(x) swap32(x)
76     #define bswap_64(x) swap64(x)
77    
78     #elif defined(__NetBSD__)
79    
80     #include <sys/types.h>
81     #include <machine/bswap.h>
82     #if defined(__BSWAP_RENAME) && !defined(__bswap_32)
83     #define bswap_32(x) bswap32(x)
84     #define bswap_64(x) bswap64(x)
85     #endif
86    
87     #else
88    
89     #include <byteswap.h>
90    
91     #endif
92    
93 root 1.32 TODO: generic poprcount etc., also fast_t for them?
94 root 1.33
95 root 1.36 - allow any rotate count in rcb_rot*, at the expense
96     of bad optimisation results on some platforms or with
97     some word sizes.
98 root 1.33 - try to use inttypes.h on mingw.
99    
100 root 1.30 0x00010008
101     - aligned/unaligned load/store, bswap, host order
102     conversion.
103 root 1.32 - generic C++ ecb_rot[lr], ecb_popcount, ecb_ctz,
104     ecb_is_pot32 and ecb_bitrev functions.
105 root 1.30
106 root 1.29 0x00010007
107     - new ECB_OPTIMIZE_SIZE symbol.
108    
109 root 1.28 0x00010006
110 root 1.29 - new ECB_MEMORY_FENCE_RELAXED memory fence.
111 root 1.28 - use acquire/eelease memory barriers on sun workshop pro, not read/write.
112     - rely on c++ compiler barriers to do the right thing in gcc/clang.
113 root 1.27 - change release memory fence to memory barrier on ia32/ia64.
114 root 1.23 - apply ctz/ld patch for msc by Zsbán Ambrus.
115 root 1.24 - ECB_PTRSIZE erroneously was 8 on most 32bit systems (
116     found by Zsbán Ambrus).
117 root 1.25 - improved compiletime detection of endianness, also, allow
118     runtime detection to indicate other-than-big/little endianness.
119 root 1.26 - no memory barrier neded on arm < 6.
120 root 1.23
121 root 1.22 0x00010005
122     - improve ecb_binary16_to_float.
123     - add ecb_float_to_binary16.
124     - add ecb_binary16_to_binary32 and ecb_binary32_to_binary16 pair.
125    
126 root 1.6 0x00010001
127     - add ecb_is_pot32/64.
128     - add intptr_t/uintptr_t.
129     - add ECB_PTRSIZE.
130 root 1.7 - more macros for C/C++ version checks.
131     - support C11 atomics for memory fences.
132     - support gcc-4.7 atomics for memory fences.
133 root 1.10 - support m68k, m88k and sh (patch by Miod Vallat).
134 root 1.11 - add ecb_binary16_to_float.
135 root 1.6
136 root 1.9 TODO: ecb_restrict_array etc. http://ue.tst.eu/5093eafd713ec5fda776d8065070aa4c.txt
137 sf-exg 1.20 TODO: ffs
138 root 1.1 64 bit variants of everything
139 root 1.2 TODO: examples from X for clz/ctz
140 root 1.3 TODO: arithmetic right shift
141     TODO: template/generic functions for x32/x64 and so on
142 root 1.4 TODO: #define ecb_integer_multiples_of(n,d) ((char (*)[d])(n) - (char (*)[d])0)
143 root 1.3 TODO: generalised shift
144 root 1.8 TODO: #define ECB_FAST_UNALIGNED_ACCESS
145 root 1.3 unsigned long gensh(unsigned long v, int x) {
146     int a, b;
147     a = (v << x) & -(((unsigned int)x) < 32);
148     x = -x;
149     b = (v >> x) & -(((unsigned int)x) < 32);
150     return a|b;
151     }
152 root 1.14
153 root 1.16 TODO: export(=dllexport) & hidden
154     TODO: flatten
155     TODO: warning(msg)
156     TODO: error(msg)
157 root 1.17 TODO: leaf (uh), noclone (hmmm)
158     TODO: nonnull, returns_nonnull
159     TODO: nothrow
160     TODO: used
161     TODO: trap
162     TODO: http://llvm.org/docs/doxygen/html/Compiler_8h_source.html
163 root 1.16
164 root 1.14 TODO: read/write unaligned macros
165     TODO: htonl and friends
166 sf-exg 1.20 TODO: macro to convert from unsigned to signed "the natural way"
167 root 1.14 TODO: ecb_static_assert, with message (just like boost), or somesuch, using array-declaration
168     TODO: alignof
169    
170