Define the "float6" in TypeDef.h

Hi, Ahsry. I defined a new float6 in TypesDef.h. But when I recompiled the src file, there was an error. The error is "identifier "float6" is undefined DualSPHysics4.2 c:\users\dell\desktop\src\source\JSphGpu_ker.h".

Additionally, the "float6" was defined as follows. Could you tell me where is the error?

///Structure of 6 variables of type float.
typedef struct {
float x, y, z, w, u, q;
}tfloat6;

inline tfloat6 TFloat6(float v) { tfloat6 p = { v,v,v,v,v,v }; return(p); }
inline tfloat6 TFloat6(float x, float y, float z, float w, float u, float q) { tfloat6 p = { x,y,z,w,u,q }; return(p); }
inline bool operator ==(const tfloat6& a, const tfloat6& b) { return(a.x == b.x&&a.y == b.y&&a.z == b.z&&a.w == b.w&&a.u == b.u&&a.q == b.q); }
inline bool operator !=(const tfloat6& a, const tfloat6& b) { return(a.x != b.x || a.y != b.y || a.z != b.z || a.w != b.w || a.u != b.u || a.q != b.q); }
inline tfloat6 operator +(const tfloat6& a, const tfloat6& b) { return(TFloat6(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w, a.u + b.u, a.q + b.q)); }
inline tfloat6 operator -(const tfloat6& a, const tfloat6& b) { return(TFloat6(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w, a.u - b.u, a.q - b.q)); }
inline tfloat6 operator *(const tfloat6& a, const tfloat6& b) { return(TFloat6(a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w, a.u*b.u, a.q*b.q)); }
inline tfloat6 operator /(const tfloat6& a, const tfloat6& b) { return(TFloat6(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w, a.u / b.u, a.q / b.q)); }

Comments

Sign In or Register to comment.