Linux build.

This commit is contained in:
mfeemster 2015-11-22 17:03:11 -08:00
parent 330074cfb2
commit 5e82167155
10 changed files with 34 additions and 27 deletions

View File

@ -51,7 +51,8 @@ HEADERS += \
../../../Source/Ember/Variations03.h \
../../../Source/Ember/Variations04.h \
../../../Source/Ember/Variations05.h \
../../../Source/Ember/VariationsDC.h \
../../../Source/Ember/Variations06.h \
../../../Source/Ember/VariationsDC.h \
../../../Source/Ember/Xform.h \
../../../Source/Ember/XmlToEmber.h \
../../../Source/Ember/EmberMotion.h

View File

@ -18,6 +18,7 @@ SOURCES += \
../../../Source/EmberCL/DllMain.cpp \
../../../Source/EmberCL/DEOpenCLKernelCreator.cpp \
../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp \
../../../Source/EmberCL/FunctionMapper.cpp \
../../../Source/EmberCL/IterOpenCLKernelCreator.cpp \
../../../Source/EmberCL/OpenCLInfo.cpp \
../../../Source/EmberCL/OpenCLWrapper.cpp \
@ -33,6 +34,7 @@ HEADERS += \
../../../Source/EmberCL/EmberCLPch.h \
../../../Source/EmberCL/EmberCLStructs.h \
../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.h \
../../../Source/EmberCL/FunctionMapper.h \
../../../Source/EmberCL/IterOpenCLKernelCreator.h \
../../../Source/EmberCL/OpenCLInfo.h \
../../../Source/EmberCL/OpenCLWrapper.h \

View File

@ -5,7 +5,7 @@
namespace EmberNs
{
template<> unique_ptr<QTIsaac<ISAAC_SIZE, ISAAC_INT>> QTIsaac<ISAAC_SIZE, ISAAC_INT>::GlobalRand = unique_ptr<QTIsaac<ISAAC_SIZE, ISAAC_INT>>(new QTIsaac<ISAAC_SIZE, ISAAC_INT>());
CriticalSection QTIsaac<ISAAC_SIZE, ISAAC_INT>::m_CS;
template<> CriticalSection QTIsaac<ISAAC_SIZE, ISAAC_INT>::m_CS = CriticalSection();
}
#include "Curves.h"

View File

@ -31,11 +31,11 @@
#if defined(__APPLE__) || defined(_MSC_VER)
#define sincos(x, s, c) *(s)=std::sin(x); *(c)=std::cos(x);
#else
/*static void sincos(float x, float* s, float* c)
static void sincos(float x, float* s, float* c)
{
*s = std::sin(x);
*c = std::cos(x);
}*/
}
#endif
namespace EmberNs

View File

