aboutsummaryrefslogtreecommitdiff
path: root/Gem/develop/include/Gem/Utils
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2017-12-18 17:52:51 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2017-12-18 17:52:51 +0000
commit790b58477460c3f73c723772a3639a97be410087 (patch)
tree3ccb15c5fff23d985e83e62c2f788580fa5f3c96 /Gem/develop/include/Gem/Utils
parentc886922cc0b8c32ead0459b581f51ff60fdebbd4 (diff)
Gem 56872f9347ef666944a3af62bbfda36a8c9f21b0 osx/x86_64
built 'master:56872f9347ef666944a3af62bbfda36a8c9f21b0' for osx/x86_64
Diffstat (limited to 'Gem/develop/include/Gem/Utils')
-rw-r--r--Gem/develop/include/Gem/Utils/Functions.h27
-rw-r--r--Gem/develop/include/Gem/Utils/GLUtil.h3
-rw-r--r--Gem/develop/include/Gem/Utils/Matrix.h6
-rw-r--r--Gem/develop/include/Gem/Utils/PixPete.h21
-rw-r--r--Gem/develop/include/Gem/Utils/nop.h7
5 files changed, 42 insertions, 22 deletions
diff --git a/Gem/develop/include/Gem/Utils/Functions.h b/Gem/develop/include/Gem/Utils/Functions.h
index dd76ea9..35721eb 100644
--- a/Gem/develop/include/Gem/Utils/Functions.h
+++ b/Gem/develop/include/Gem/Utils/Functions.h
@@ -160,7 +160,8 @@ inline unsigned char INT_MULT(unsigned int a, unsigned int b)
// Exactly LERPs two values
// This avoids a float value (important on Intel...)
// From Alvy Ray Smith paper
-inline unsigned char INT_LERP(unsigned int p, unsigned int q, unsigned int a)
+inline unsigned char INT_LERP(unsigned int p, unsigned int q,
+ unsigned int a)
{
return((unsigned char)(p + INT_MULT(a, q - p)));
}
@@ -256,7 +257,8 @@ inline int GetMirrored(int inValue,const int nMax)
// 2D-algebra
//
///////////////////////////////////////////////////////////////////////////////
-static inline void Get2dTangent(float inX,float inY,float* poutX,float* poutY)
+static inline void Get2dTangent(float inX,float inY,float* poutX,
+ float* poutY)
{
*poutX=inY;
*poutY=-inX;
@@ -300,7 +302,8 @@ inline float GetRandomFloat(void)
///////////////////////////////////////////////////////////////////////////////
GEM_EXTERN extern float smoothStep(float x, float a, float b);
GEM_EXTERN extern int smoothStep(int x, int a, int b);
-GEM_EXTERN extern unsigned char smoothStep(unsigned char x, unsigned char a, unsigned char b);
+GEM_EXTERN extern unsigned char smoothStep(unsigned char x,
+ unsigned char a, unsigned char b);
///////////////////////////////////////////////////////////////////////////////
// Bias function
@@ -329,8 +332,10 @@ GEM_EXTERN extern float gainFunc(float x, float a);
// npnts is the number of points per dimension.
//
///////////////////////////////////////////////////////////////////////////////
-GEM_EXTERN extern void linearFunc(float val, float *ret, int numDimen, int npnts, float *pnts);
-GEM_EXTERN extern void linearFunc(double val, double *ret, int numDimen, int npnts, double *pnts);
+GEM_EXTERN extern void linearFunc(float val, float *ret, int numDimen,
+ int npnts, float *pnts);
+GEM_EXTERN extern void linearFunc(double val, double *ret, int numDimen,
+ int npnts, double *pnts);
///////////////////////////////////////////////////////////////////////////////
// Spline function
@@ -346,8 +351,10 @@ GEM_EXTERN extern void linearFunc(double val, double *ret, int numDimen, int npn
// _Texturing and Modeling: A Procedural Approach_
// David S. Ebert, Ed.
///////////////////////////////////////////////////////////////////////////////
-GEM_EXTERN extern void splineFunc(float val, float *ret, int numDimen, int nknots, float *knot);
-GEM_EXTERN extern void splineFunc(double val, double *ret, int numDimen, int nknots, double *knot);
+GEM_EXTERN extern void splineFunc(float val, float *ret, int numDimen,
+ int nknots, float *knot);
+GEM_EXTERN extern void splineFunc(double val, double *ret, int numDimen,
+ int nknots, double *knot);
///////////////////////////////////////////////////////////////////////////////
@@ -402,9 +409,11 @@ GEM_EXTERN extern void splineFunc(double val, double *ret, int numDimen, int nkn
//Ian Ollman's function to determine the cache prefetch for altivec vec_dst()
#include <inttypes.h>
-inline uint32_t GetPrefetchConstant( int blockSizeInVectors, int blockCount, int blockStride )
+inline uint32_t GetPrefetchConstant( int blockSizeInVectors,
+ int blockCount, int blockStride )
{
- return ((blockSizeInVectors << 24) & 0x1F000000) | ((blockCount << 16) & 0x00FF0000) | (blockStride & 0xFFFF);
+ return ((blockSizeInVectors << 24) & 0x1F000000) | ((
+ blockCount << 16) & 0x00FF0000) | (blockStride & 0xFFFF);
}
#endif
diff --git a/Gem/develop/include/Gem/Utils/GLUtil.h b/Gem/develop/include/Gem/Utils/GLUtil.h
index 15b18c8..7dad69d 100644
--- a/Gem/develop/include/Gem/Utils/GLUtil.h
+++ b/Gem/develop/include/Gem/Utils/GLUtil.h
@@ -40,7 +40,8 @@ GEM_EXTERN extern GLenum glReportError (bool verbose=true);
GEM_EXTERN extern int getGLdefine(const char *name);
GEM_EXTERN extern int getGLdefine(const struct _symbol *name);
GEM_EXTERN extern int getGLdefine(const struct _atom *name);
-GEM_EXTERN extern int getGLbitfield(int argc, struct _atom *argv);
+GEM_EXTERN extern int getGLbitfield(int argc,
+ struct _atom *argv);
diff --git a/Gem/develop/include/Gem/Utils/Matrix.h b/Gem/develop/include/Gem/Utils/Matrix.h
index 4bc5c39..3e388c5 100644
--- a/Gem/develop/include/Gem/Utils/Matrix.h
+++ b/Gem/develop/include/Gem/Utils/Matrix.h
@@ -63,7 +63,8 @@ public:
void rotateZ(float degrees);
//////////
- void transform(float srcX, float srcY, float srcZ, float *dstX, float *dstY, float *dstZ) const;
+ void transform(float srcX, float srcY, float srcZ, float *dstX,
+ float *dstY, float *dstZ) const;
//////////
// The actual matrix values
@@ -71,7 +72,8 @@ public:
//////////
// Utility functions
- static void generateNormal(const float *v1, const float *v2, const float *v3, float *dst);
+ static void generateNormal(const float *v1, const float *v2,
+ const float *v3, float *dst);
};
diff --git a/Gem/develop/include/Gem/Utils/PixPete.h b/Gem/develop/include/Gem/Utils/PixPete.h
index c0d141a..2dd7ffc 100644
--- a/Gem/develop/include/Gem/Utils/PixPete.h
+++ b/Gem/develop/include/Gem/Utils/PixPete.h
@@ -84,7 +84,8 @@ typedef U32 PETE_PIXELDATA24;
typedef U16 PETE_PIXELDATA16;
#define SIZEOF_PETE_PIXELDATA16 (2)
-static inline void Pete_CopyAndConvert24BitTo32Bit(PETE_PIXELDATA24* pSource,PETE_PIXELDATA32* pOutput,int nPixelCount)
+static inline void Pete_CopyAndConvert24BitTo32Bit(PETE_PIXELDATA24*
+ pSource,PETE_PIXELDATA32* pOutput,int nPixelCount)
{
char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA24);
@@ -100,7 +101,8 @@ static inline void Pete_CopyAndConvert24BitTo32Bit(PETE_PIXELDATA24* pSource,PET
}
}
-static inline void Pete_CopyAndConvert32BitTo24Bit(PETE_PIXELDATA32* pSource,PETE_PIXELDATA24* pOutput,int nPixelCount)
+static inline void Pete_CopyAndConvert32BitTo24Bit(PETE_PIXELDATA32*
+ pSource,PETE_PIXELDATA24* pOutput,int nPixelCount)
{
char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA32);
@@ -116,12 +118,15 @@ static inline void Pete_CopyAndConvert32BitTo24Bit(PETE_PIXELDATA32* pSource,PET
}
}
-static inline void Pete_InPlaceConvert24BitTo32Bit(PETE_PIXELDATA24* pBuffer,int nPixelCount)
+static inline void Pete_InPlaceConvert24BitTo32Bit(PETE_PIXELDATA24*
+ pBuffer,int nPixelCount)
{
char* pBufferStart=(char*)pBuffer;
- char* pBuffer32Current=(pBufferStart+((nPixelCount-1)*SIZEOF_PETE_PIXELDATA32));
- char* pBuffer24Current=(pBufferStart+((nPixelCount-1)*SIZEOF_PETE_PIXELDATA24));
+ char* pBuffer32Current=(pBufferStart+((nPixelCount-1)
+ *SIZEOF_PETE_PIXELDATA32));
+ char* pBuffer24Current=(pBufferStart+((nPixelCount-1)
+ *SIZEOF_PETE_PIXELDATA24));
while (pBuffer32Current>=pBufferStart) {
@@ -133,7 +138,8 @@ static inline void Pete_InPlaceConvert24BitTo32Bit(PETE_PIXELDATA24* pBuffer,int
}
}
-static inline void Pete_CopyAndConvert16Bit565To32Bit(PETE_PIXELDATA16* pSource,PETE_PIXELDATA32* pOutput,int nPixelCount)
+static inline void Pete_CopyAndConvert16Bit565To32Bit(
+ PETE_PIXELDATA16* pSource,PETE_PIXELDATA32* pOutput,int nPixelCount)
{
char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA16);
@@ -167,7 +173,8 @@ static inline void Pete_CopyAndConvert16Bit565To32Bit(PETE_PIXELDATA16* pSource,
}
-static inline void Pete_CopyAndConvert32BitTo16Bit565(PETE_PIXELDATA32* pSource,PETE_PIXELDATA16* pOutput,int nPixelCount)
+static inline void Pete_CopyAndConvert32BitTo16Bit565(
+ PETE_PIXELDATA32* pSource,PETE_PIXELDATA16* pOutput,int nPixelCount)
{
char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA32);
diff --git a/Gem/develop/include/Gem/Utils/nop.h b/Gem/develop/include/Gem/Utils/nop.h
index 8431ef2..75875ef 100644
--- a/Gem/develop/include/Gem/Utils/nop.h
+++ b/Gem/develop/include/Gem/Utils/nop.h
@@ -15,10 +15,11 @@ LOG
#ifndef _INCLUDE__GEM_UTILS_NOP_H_
#define _INCLUDE__GEM_UTILS_NOP_H_
-#if __STDC_VERSION__ >= 199901L
-# define nop(...)
+#if __cplusplus > 199711L || __STDC_VERSION__ >= 199901L
+# define nop(...) do {} while (0)
#else
-# define nop
+static inline void gem__nop(...) { ; }
+# define nop gem__nop
#endif
static inline void gem__nop_post(void) { ; }