HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_MathRestrictive.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: SYS_ObsoleteFunctions.h ( SYS Library, C++)
7  *
8  * COMMENTS: Since there are SYS versions of many functions, we want to
9  * catch these in our builds. Thus, we want to have defines which
10  * cause compile errors when they are used. This file is included
11  * from SYS_Math. It is turned off during the HDK (since we can
12  * allow users to make std calls.
13  */
14 
15 #ifndef __SYS_ObsoleteFunctions__
16 #define __SYS_ObsoleteFunctions__
17 
18 //#define SYS_RESTRICTIVE_MATH
19 
20 #if defined(SYS_RESTRICTIVE_MATH)
21 
22 #define SYS_RESTRICT_UNARY(name) \
23  static inline fpreal64 name(fpreal64 x, int use_sys=0) { return x; } \
24  static inline fpreal32 name##f(fpreal32 x, int use_sys=0) { return x; }
25 
26 #define SYS_RESTRICT_BINARY(name) \
27  static inline fpreal64 name(fpreal64 x, fpreal64 y, int use_sys=0) \
28  { return x; } \
29  static inline fpreal32 name##f(fpreal32 x, fpreal32 y, int use_sys=0) \
30  { return x; }
31 
32 SYS_RESTRICT_UNARY(sin)
33 SYS_RESTRICT_UNARY(cos)
34 SYS_RESTRICT_UNARY(tan)
35 SYS_RESTRICT_UNARY(asin)
36 SYS_RESTRICT_UNARY(acos)
37 SYS_RESTRICT_UNARY(atan)
38 SYS_RESTRICT_UNARY(sinh)
39 SYS_RESTRICT_UNARY(cosh)
40 SYS_RESTRICT_UNARY(tanh)
41 SYS_RESTRICT_UNARY(asinh)
42 SYS_RESTRICT_UNARY(acosh)
43 SYS_RESTRICT_UNARY(atanh)
44 
45 SYS_RESTRICT_UNARY(sqrt)
46 SYS_RESTRICT_UNARY(cbrt)
47 SYS_RESTRICT_UNARY(log)
48 SYS_RESTRICT_UNARY(log1p)
49 SYS_RESTRICT_UNARY(log10)
50 SYS_RESTRICT_UNARY(exp)
51 SYS_RESTRICT_UNARY(expm1)
52 
53 SYS_RESTRICT_UNARY(fabs)
54 SYS_RESTRICT_UNARY(trunc)
55 SYS_RESTRICT_UNARY(floor)
56 SYS_RESTRICT_UNARY(ceil)
57 
58 SYS_RESTRICT_BINARY(fmod)
59 SYS_RESTRICT_BINARY(pow)
60 SYS_RESTRICT_BINARY(atan2)
61 SYS_RESTRICT_BINARY(hypot)
62 
63 #endif
64 
65 #endif
SYS_API double asinh(double x)
SYS_API double cos(double x)
Definition: SYS_FPUMath.h:69
SYS_API double fmod(double x, double y)
Definition: SYS_FPUMath.h:85
SYS_API double atan2(double y, double x)
Definition: SYS_FPUMath.h:79
SYS_API double expm1(double x)
Definition: SYS_FPUMath.h:95
IMATH_HOSTDEVICE constexpr int floor(T x) IMATH_NOEXCEPT
Definition: ImathFun.h:112
vfloat4 sqrt(const vfloat4 &a)
Definition: simd.h:7481
SYS_API double log10(double x)
Definition: SYS_FPUMath.h:89
ImageBuf OIIO_API pow(const ImageBuf &A, cspan< float > B, ROI roi={}, int nthreads=0)
SYS_API double asin(double x)
Definition: SYS_FPUMath.h:81
SYS_API double acosh(double x)
IMATH_HOSTDEVICE constexpr int trunc(T x) IMATH_NOEXCEPT
Definition: ImathFun.h:126
SYS_API double sinh(double x)
SYS_API double cosh(double x)
SYS_API double acos(double x)
Definition: SYS_FPUMath.h:83
SYS_API double hypot(double x, double y)
SYS_API double log1p(double x)
Definition: SYS_FPUMath.h:93
SYS_API double tanh(double x)
Definition: SYS_FPUMath.h:103
SYS_API double tan(double x)
Definition: SYS_FPUMath.h:75
IMATH_HOSTDEVICE constexpr int ceil(T x) IMATH_NOEXCEPT
Definition: ImathFun.h:119
SYS_API double atan(double x)
Definition: SYS_FPUMath.h:77
OIIO_FORCEINLINE T log(const T &v)
Definition: simd.h:7688
SYS_API double atanh(double x)
SYS_API double sin(double x)
Definition: SYS_FPUMath.h:71