#ifndef __cuvec4f_HPP__
#define __cuvec4f_HPP__

namespace amscuda
{

    class cuvec4f
    {
        public:
        float x;
        float y;
        float z;
        float w;

        __host__ __device__ cuvec4f();
        __host__ __device__ ~cuvec4f();
        __host__ __device__ cuvec4f(float _x, float _y, float _z, float _w);
                
        __host__ __device__ float& operator[](const int I);
        __host__ __device__ const float& operator[](const int I) const;

        __host__ __device__ cuvec4f operator+(cuvec4f lhs);
        __host__ __device__ cuvec4f operator-(cuvec4f lhs);
        __host__ __device__ cuvec4f operator*(float lhs);
        __host__ __device__ cuvec4f operator/(float lhs);
        __host__ __device__ friend cuvec4f operator-(cuvec4f rhs);
    };

    class cumat4f
    {
        public:
        float dat[16];

        __host__ __device__ cumat4f();
        __host__ __device__ ~cumat4f();
        __host__ __device__ float& operator[](const int I);
        __host__ __device__ float& operator()(const int I, const int J);
        __host__ __device__ float& at(const int I, const int J);

        __host__ __device__ cumat4f operator+(cumat4f lhs);
        __host__ __device__ cumat4f operator-(cumat4f lhs);
        __host__ __device__ cumat4f operator*(float lhs);
        __host__ __device__ cumat4f operator/(float lhs);
        __host__ __device__ cuvec4f operator*(cuvec4f lhs);
        __host__ __device__ cumat4f operator*(cumat4f lhs);
        __host__ __device__ friend cumat4f operator-(cumat4f rhs);

        __host__ __device__ float det();
        __host__ __device__ cumat4f transpose();
        __host__ __device__ cumat4f inverse();
    };

    __host__ __device__ float cuvec4f_dot(cuvec4f a, cuvec4f b);
    __host__ __device__ float cuvec4f_norm(cuvec4f a);
    __host__ __device__ cuvec4f cuvec4f_normalize(cuvec4f a);
    __host__ __device__ cuvec4f cuvec4f_proj(cuvec4f a, cuvec4f b);


};

#endif