@ -840,7 +840,6 @@ eRenderStatus Renderer<T, bucketT>::LogScaleDensityFilter(bool forceOutput)
{
size_t startRow = 0;
size_t endRow = m_SuperRasH;
size_t startCol = 0;
size_t endCol = m_SuperRasW;
//Timing t(4);

View File

@ -1690,6 +1690,20 @@ private:
bool m_IsState;//Whether the parameter changes state between iterations. This is also considered precalc.
};
#define VARUSINGS \
using Variation<T>::m_Weight; \
using Variation<T>::m_Xform; \
using Variation<T>::m_VariationId; \
using Variation<T>::m_Name; \
using Variation<T>::m_VarType; \
using Variation<T>::m_AssignType; \
using Variation<T>::SetType; \
using Variation<T>::IndexInXform; \
using Variation<T>::XformIndexInEmber; \
using Variation<T>::Prefix; \
using Variation<T>::Precalc; \
using Variation<T>::StateOpenCLString;
/// <summary>
/// Parametric variations use parameters in addition to weight.
/// These values are stored in members of derived classes, however
@ -1700,9 +1714,9 @@ private:
template <typename T>
class EMBER_API ParametricVariation : public Variation<T>
{
using Variation<T>::Precalc;
public:
VARUSINGS
/// <summary>
/// Constructor which takes arguments and just passes them to the base class.
/// </summary>
@ -1990,18 +2004,6 @@ protected:
/// Defining assignment operators isn't really needed because Variations are always held as pointers.
/// </summary>
#define VARUSINGS \
using Variation<T>::m_Weight; \
using Variation<T>::m_Xform; \
using Variation<T>::m_VariationId; \
using Variation<T>::m_Name; \
using Variation<T>::m_VarType; \
using Variation<T>::m_AssignType; \
using Variation<T>::SetType; \
using Variation<T>::IndexInXform; \
using Variation<T>::XformIndexInEmber; \
using Variation<T>::Prefix;
#ifdef DO_DOUBLE
#define VARCOPYDOUBLE(name) \
virtual void Copy(Variation<double>*& var) const override \

View File

@ -3724,7 +3724,6 @@ public:
virtual string StateInitOpenCLString() const override
{
ostringstream ss, ss2;
intmax_t i = 0;
ss2 << "_" << XformIndexInEmber();
string stateIndex = ss2.str();
string prefix = Prefix();
@ -4151,7 +4150,6 @@ public:
virtual string StateInitOpenCLString() const override
{
ostringstream ss, ss2;
intmax_t i = 0;
ss2 << "_" << XformIndexInEmber();
string stateIndex = ss2.str();
string prefix = Prefix();

View File

@ -508,7 +508,7 @@ public:
virtual string OpenCLString() const override
{
ostringstream ss, ss2;
intmax_t i = 0, varIndex = IndexInXform();
intmax_t i = 0;
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string numEdges = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -1724,7 +1724,7 @@ public:
virtual string OpenCLString() const override
{
ostringstream ss, ss2;
intmax_t i = 0, varIndex = IndexInXform();
intmax_t i = 0;
ss2 << "_" << XformIndexInEmber() << "]";
string index = ss2.str();
string top = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
@ -2881,7 +2881,7 @@ public:
radius = helper.m_PrecalcSqrtSumSquares;
theta = helper.m_PrecalcAtanxy;
mu = Zeps<T>(SQR(m_SynthPower));
radius += -2 * mu * (int)((radius + mu) / (2 * mu)) + radius * (1 - mu);
radius += -2 * mu * int((radius + mu) / (2 * mu)) + radius * (1 - mu);
SynthSinCos(synth, radius, s, c, synthMode);
@ -2935,6 +2935,7 @@ public:
helper.Out.y = m_Weight * radius * c;
break;
default:
case MODE_SHIFTTHETA: // Power YES, Smooth NO
// Use (adjusted) radius to move point around circle
Vx = helper.In.x;
@ -3639,6 +3640,7 @@ private:
y *= M_2PI / frq;
x = 1 / Zeps<T>(std::cos(y)) - 1;
break;
default:
case WAVE_INGON:
y -= T(0.5);
y *= M_2PI / frq;
@ -3659,6 +3661,7 @@ private:
z = synthA + synth * x;
thetaFactor = (thetaFactor > z ? thetaFactor : z);
break;
default:
case LAYER_MIN:
z = synthA + synth * x;
thetaFactor = (thetaFactor < z ? thetaFactor : z);
@ -3760,6 +3763,7 @@ private:
{
case LERP_LINEAR:
return x * m;
default:
case LERP_BEZIER:
return BezierQuadMap(x, m);
}
@ -3777,6 +3781,7 @@ private:
s = s * SynthValue(synth, theta);
c = c * SynthValue(synth, theta + T(M_PI) / 2);
break;
default:
case SINCOS_MIXIN:
s = (1 - m_SynthMix) * s + (SynthValue(synth, theta) - 1);
c = (1 - m_SynthMix) * c + (SynthValue(synth, theta + T(M_PI) / 2) - 1);
@ -3829,4 +3834,4 @@ MAKEPREPOSTPARVAR(Octapol, octapol, OCTAPOL)
MAKEPREPOSTPARVAR(Crob, crob, CROB)
MAKEPREPOSTPARVAR(BubbleT3D, bubbleT3D, BUBBLET3D)
MAKEPREPOSTPARVAR(Synth, synth, SYNTH)
}
}

View File

@ -1366,7 +1366,7 @@ private:
/// <returns>The corrected name if one was found, else the passed in name.</returns>
static string GetCorrectedParamName(const unordered_map<string, string>& names, const char* name)
{
auto& newName = names.find(ToLower(name));
const auto& newName = names.find(ToLower(name));
if (newName != names.end())
return newName->second;

View File

@ -141,7 +141,7 @@ FunctionMapper::FunctionMapper()
const string* FunctionMapper::GetGlobalFunc(const string& func)
{
auto& text = m_GlobalMap.find(func);
const auto& text = m_GlobalMap.find(func);
if (text != m_GlobalMap.end())
return &text->second;