Commit 850ecc22 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Debuging multi array for CUDA.

parent a950ebc3
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ class tnlMultiArray< 1, Element, Device, Index > : public tnlArray< Element, Dev
   bool setDimensions( const tnlTuple< 1, Index >& dimensions );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   void getDimensions( Index& iSize ) const;

@@ -66,7 +66,7 @@ class tnlMultiArray< 1, Element, Device, Index > : public tnlArray< Element, Dev
   bool setLike( const MultiArray& v );
   
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   Index getElementIndex( const Index i ) const;

@@ -140,12 +140,12 @@ class tnlMultiArray< 2, Element, Device, Index > : public tnlArray< Element, Dev
   bool setDimensions( const tnlTuple< 2, Index >& dimensions );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   void getDimensions( Index& jSize, Index& iSize ) const;

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   const tnlTuple< 2, Index >& getDimensions() const;

@@ -154,7 +154,7 @@ class tnlMultiArray< 2, Element, Device, Index > : public tnlArray< Element, Dev
   bool setLike( const MultiArray& v );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   Index getElementIndex( const Index j, const Index i ) const;

@@ -173,12 +173,12 @@ class tnlMultiArray< 2, Element, Device, Index > : public tnlArray< Element, Dev
    *  (GPU device usually).
    */
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   Element& operator()( const Index j, const Index i );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   const Element& operator()( const Index j, const Index i ) const;

@@ -232,12 +232,12 @@ class tnlMultiArray< 3, Element, Device, Index > : public tnlArray< Element, Dev
   bool setDimensions( const tnlTuple< 3, Index >& dimensions );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   void getDimensions( Index& k, Index& j, Index& iSize ) const;

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   const tnlTuple< 3, Index >& getDimensions() const;

@@ -246,7 +246,7 @@ class tnlMultiArray< 3, Element, Device, Index > : public tnlArray< Element, Dev
   bool setLike( const MultiArray& v );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   Index getElementIndex( const Index k, const Index j, const Index i ) const;

@@ -265,12 +265,12 @@ class tnlMultiArray< 3, Element, Device, Index > : public tnlArray< Element, Dev
    *  (GPU device usualy).
    */
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   Element& operator()( const Index k, const Index j, const Index i );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   const Element& operator()( const Index k, const Index j, const Index i ) const;

@@ -324,12 +324,12 @@ class tnlMultiArray< 4, Element, Device, Index > : public tnlArray< Element, Dev
   bool setDimensions( const tnlTuple< 4, Index >& dimensions );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   void getDimensions( Index& l, Index& k, Index& j, Index& iSize ) const;

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   const tnlTuple< 4, Index >& getDimensions() const;

@@ -338,7 +338,7 @@ class tnlMultiArray< 4, Element, Device, Index > : public tnlArray< Element, Dev
   bool setLike( const MultiArray& v );

#ifdef HAVE_CUDA
  // __device__ __host__
   __device__ __host__
#endif
   Index getElementIndex( const Index l, const Index k, const Index j, const Index i ) const;

@@ -357,12 +357,12 @@ class tnlMultiArray< 4, Element, Device, Index > : public tnlArray< Element, Dev
    *  (GPU device usualy).
    */
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   Element& operator()( const Index l, const Index k, const Index j, const Index i );

#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
   const Element& operator()( const Index l, const Index k, const Index j, const Index i ) const;

