Code revision

TODO list for the code revison:

  • renaming _impl.h files to .hpp
  • change boolean return type to exception throwing
  • change boolean flag style parameters into enum class
  • use operators << and >> insteal of File.read and File.write where it makes sense
  • add exception NotImplementedError and use it instead of codes like this:
    std::cerr << "Type conversion during saving is not implemented for MIC." << std::endl;
    abort();
    Or this:
    TNL_ASSERT( false, std::cerr << "TODO: implement" );
  • Documentation: indicate which functions/methods throw which exceptions
  • Remove useless types from the public interface of classes:
    • ThisType - useless for the outside of the class, and the implementation of methods can simply use the class name
  • switch to C++14

  • String
  • Timer
  • Object
    • change bool save and load to void
  • File
    • Update examples, add data conversion.
    • use TransferBufferSize from Devices::Cuda
    • Remove File::Mode enum, use std::ios_base::openmode directly
    • Remove specific exceptions (ArrayWrongSize, MeshFunctionDataMismatch, NotTNLFile, ObjectTypeDetectionFailure, ObjectTypeMismatch) - all save/load methods should throw only FileSerializationError/FileDeserializationError
  • FileName
  • Array
    • Add method for setting array elements using lambda function
    • Copy constructor have to make deep copy - DOES NOT WORK with MultiMap yet
    • Add copy constructors from std::list, std::vector and std::initializer_list
    • Replace bind methods with ArrayView - after refactoring MeshFunction
    • Avoid binding in Array( const Array&, const Index begin, const Index size );
    • Remove boundLoad (used only in Array and derived objects, loading via ArrayView can be used instead: array.getView().load( file );)
    • Use operator<< and operator>> instead of save and load methods
    • Delete operator bool ()
  • ArrayView
    • what about __cuda_callable__ ArrayView assignment?
    • Use operator<< and operator>> instead of save and load methods
  • StaticVector
    • Replace all for loops with static loops, i.e. templated for
    • u * v should not be dot product but element-wisi multiplication
    • use (u,v) for dot product
  • Vector
    • Vector should have the same serialization type as Array so that arrays can be loaded into vectors and vice versa
    • Delete methods for vector operations which are used in linear solvers - the replacement in the solvers must be tested carefuly
    • Implement DistributedVectorExpressions and DistributedVectorViewExpressions
    • On some places the method getView() is used because DistributedVectorExpressions are not implemented yet (mainly linear solvers and BLAS benchmark) - all occurences can be deleted later
    • Add constructor from expression template
  • Remove MultiVector and MultiArray - after refactoring Cameo - summer 2019
  • Parallel reduction
    • Use auto in lambdas to avoid volatileReduction - it does not work with CUDA 10.0
    • Rewrite multi-reduction with lambdas
  • ConfigDescription
  • ParameterContainer
    • allow any types (currently only int, double, bool, String)
    • allow easy instantiation without the command-line parser (e.g. to pass a dict from python)
    • exceptions when accessing unknown parameters
  • Logger
  • Pointers
  • Matrices
    • fix getSerializationType the same way as in Array
    • rename the method setCompressedRowLengths to setRowCapacities
    • implement sparse matrices using Segments
    • implement CSR matrix and Ellpack matrix using the Segments, use existing unit tests for debugging
    • implement set/addRow using VectorView and lambda functions
    • implement "Lambda matrix" - the element values are given by a lambda function
    • implement constructor from initializer list to DenseMatrix
    • implement method for setting elements from initializer list to sparse matrix
    • implement constructor and method for setting elements from std::map similar to initializer list to sparse matrix
    • update dense matrix multiplication with the new dense matrix implementation
    • update dense matrix transposition with the new dense matrix implementation
    • move methods for matrux coloring outside the matrices
    • finish DenseMatrixView::getRowVectorProduct
    • implement opertor == for matrices
    • Add constructor of matrix views from vector views
  • Allocators
Edited by Jakub Klinkovský