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

Refactoring grids.

parent 8c85fe61
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -16,8 +16,12 @@ TODO: implementace maticovych resicu
      * TFQMR metoda
      * IDR metody 

TODO: Nahradit sablonovy parametr dimenze sitove entity za typ entity. V pripade hran gridu, by ty v sobe mohly mit i orientaci.
      Asi by to bylo vyhodne i pro site se smisenym typem entit. 
TODO: Nahradit sablonovy parametr dimenze sitove entity za typ entity. Pak by se mohlo zkusit, napriklad u gridu
      odvozovat entity, ktere obsahuji predpocitane indexy pro dopredne, zpetne, nebo centralni diference. Uzivatel
      by si mohl definovat vlastni entity. Mohlo by to zvysit efektivitu.
      U nestrukturovanych siti by se do entit mohly doplnovat ukazatele na struktury s dalsimi informacemi jako 
      objemy nebo delky entyt apod.
      za tim ucelem nahradit setIndex v grdi entity za update(), aby to bylo obecnejsi

TODO: implementovat tridu tnlFileName pro generovani jmen souboru

+7 −6
Original line number Diff line number Diff line
@@ -8,11 +8,11 @@ WITH_TESTS="yes"
WITH_CUDA_ARCH="auto"
WITH_CUBLAS="no"
WITH_TEMPLATE_INSTANTIATION="yes"
INSTANTIATE_LONG_INT="yes"
INSTANTIATE_LONG_INT="no"
INSTANTIATE_INT="yes"
INSTANTIATE_LONG_DOUBLE="yes"
INSTANTIATE_LONG_DOUBLE="no"
INSTANTIATE_DOUBLE="yes"
INSTANTIATE_FLOAT="yes"
INSTANTIATE_FLOAT="no"
CMAKE="cmake"
CMAKE_ONLY="no"
HELP="no"
@@ -35,11 +35,11 @@ do
        --instantiate-long-double=*    ) INSTANTIATE_LONG_DOUBLE="${option#*=}" ;;
        --instantiate-double=*         ) INSTANTIATE_DOUBLE="${option#*=}" ;;
        --instantiate-float=*          ) INSTANTIATE_FLOAT="${option#*=}" ;;
        --fast-build                   ) INSTANTIATE_LONG_INT="no"
        --full-build                   ) INSTANTIATE_LONG_INT="yes"
                                         INSTANTIATE_INT="yes"
                                         INSTANTIATE_LONG_DOUBLE="no"
                                         INSTANTIATE_LONG_DOUBLE="yes"
                                         INSTANTIATE_DOUBLE="yes"
                                         INSTANTIATE_FLOAT="no";;
                                         INSTANTIATE_FLOAT="yes";;
        --with-cmake=*                 ) CMAKE="${option#*=}" ;;
        --build-jobs=*                 ) BUILD_JOBS="${option#*=}" ;;
        --cmake-only=*                 ) CMAKE_ONLY="${option#*=}" ;;
@@ -62,6 +62,7 @@ then
    echo "   --with-cuda=yes/no                    Enable CUDA. 'yes' by default (CUDA Toolkit is required)."
    echo "   --with-cuda-arch=all/auto/30/35/...   Choose CUDA architecture."   
    echo "   --with-templates-instantiation=yes/no Some TNL templates are precompiled during the build. 'yes' by default."
    echo "   --full-build                          Instantiate all -- long int indexing, float and long double floating point arithmetics."
    echo "   --with-cmake=CMAKE                    Path to cmake. 'cmake' by default."
    echo "   --build-jobs=NUM                      Number of processes to be used for the build. It is set to a number of CPU cores by default."
    echo "   --verbose                             It enables verbose build."
+16 −0
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ class tnlStaticArray
   __cuda_callable__
   inline bool operator != ( const Array& array ) const;
         
   template< typename OtherElement >
   __cuda_callable__
   operator tnlStaticArray< Size, OtherElement >() const;

   __cuda_callable__
   inline void setValue( const ElementType& val );

@@ -156,6 +160,10 @@ class tnlStaticArray< 1, Element >
   __cuda_callable__
   inline bool operator != ( const Array& array ) const;
   
   template< typename OtherElement >
   __cuda_callable__
   operator tnlStaticArray< 1, OtherElement >() const;   

   __cuda_callable__
   inline
   void setValue( const ElementType& val );
@@ -245,6 +253,10 @@ class tnlStaticArray< 2, Element >
   __cuda_callable__
   inline bool operator != ( const Array& array ) const;
   
   template< typename OtherElement >
   __cuda_callable__
   operator tnlStaticArray< 2, OtherElement >() const;   

   __cuda_callable__
   inline void setValue( const ElementType& val );

@@ -341,6 +353,10 @@ class tnlStaticArray< 3, Element >
   __cuda_callable__
   inline bool operator != ( const Array& array ) const;
   
   template< typename OtherElement >
   __cuda_callable__
   operator tnlStaticArray< 3, OtherElement >() const;

   __cuda_callable__
   inline void setValue( const ElementType& val );

+12 −0
Original line number Diff line number Diff line
@@ -143,6 +143,18 @@ inline bool tnlStaticArray< 1, Element >::operator != ( const Array& array ) con
   return ! this->operator == ( array );
}

template< typename Element >
   template< typename OtherElement >
__cuda_callable__
tnlStaticArray< 1, Element >::
operator tnlStaticArray< 1, OtherElement >() const
{
   tnlStaticArray< 1, OtherElement > aux;
   aux[ 0 ] = data[ 0 ];
   return aux;
}


template< typename Element >
__cuda_callable__
inline void tnlStaticArray< 1, Element >::setValue( const ElementType& val )
+12 −0
Original line number Diff line number Diff line
@@ -172,6 +172,18 @@ inline bool tnlStaticArray< 2, Element >::operator != ( const Array& array ) con
   return ! this->operator == ( array );
}

template< typename Element >
   template< typename OtherElement >
__cuda_callable__
tnlStaticArray< 2, Element >::
operator tnlStaticArray< 2, OtherElement >() const
{
   tnlStaticArray< 2, OtherElement > aux;
   aux[ 0 ] = data[ 0 ];
   aux[ 1 ] = data[ 1 ];
   return aux;
}

template< typename Element >
__cuda_callable__
inline void tnlStaticArray< 2, Element >::setValue( const ElementType& val )
Loading