HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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)
SYS_API double fmod(double x, double y)
SYS_API double atan2(double y, double x)
SYS_API double expm1(double x)
int trunc(T x)
Definition: ImathFun.h:165
SYS_API double log10(double x)
SYS_API double pow(double x, double y)
SYS_API double log(double x)
SYS_API double asin(double x)
SYS_API double acosh(double x)
SYS_API double sinh(double x)
SYS_API double cosh(double x)
SYS_API double exp(double x)
SYS_API double acos(double x)
SYS_API double hypot(double x, double y)
int floor(T x)
Definition: ImathFun.h:150
SYS_API double log1p(double x)
SYS_API double tanh(double x)
SYS_API double tan(double x)
SYS_API double atan(double x)
int ceil(T x)
Definition: ImathFun.h:158
SYS_API double atanh(double x)
SYS_API double sin(double x)