Commit 82875d54 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Implementing matrix formats in CUDA.

parent 190cc1a7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -39,6 +39,13 @@ class tnlSharedArray : public tnlObject

   tnlSharedArray();

   tnlSharedArray( Element* _data,
                   const Index _size );

   tnlSharedArray( tnlArray< Element, Device, Index >& array );

   tnlSharedArray( tnlSharedArray< Element, Device, Index >& array );

   tnlString getType() const;

   void bind( Element* _data,
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#define TNLSHAREDVECTOR_H_

#include <core/arrays/tnlSharedArray.h>
#include <core/vectors/tnlVector.h>

class tnlHost;

@@ -33,6 +34,15 @@ class tnlSharedVector : public tnlSharedArray< Real, Device, Index >
   typedef Device DeviceType;
   typedef Index IndexType;

   tnlSharedVector();

   tnlSharedVector( Real* data,
                    const Index size );

   tnlSharedVector( tnlVector< Real, Device, Index >& vector );

   tnlSharedVector( tnlSharedVector< Real, Device, Index >& vector );

   tnlString getType() const;

   tnlString getTypeVirtual() const;
+2 −2
Original line number Diff line number Diff line
@@ -227,8 +227,8 @@ tnlArray< Element, Device, Index >&
                << "Source size: " << array. getSize() << endl
                << "Target name: " << this -> getName() << endl
                << "Target size: " << this -> getSize() << endl );
   tnlArrayOperations< typename Array :: DeviceType,
                       Device > ::
   tnlArrayOperations< Device,
                       typename Array :: DeviceType > ::
    template copyMemory< Element,
                         typename Array :: ElementType,
                         typename Array :: IndexType >
+26 −1
Original line number Diff line number Diff line
@@ -38,6 +38,31 @@ tnlSharedArray< Element, Device, Index > :: tnlSharedArray()
{
};

template< typename Element,
          typename Device,
          typename Index >
tnlSharedArray< Element, Device, Index >::tnlSharedArray( Element* _data,
                                                          const Index _size )
{
   this->bind( _data, _size );
}

template< typename Element,
          typename Device,
          typename Index >
tnlSharedArray< Element, Device, Index >::tnlSharedArray( tnlArray< Element, Device, Index >& array )
{
   this->bind( array );
}

template< typename Element,
          typename Device,
          typename Index >
tnlSharedArray< Element, Device, Index >::tnlSharedArray( tnlSharedArray< Element, Device, Index >& array )
{
   this->bind( array );
}

template< typename Element,
          typename Device,
          typename Index >
+32 −0
Original line number Diff line number Diff line
@@ -20,6 +20,38 @@

#include <core/vectors/tnlVectorOperations.h>

template< typename Real,
          typename Device,
          typename Index >
tnlSharedVector< Real, Device, Index >::tnlSharedVector()
{
}

template< typename Real,
          typename Device,
          typename Index >
tnlSharedVector< Real, Device, Index >::tnlSharedVector( Real* data,
                                                         const Index size )
: tnlSharedArray< Real, Device, Index >( data, size )
{
}

template< typename Real,
          typename Device,
          typename Index >
tnlSharedVector< Real, Device, Index >::tnlSharedVector( tnlVector< Real, Device, Index >& vector )
: tnlSharedArray< Real, Device, Index >( vector )
{
}

template< typename Real,
          typename Device,
          typename Index >
tnlSharedVector< Real, Device, Index >::tnlSharedVector( tnlSharedVector< Real, Device, Index >& vector )
: tnlSharedArray< Real, Device, Index >( vector )
{
}

template< typename Real,
          typename Device,
          typename Index >
Loading