+2 −2
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ bool tnlMultiArray< 1, Element, Device, Index > :: setLike( const MultiArray& mu

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
void tnlMultiArray< 1, Element, Device, Index > :: getDimensions( Index& xSize ) const
{
@@ -91,7 +91,7 @@ const tnlTuple< 1, Index >& tnlMultiArray< 1, Element, Device, Index > :: getDim

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
Index tnlMultiArray< 1, Element, Device, Index > :: getElementIndex( const Index i ) const
{
+5 −5
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ bool tnlMultiArray< 2, Element, Device, Index > :: setLike( const MultiArray& mu

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
void tnlMultiArray< 2, Element, Device, Index > :: getDimensions( Index& jSize, Index& iSize ) const
{
@@ -94,7 +94,7 @@ void tnlMultiArray< 2, Element, Device, Index > :: getDimensions( Index& jSize,

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
const tnlTuple< 2, Index >& tnlMultiArray< 2, Element, Device, Index > :: getDimensions() const
{
@@ -103,7 +103,7 @@ const tnlTuple< 2, Index >& tnlMultiArray< 2, Element, Device, Index > :: getDim

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
Index tnlMultiArray< 2, Element, Device, Index > :: getElementIndex( const Index j, const Index i ) const
{
@@ -127,7 +127,7 @@ void tnlMultiArray< 2, Element, Device, Index > :: setElement( const Index j, co

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
Element& tnlMultiArray< 2, Element, Device, Index > :: operator()( const Index j, const Index i )
{
@@ -136,7 +136,7 @@ Element& tnlMultiArray< 2, Element, Device, Index > :: operator()( const Index j

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
const Element& tnlMultiArray< 2, Element, Device, Index > :: operator()( const Index j, const Index i ) const
{
+5 −5
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ bool tnlMultiArray< 3, Element, Device, Index > :: setLike( const MultiArray& mu

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
void tnlMultiArray< 3, Element, Device, Index > :: getDimensions( Index& kSize,
                                                                  Index& jSize,
@@ -102,7 +102,7 @@ void tnlMultiArray< 3, Element, Device, Index > :: getDimensions( Index& kSize,

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
const tnlTuple< 3, Index >& tnlMultiArray< 3, Element, Device, Index > :: getDimensions() const
{
@@ -111,7 +111,7 @@ const tnlTuple< 3, Index >& tnlMultiArray< 3, Element, Device, Index > :: getDim

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
Index tnlMultiArray< 3, Element, Device, Index > :: getElementIndex( const Index k,
                                                                     const Index j,
@@ -146,7 +146,7 @@ void tnlMultiArray< 3, Element, Device, Index > :: setElement( const Index k,

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
Element& tnlMultiArray< 3, Element, Device, Index > :: operator()( const Index k,
                                                                        const Index j,
@@ -157,7 +157,7 @@ Element& tnlMultiArray< 3, Element, Device, Index > :: operator()( const Index k

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
const Element& tnlMultiArray< 3, Element, Device, Index > :: operator()( const Index k,
                                                                               const Index j,
+5 −5
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ bool tnlMultiArray< 4, Element, Device, Index > :: setLike( const MultiArray& mu

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
void tnlMultiArray< 4, Element, Device, Index > :: getDimensions( Index& lSize,
                                                                       Index& kSize,
@@ -109,7 +109,7 @@ void tnlMultiArray< 4, Element, Device, Index > :: getDimensions( Index& lSize,

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
const tnlTuple< 4, Index >& tnlMultiArray< 4, Element, Device, Index > :: getDimensions() const
{
@@ -118,7 +118,7 @@ const tnlTuple< 4, Index >& tnlMultiArray< 4, Element, Device, Index > :: getDim

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
Index tnlMultiArray< 4, Element, Device, Index > :: getElementIndex( const Index l,
                                                                     const Index k,
@@ -158,7 +158,7 @@ void tnlMultiArray< 4, Element, Device, Index > :: setElement( const Index l,

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
Element& tnlMultiArray< 4, Element, Device, Index > :: operator()( const Index l,
                                                                        const Index k,
@@ -170,7 +170,7 @@ Element& tnlMultiArray< 4, Element, Device, Index > :: operator()( const Index l

template< typename Element, typename Device, typename Index >
#ifdef HAVE_CUDA
   //__device__ __host__
   __device__ __host__
#endif
const Element& tnlMultiArray< 4, Element, Device, Index > :: operator()( const Index l,
                                                                               const Index k,
Loading