gwnavruntime/kernel/SF_SIMD.h Source File

SF_SIMD.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 /**************************************************************************
8 
9 Filename : KY_SIMD.h
10 Content : Defines and includes for SIMD functionality.
11 Created : Dec 2010
12 Authors : Bart Muzzin
13 
14 **************************************************************************/
15 
16 #ifndef INC_KY_SF_SIMD_H
17 #define INC_KY_SF_SIMD_H
18 #pragma once
19 
22 
23 // Forward defines.
24 // Vector4f typedef for 128 bit register for floating point data.
25 // Vector4i typedef for 128 bit register for integer data.
26 // KY_SIMD_ALIGN required alignment attribute for any data used by SIMD operations.
27 // IS typedef for the default SIMD instruction set for a platform. This should
28 // be something that is minimally supported on the platform.
29 
30 #if defined(KY_ENABLE_SIMD)
31  #if defined (KY_CPU_SSE)
33  #elif defined(KY_OS_XBOX360)
35  #elif defined(KY_CPU_ALTIVEC)
37  #elif defined(KY_CPU_ARM_NEON) && !defined(KY_OS_PSVITA)
38  #include "gwnavruntime/kernel/SF_SIMD_ARMNeon.h"
39  #else
40  // Your platform does not support any SIMD processor - disabling.
41  #undef KY_ENABLE_SIMD
42  #endif
43 #endif // KY_ENABLE_SIMD
44 
45 
46 #if !defined(KY_ENABLE_SIMD)
47 
48  #define KY_SIMD_ALIGN(x) x // No alignment for non-SIMD platforms.
49 
50  // Prefetch/Obj are special cases, are used mainly within functions, so make them available
51  // always, even if they don't do anything.
52 namespace Kaim { namespace SIMD
53  {
54  class InstructionSet
55  {
56  public:
57  static void Prefetch( const void * /*p*/, int /*offset*/ ) { }
58  template<class T>
59  static void PrefetchObj( const T * /*obj*/ ) { }
60  };
61  typedef InstructionSet IS;
62  }}
63 #endif
64 
65 
66 #endif // INC_KY_SF_SIMD_H
Definition: gamekitcrowddispersion.h:20