Skip to content

Commit 92adbe0

Browse files
lgritzThiagoIze
andauthored
cleanup: simd.h deprecations (#4308)
Fully remove some things that have had deprecation warnings for a long, long time (mostly since 1.x), so we think it can't possibly break anyone. Add deprecation warnings to some things that have been nominally deprecated for some time. The build warnings will serve as final notice that they will fully disappear by OIIO 3.0 release. This is part of a series of small steps to fully deprecate a whole lot of cruft between now and the 3.0 release. --------- Signed-off-by: Larry Gritz <lg@larrygritz.com> Co-authored-by: Thiago Ize <ThiagoIze@users.noreply.github.com>
1 parent e4577d0 commit 92adbe0

File tree

1 file changed

+15
-35
lines changed

1 file changed

+15
-35
lines changed

src/include/OpenImageIO/simd.h

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,14 @@ class vfloat16;
306306
// These are removed from visibility for the OIIO codebase itself, or for any
307307
// downstream project that defines OIIO_DISABLE_DEPRECATED to exclude
308308
// declarations deprecated as of version 1.9 or later.
309-
typedef vbool4 mask4; // old name
310-
typedef vbool4 bool4;
311-
typedef vbool8 bool8;
312-
typedef vint4 int4;
313-
typedef vint8 int8;
314-
typedef vfloat3 float3;
315-
typedef vfloat4 float4;
316-
typedef vfloat8 float8;
309+
OIIO_DEPRECATED("use vbool4") typedef vbool4 mask4; // old name
310+
OIIO_DEPRECATED("use vbool4") typedef vbool4 bool4;
311+
OIIO_DEPRECATED("use vbool8") typedef vbool8 bool8;
312+
OIIO_DEPRECATED("use vint4") typedef vint4 int4;
313+
OIIO_DEPRECATED("use vint8") typedef vint8 int8;
314+
OIIO_DEPRECATED("use vfloat3") typedef vfloat3 float3;
315+
OIIO_DEPRECATED("use vfloat4") typedef vfloat4 float4;
316+
OIIO_DEPRECATED("use vfloat8") typedef vfloat8 float8;
317317
#endif
318318

319319
} // namespace simd
@@ -964,10 +964,6 @@ class vint4 {
964964
typedef vbool4 vbool_t; ///< bool type of the same length
965965
typedef vfloat4 vfloat_t; ///< float type of the same length
966966
typedef vint4 vint_t; ///< int type of the same length
967-
OIIO_DEPRECATED("use vbool_t (1.8)")
968-
typedef vbool4 bool_t; // old name (deprecated 1.8)
969-
OIIO_DEPRECATED("use vfloat_t (1.8)")
970-
typedef vfloat4 float_t; // old name (deprecated 1.8)
971967
static constexpr size_t size() noexcept { return elements; }
972968

973969
/// Default constructor (contents undefined)
@@ -1225,6 +1221,7 @@ vint4 max (const vint4& a, const vint4& b);
12251221
/// Circular bit rotate by s bits, for N values at once.
12261222
vint4 rotl (const vint4& x, const int s);
12271223
// DEPRECATED(2.1)
1224+
OIIO_DEPRECATED("Use rotl instead")
12281225
vint4 rotl32 (const vint4& x, const unsigned int k);
12291226

12301227
/// andnot(a,b) returns ((~a) & b)
@@ -1260,10 +1257,6 @@ class vint8 {
12601257
typedef vbool8 vbool_t; ///< bool type of the same length
12611258
typedef vfloat8 vfloat_t; ///< float type of the same length
12621259
typedef vint8 vint_t; ///< int type of the same length
1263-
OIIO_DEPRECATED("use vbool_t (1.8)")
1264-
typedef vbool8 bool_t; // old name (deprecated 1.8)
1265-
OIIO_DEPRECATED("use vfloat_t (1.8)")
1266-
typedef vfloat8 float_t; // old name (deprecated 1.8)
12671260
static constexpr size_t size() noexcept { return elements; }
12681261

12691262
/// Default constructor (contents undefined)
@@ -1534,6 +1527,7 @@ vint8 max (const vint8& a, const vint8& b);
15341527
/// Circular bit rotate by s bits, for N values at once.
15351528
vint8 rotl (const vint8& x, const int s);
15361529
// DEPRECATED(2.1)
1530+
OIIO_DEPRECATED("Use rotl instead")
15371531
vint8 rotl32 (const vint8& x, const unsigned int k);
15381532

15391533
/// andnot(a,b) returns ((~a) & b)
@@ -1564,10 +1558,6 @@ class vint16 {
15641558
typedef vbool16 vbool_t; ///< bool type of the same length
15651559
typedef vfloat16 vfloat_t; ///< float type of the same length
15661560
typedef vint16 vint_t; ///< int type of the same length
1567-
OIIO_DEPRECATED("use vbool_t (1.8)")
1568-
typedef vbool16 bool_t; // old name (deprecated 1.8)
1569-
OIIO_DEPRECATED("use vfloat_t (1.8)")
1570-
typedef vfloat16 float_t; // old name (deprecated 1.8)
15711561
static constexpr size_t size() noexcept { return elements; }
15721562

15731563
/// Default constructor (contents undefined)
@@ -1850,6 +1840,7 @@ vint16 max (const vint16& a, const vint16& b);
18501840
/// Circular bit rotate by s bits, for N values at once.
18511841
vint16 rotl (const vint16& x, const int s);
18521842
// DEPRECATED(2.1)
1843+
OIIO_DEPRECATED("Use rotl instead")
18531844
vint16 rotl32 (const vint16& x, const unsigned int k);
18541845

18551846
/// andnot(a,b) returns ((~a) & b)
@@ -1881,10 +1872,6 @@ class vfloat4 {
18811872
typedef vfloat4 vfloat_t; ///< SIMD int type
18821873
typedef vint4 vint_t; ///< SIMD int type
18831874
typedef vbool4 vbool_t; ///< SIMD bool type
1884-
OIIO_DEPRECATED("use vbool_t (1.8)")
1885-
typedef vint4 int_t; // old name (deprecated 1.8)
1886-
OIIO_DEPRECATED("use vfloat_t (1.8)")
1887-
typedef vbool4 bool_t; // old name (deprecated 1.8)
18881875
static constexpr size_t size() noexcept { return elements; }
18891876

18901877
/// Default constructor (contents undefined)
@@ -2556,10 +2543,6 @@ class vfloat8 {
25562543
typedef vfloat8 vfloat_t; ///< SIMD int type
25572544
typedef vint8 vint_t; ///< SIMD int type
25582545
typedef vbool8 vbool_t; ///< SIMD bool type
2559-
OIIO_DEPRECATED("use vint_t (1.8)")
2560-
typedef vint8 int_t; // old name (deprecated 1.8)
2561-
OIIO_DEPRECATED("use vbool_t (1.8)")
2562-
typedef vbool8 bool_t; // old name (deprecated 1.8)
25632546
static constexpr size_t size() noexcept { return elements; }
25642547

25652548
/// Default constructor (contents undefined)
@@ -2823,6 +2806,7 @@ vfloat8 sign (const vfloat8& a); ///< 1.0 when value >= 0, -1 when negative
28232806
vfloat8 ceil (const vfloat8& a);
28242807
vfloat8 floor (const vfloat8& a);
28252808
vint8 ifloor (const vfloat8& a); ///< (int)floor
2809+
OIIO_DEPRECATED("Use ifloor instead")
28262810
inline vint8 floori (const vfloat8& a) { return ifloor(a); } // DEPRECATED(1.8) alias
28272811

28282812
/// Per-element round to nearest integer.
@@ -2874,10 +2858,6 @@ class vfloat16 {
28742858
typedef vfloat16 vfloat_t; ///< SIMD int type
28752859
typedef vint16 vint_t; ///< SIMD int type
28762860
typedef vbool16 vbool_t; ///< SIMD bool type
2877-
OIIO_DEPRECATED("use vint_t (1.8)")
2878-
typedef vint16 int_t; // old name (deprecated 1.8)
2879-
OIIO_DEPRECATED("use vbool_t (1.8)")
2880-
typedef vbool16 bool_t; // old name (deprecated 1.8)
28812861
static constexpr size_t size() noexcept { return elements; }
28822862

28832863
/// Default constructor (contents undefined)
@@ -4849,9 +4829,6 @@ OIIO_FORCEINLINE vint4 bitcast_to_int (const vbool4& x)
48494829
#endif
48504830
}
48514831

4852-
// Old names: (DEPRECATED 1.8)
4853-
OIIO_DEPRECATED("use bitcast_to_int() (1.8)")
4854-
inline vint4 bitcast_to_int4 (const vbool4& x) { return bitcast_to_int(x); }
48554832

48564833

48574834
OIIO_FORCEINLINE vint4 vreduce_add (const vint4& v) {
@@ -5003,6 +4980,7 @@ OIIO_FORCEINLINE vint4 rotl(const vint4& x, int s) {
50034980
}
50044981

50054982
// DEPRECATED (2.1)
4983+
OIIO_DEPRECATED("Use rotl instead")
50064984
OIIO_FORCEINLINE vint4 rotl32 (const vint4& x, const unsigned int k) {
50074985
return rotl(x, k);
50084986
}
@@ -5831,6 +5809,7 @@ OIIO_FORCEINLINE vint8 rotl(const vint8& x, int s) {
58315809
}
58325810

58335811
// DEPRECATED (2.1)
5812+
OIIO_DEPRECATED("Use rotl instead")
58345813
OIIO_FORCEINLINE vint8 rotl32 (const vint8& x, const unsigned int k) {
58355814
return rotl(x, k);
58365815
}
@@ -6638,6 +6617,7 @@ OIIO_FORCEINLINE vint16 rotl(const vint16& x, int s) {
66386617
}
66396618

66406619
// DEPRECATED (2.1)
6620+
OIIO_DEPRECATED("Use rotl instead")
66416621
OIIO_FORCEINLINE vint16 rotl32 (const vint16& x, const unsigned int k) {
66426622
return rotl(x, k);
66436623
}

0 commit comments

Comments
 (0)