Commit d17aed75 authored by Hakim Fadil's avatar Hakim Fadil
Browse files

This patch resolves the windows compilations issues.

parent 69f0ec6b
......@@ -29,7 +29,7 @@
class dtkComposerNodeCommunicatorInitPrivate;
class DTKCOMPOSER_EXPORT dtkComposerNodeCommunicatorInit : public dtkComposerNodeLeaf
class dtkComposerNodeCommunicatorInit : public dtkComposerNodeLeaf
{
public:
dtkComposerNodeCommunicatorInit(void);
......
......@@ -22,7 +22,35 @@
#include <dtkCore/dtkAbstractData.h>
class dtkDistributedCommunicatorPrivate;
class dtkDistributedCommunicatorStatus;
class dtkDistributedCommunicatorStatusPrivate;
class DTKDISTRIBUTED_EXPORT dtkDistributedCommunicatorStatus
{
public:
dtkDistributedCommunicatorStatus(void);
virtual ~dtkDistributedCommunicatorStatus(void);
public:
dtkDistributedCommunicatorStatus(const dtkDistributedCommunicatorStatus& other);
dtkDistributedCommunicatorStatus& operator = (const dtkDistributedCommunicatorStatus& other);
public:
int tag(void) const;
qint64 count(void) const;
qint16 source(void) const;
int error(void) const;
public:
void setTag(int tag);
void setCount(qint64 count);
void setSource(qint16 source);
void setError(int error);
private:
dtkDistributedCommunicatorStatusPrivate *d;
};
class DTKDISTRIBUTED_EXPORT dtkDistributedCommunicator : public QObject
{
......@@ -152,38 +180,6 @@ private:
dtkDistributedCommunicatorPrivate *d;
};
class dtkDistributedCommunicatorStatusPrivate;
class DTKDISTRIBUTED_EXPORT dtkDistributedCommunicatorStatus
{
public:
dtkDistributedCommunicatorStatus(void);
virtual ~dtkDistributedCommunicatorStatus(void);
public:
dtkDistributedCommunicatorStatus(const dtkDistributedCommunicatorStatus& other);
dtkDistributedCommunicatorStatus& operator = (const dtkDistributedCommunicatorStatus& other);
public:
int tag(void) const;
qint64 count(void) const;
qint16 source(void) const;
int error(void) const;
public:
void setTag(int tag);
void setCount(qint64 count);
void setSource(qint16 source);
void setError(int error);
private:
dtkDistributedCommunicatorStatusPrivate *d;
};
Q_DECLARE_METATYPE(dtkDistributedCommunicator);
Q_DECLARE_METATYPE(dtkDistributedCommunicator *);
......
......@@ -838,3 +838,22 @@ bool dtkGreaterThanOrAlmostEqualUlps(double A, double B, int64_t maxUlps)
else
return true;
}
template <> long double norm_func(const dtkVector<long double> & val)
{
long double elemResult = dtkZero<long double>();
elemResult = (val)*(val);
return sqrt( elemResult );
}
template <> inline float norm_func(const dtkVector<float> & val)
{
float elemResult = dtkZero<float>();
elemResult = (val)*(val);
return sqrt( elemResult );
}
\ No newline at end of file
......@@ -127,15 +127,20 @@ template <class T> T dtkVector<T>::operator *(const dtkVector<T>& vec) const
return elemResult;
}
template <class T> T dtkVector<T>::norm(void) const
template <typename T> inline T norm_func(const dtkVector<T> & val)
{
T elemResult = dtkZero<T>();
double elemResult = dtkZero<T>();
elemResult = (*this)*(*this);
elemResult = (val)*(val);
return sqrt( elemResult );
}
template <typename T> T dtkVector<T>::norm(void) const
{
return norm_func(*this);
}
template <class T> inline dtkVector<T> operator *(const T& value, const dtkVector<T>& vec)
{
return vec*value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment