Commit 02186958 authored by Kirill Terekhov's avatar Kirill Terekhov

Merge branch 'master' of https://github.com/INMOST-DEV/INMOST

parents d51a665d 846dd063
......@@ -39,7 +39,7 @@ option(USE_SOLVER_SUPERLU "Use SuperLU solver" OFF)
if( MSVC )
option(USE_MT "Use /MT switch instead of /MD switch for libraries generated with Visual Studio" OFF)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "/EHsc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
endif( MSVC )
add_subdirectory(Source)
......
......@@ -88,6 +88,7 @@ namespace INMOST
_iterator operator --(int){ return _iterator(e--); }
ptrdiff_t operator -(const _iterator & other) const {return e-other.e;}
etype & operator *() { return *e; }
const etype & operator *() const { return *e; }
etype * operator ->() { return e; }
_iterator & operator =(_iterator const & other) { e = other.e; return *this; }
bool operator ==(const _iterator & other) const { return e == other.e;}
......@@ -126,6 +127,7 @@ namespace INMOST
_reverse_iterator operator --(int){ return _reverse_iterator(e++); }
ptrdiff_t operator -(const _reverse_iterator & other) const {return other.e-e;}
etype & operator *() { return *e; }
const etype & operator *() const { return *e; }
etype * operator ->() { return e; }
_reverse_iterator & operator =(_reverse_iterator const & other) { e = other.e; return *this;}
bool operator ==(const _reverse_iterator & other) const { return e == other.e;}
......@@ -593,6 +595,7 @@ namespace INMOST
_reverse_iterator operator --(int){ return _reverse_iterator(e++); }
ptrdiff_t operator -(const _reverse_iterator & other) const {return other.e-e;}
dtype & operator *() { return *e; }
const dtype & operator *() const { return *e; }
dtype * operator ->() { return e; }
_reverse_iterator & operator =(_reverse_iterator const & other) { e = other.e; return *this;}
bool operator ==(const _reverse_iterator & other) { return e == other.e;}
......@@ -1574,6 +1577,7 @@ namespace INMOST
_iterator operator --(int){ return _iterator(e--); }
size_type operator -(const _iterator & other) const {return static_cast<size_type>(e-other.e);}
dtype & operator *() { return *e; }
const dtype & operator *() const { return *e; }
dtype * operator ->() { return e; }
_iterator & operator =(_iterator const & other) { e = other.e; return *this; }
bool operator ==(const _iterator & other) const { return e == other.e;}
......@@ -1612,6 +1616,7 @@ namespace INMOST
_reverse_iterator operator --(int){ return _reverse_iterator(e++); }
size_type operator -(const _reverse_iterator & other) const {return static_cast<size_type>(other.e-e);}
dtype & operator *() { return *e; }
const dtype & operator *() const { return *e; }
dtype * operator ->() { return e; }
_reverse_iterator & operator =(_reverse_iterator const & other) { e = other.e; return *this;}
bool operator ==(const _reverse_iterator & other) const { return e == other.e;}
......@@ -2054,6 +2059,7 @@ namespace INMOST
}
_iterator operator --(int){ _iterator ret = *this; --(*this); return ret; }
dtype & operator *() { return *it; }
const dtype & operator *() const { return *it; }
dtype * operator ->() { return &*it; }
_iterator & operator =(_iterator const & other) {it = other.it; cur_list = other.cur_list; lists = other.lists; return *this; }
bool operator ==(const _iterator & other) const { return it == other.it;}
......@@ -2095,6 +2101,7 @@ namespace INMOST
_reverse_iterator & operator --(){ --it; if(it == (*lists)[cur_list]->rbegin()-1 ) {++cur_list; if( cur_list < HSize ) it = (*lists)[cur_list]->rend()-1; else it = NULL;} return *this; }
_reverse_iterator operator --(int){ _iterator ret = *this; --(*this); return ret; }
dtype & operator *() { return *it; }
const dtype & operator *() const { return *it; }
dtype * operator ->() { return &*it; }
_reverse_iterator & operator =(_reverse_iterator const & other) {it = other.it; return *this;}
bool operator ==(const _reverse_iterator & other) { return it == other.it;}
......@@ -2329,6 +2336,7 @@ namespace INMOST
iterator operator --(int){ return iterator(link,pos--); }
ptrdiff_t operator -(const iterator & other) const {return pos-other.pos;}
element & operator *() { return link->at(pos); }
const element & operator *() const { return link->at(pos); }
element * operator ->() { return &link->at(pos); }
iterator & operator =(iterator const & other) { link = other.link; pos = other.pos; return *this; }
bool operator ==(const iterator & other) const { assert(link == other.link); return pos == other.pos;}
......
......@@ -282,10 +282,10 @@ bool SolverSolvePetsc(KSP *ksp, Vec *rhs, Vec *sol)
ierr = KSPGetOptionsPrefix(*ksp, const_cast<const char **>(&prefix));
if (ierr != PETSC_SUCCESS) throw INMOST::ErrorInSolver;
//due to https://www.mcs.anl.gov/petsc/documentation/changes/37.html
#if PETSC_VERSION_MAJOR >= 3 || (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR >= 7)
#if PETSC_VERSION_MAJOR > 3 || (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR >= 7)
ierr = PetscOptionsGetString(NULL,prefix, "-ksp_type", typeksp, 2048, &haveksp);
#else //PETSC_VERSION
ierr = PetscOptionsGetString(prefix, "-ksp_type", typeksp, 2048, &haveksp);
ierr = PetscOptionsGetString(prefix, "-ksp_type", typeksp, 2048, &haveksp);
#endif //PETSC_VERSION
if (ierr != PETSC_SUCCESS) throw INMOST::ErrorInSolver;
if (haveksp && !strcmp(typeksp, "preonly")) guess = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment