1
///////////////////////////////////////////////////////////////////////////
3
// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
6
// All rights reserved.
8
// Redistribution and use in source and binary forms, with or without
9
// modification, are permitted provided that the following conditions are
11
// * Redistributions of source code must retain the above copyright
12
// notice, this list of conditions and the following disclaimer.
13
// * Redistributions in binary form must reproduce the above
14
// copyright notice, this list of conditions and the following disclaimer
15
// in the documentation and/or other materials provided with the
17
// * Neither the name of Industrial Light & Magic nor the names of
18
// its contributors may be used to endorse or promote products derived
19
// from this software without specific prior written permission.
21
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
///////////////////////////////////////////////////////////////////////////
37
#ifndef INCLUDED_IMATHPLATFORM_H
38
#define INCLUDED_IMATHPLATFORM_H
40
//----------------------------------------------------------------------------
44
// This file contains functions and constants which aren't
45
// provided by the system libraries, compilers, or includes on
47
//----------------------------------------------------------------------------
51
#if defined(PLATFORM_WINDOWS)
53
#define M_PI 3.14159265358979323846
57
//-----------------------------------------------------------------------------
59
// Fixes for the "restrict" keyword. These #ifdef's for detecting
60
// compiler versions courtesy of Boost's select_compiler_config.hpp;
61
// here is the copyright notice for that file:
63
// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
64
// and distribute this software is granted provided this copyright notice
65
// appears in all copies. This software is provided "as is" without express
66
// or implied warranty, and with no claim as to its suitability for any
69
// Some compilers support "restrict", in which case we do nothing.
70
// Other compilers support some variant of it (e.g. "__restrict").
71
// If we don't know anything about the compiler, we define "restrict"
74
//-----------------------------------------------------------------------------
77
#if !defined(restrict)
78
#define restrict __restrict
81
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
82
// supports restrict, do nothing.
85
// supports restrict, do nothing.
92
#endif // INCLUDED_IMATHPLATFORM_H