/*******************************************************************************
 * Copyright (c) 2018, College of William & Mary
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the College of William & Mary nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COLLEGE OF WILLIAM & MARY BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * PRIMME: https://github.com/primme/primme
 * Contact: Andreas Stathopoulos, a n d r e a s _at_ c s . w m . e d u
 *******************************************************************************
 *   NOTE: THIS FILE IS AUTOMATICALLY GENERATED. PLEASE DON'T MODIFY
 ******************************************************************************/


#ifndef main_iter_H
#define main_iter_H
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Sprimme)
#  define main_iter_Sprimme CONCAT(main_iter_,WITH_KIND(SCALAR_SUF))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Rprimme)
#  define main_iter_Rprimme CONCAT(main_iter_,WITH_KIND(REAL_SUF))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SHprimme)
#  define main_iter_SHprimme CONCAT(main_iter_,WITH_KIND(HOST_SCALAR_SUF))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RHprimme)
#  define main_iter_RHprimme CONCAT(main_iter_,WITH_KIND(HOST_REAL_SUF))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SXprimme)
#  define main_iter_SXprimme CONCAT(main_iter_,WITH_KIND(XSCALAR_SUF))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RXprimme)
#  define main_iter_RXprimme CONCAT(main_iter_,WITH_KIND(XREAL_SUF))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Shprimme)
#  define main_iter_Shprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,USE_ARITH(h,k)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Rhprimme)
#  define main_iter_Rhprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,h),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Ssprimme)
#  define main_iter_Ssprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,USE_ARITH(s,c)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Rsprimme)
#  define main_iter_Rsprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,s),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Sdprimme)
#  define main_iter_Sdprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,USE_ARITH(d,z)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Rdprimme)
#  define main_iter_Rdprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,d),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Sqprimme)
#  define main_iter_Sqprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,USE_ARITH(q,w)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_Rqprimme)
#  define main_iter_Rqprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(STEM_C,q),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SXhprimme)
#  define main_iter_SXhprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(h,k)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RXhprimme)
#  define main_iter_RXhprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,h),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SXsprimme)
#  define main_iter_SXsprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(s,c)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RXsprimme)
#  define main_iter_RXsprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,s),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SXdprimme)
#  define main_iter_SXdprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(d,z)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RXdprimme)
#  define main_iter_RXdprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,d),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SXqprimme)
#  define main_iter_SXqprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(q,w)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RXqprimme)
#  define main_iter_RXqprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,q),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SHhprimme)
#  define main_iter_SHhprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(s,c)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RHhprimme)
#  define main_iter_RHhprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,s),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SHsprimme)
#  define main_iter_SHsprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(s,c)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RHsprimme)
#  define main_iter_RHsprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,s),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SHdprimme)
#  define main_iter_SHdprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(d,z)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RHdprimme)
#  define main_iter_RHdprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,d),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_SHqprimme)
#  define main_iter_SHqprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,USE_ARITH(q,w)),primme),KIND_C))
#endif
#if !defined(CHECK_TEMPLATE) && !defined(main_iter_RHqprimme)
#  define main_iter_RHqprimme CONCAT(main_iter_,CONCAT(CONCAT(CONCAT(,q),primme),KIND_C))
#endif
int main_iter_dprimme(dummy_type_dprimme *evals, dummy_type_dprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
#if !defined(CHECK_TEMPLATE) && !defined(prepare_candidates)
#  define prepare_candidates CONCAT(prepare_candidates,WITH_KIND(SCALAR_SUF))
#endif
int prepare_candidatesdprimme(dummy_type_dprimme *V, PRIMME_INT ldV, dummy_type_dprimme *W,
      PRIMME_INT ldW, dummy_type_dprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_dprimme *H, int ldH, int basisSize, dummy_type_dprimme *X, dummy_type_dprimme *R, dummy_type_dprimme *BX,
      int computeXR, dummy_type_dprimme *hVecs, int ldhVecs, dummy_type_dprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_dprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_dprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_dprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_dprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_dprimme *VtBV, int ldVtBV, dummy_type_dprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
#if !defined(CHECK_TEMPLATE) && !defined(copy_back_candidates)
#  define copy_back_candidates CONCAT(copy_back_candidates,WITH_KIND(SCALAR_SUF))
#endif
int copy_back_candidatesdprimme(dummy_type_dprimme *V, PRIMME_INT ldV, dummy_type_dprimme *W,
      PRIMME_INT ldW, dummy_type_dprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_dprimme *H, int ldH, int basisSize, dummy_type_dprimme *hVecs, int ldhVecs,
      dummy_type_dprimme *hVals, dummy_type_dprimme *evecs, PRIMME_INT ldevecs, dummy_type_dprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_dprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
#if !defined(CHECK_TEMPLATE) && !defined(verify_norms)
#  define verify_norms CONCAT(verify_norms,WITH_KIND(SCALAR_SUF))
#endif
int verify_normsdprimme(dummy_type_dprimme *V, PRIMME_INT ldV, dummy_type_dprimme *W, PRIMME_INT ldW,
      dummy_type_dprimme *BV, PRIMME_INT ldBV, dummy_type_dprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
#if !defined(CHECK_TEMPLATE) && !defined(switch_from_JDQMR)
#  define switch_from_JDQMR CONCAT(switch_from_JDQMR,WITH_KIND(SCALAR_SUF))
#endif
int switch_from_JDQMRdprimme(void *model_, primme_context ctx);
#if !defined(CHECK_TEMPLATE) && !defined(switch_from_GDpk)
#  define switch_from_GDpk CONCAT(switch_from_GDpk,WITH_KIND(SCALAR_SUF))
#endif
int switch_from_GDpkdprimme(void *model_, primme_context ctx);
#if !defined(CHECK_TEMPLATE) && !defined(update_statistics)
#  define update_statistics CONCAT(update_statistics,WITH_KIND(SCALAR_SUF))
#endif
int update_statisticsdprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
#if !defined(CHECK_TEMPLATE) && !defined(ratio_JDQMR_GDpk)
#  define ratio_JDQMR_GDpk CONCAT(ratio_JDQMR_GDpk,WITH_KIND(SCALAR_SUF))
#endif
double ratio_JDQMR_GDpkdprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
#if !defined(CHECK_TEMPLATE) && !defined(update_slowdown)
#  define update_slowdown CONCAT(update_slowdown,WITH_KIND(SCALAR_SUF))
#endif
void update_slowdowndprimme(void *model_);
#if !defined(CHECK_TEMPLATE) && !defined(initializeModel)
#  define initializeModel CONCAT(initializeModel,WITH_KIND(SCALAR_SUF))
#endif
void initializeModeldprimme(void *model_, primme_params *primme);
int main_iter_hprimme(dummy_type_sprimme *evals, dummy_type_hprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidateshprimme(dummy_type_hprimme *V, PRIMME_INT ldV, dummy_type_hprimme *W,
      PRIMME_INT ldW, dummy_type_hprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_hprimme *X, dummy_type_hprimme *R, dummy_type_hprimme *BX,
      int computeXR, dummy_type_sprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_hprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_hprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_sprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_sprimme *VtBV, int ldVtBV, dummy_type_sprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidateshprimme(dummy_type_hprimme *V, PRIMME_INT ldV, dummy_type_hprimme *W,
      PRIMME_INT ldW, dummy_type_hprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_sprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_hprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_sprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normshprimme(dummy_type_hprimme *V, PRIMME_INT ldV, dummy_type_hprimme *W, PRIMME_INT ldW,
      dummy_type_hprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRhprimme(void *model_, primme_context ctx);
int switch_from_GDpkhprimme(void *model_, primme_context ctx);
int update_statisticshprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkhprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownhprimme(void *model_);
void initializeModelhprimme(void *model_, primme_params *primme);
int main_iter_kprimme_normal(dummy_type_cprimme *evals, dummy_type_kprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidateskprimme_normal(dummy_type_kprimme *V, PRIMME_INT ldV, dummy_type_kprimme *W,
      PRIMME_INT ldW, dummy_type_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_kprimme *X, dummy_type_kprimme *R, dummy_type_kprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_cprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_kprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_kprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_cprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidateskprimme_normal(dummy_type_kprimme *V, PRIMME_INT ldV, dummy_type_kprimme *W,
      PRIMME_INT ldW, dummy_type_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_cprimme *hVals, dummy_type_kprimme *evecs, PRIMME_INT ldevecs, dummy_type_cprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normskprimme_normal(dummy_type_kprimme *V, PRIMME_INT ldV, dummy_type_kprimme *W, PRIMME_INT ldW,
      dummy_type_kprimme *BV, PRIMME_INT ldBV, dummy_type_cprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRkprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkkprimme_normal(void *model_, primme_context ctx);
int update_statisticskprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkkprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownkprimme_normal(void *model_);
void initializeModelkprimme_normal(void *model_, primme_params *primme);
int main_iter_kprimme(dummy_type_sprimme *evals, dummy_type_kprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidateskprimme(dummy_type_kprimme *V, PRIMME_INT ldV, dummy_type_kprimme *W,
      PRIMME_INT ldW, dummy_type_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_kprimme *X, dummy_type_kprimme *R, dummy_type_kprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_kprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_kprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidateskprimme(dummy_type_kprimme *V, PRIMME_INT ldV, dummy_type_kprimme *W,
      PRIMME_INT ldW, dummy_type_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_kprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normskprimme(dummy_type_kprimme *V, PRIMME_INT ldV, dummy_type_kprimme *W, PRIMME_INT ldW,
      dummy_type_kprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRkprimme(void *model_, primme_context ctx);
int switch_from_GDpkkprimme(void *model_, primme_context ctx);
int update_statisticskprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkkprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownkprimme(void *model_);
void initializeModelkprimme(void *model_, primme_params *primme);
int main_iter_sprimme(dummy_type_sprimme *evals, dummy_type_sprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatessprimme(dummy_type_sprimme *V, PRIMME_INT ldV, dummy_type_sprimme *W,
      PRIMME_INT ldW, dummy_type_sprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_sprimme *X, dummy_type_sprimme *R, dummy_type_sprimme *BX,
      int computeXR, dummy_type_sprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_sprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_sprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_sprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_sprimme *VtBV, int ldVtBV, dummy_type_sprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatessprimme(dummy_type_sprimme *V, PRIMME_INT ldV, dummy_type_sprimme *W,
      PRIMME_INT ldW, dummy_type_sprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_sprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_sprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_sprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normssprimme(dummy_type_sprimme *V, PRIMME_INT ldV, dummy_type_sprimme *W, PRIMME_INT ldW,
      dummy_type_sprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRsprimme(void *model_, primme_context ctx);
int switch_from_GDpksprimme(void *model_, primme_context ctx);
int update_statisticssprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpksprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownsprimme(void *model_);
void initializeModelsprimme(void *model_, primme_params *primme);
int main_iter_cprimme_normal(dummy_type_cprimme *evals, dummy_type_cprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescprimme_normal(dummy_type_cprimme *V, PRIMME_INT ldV, dummy_type_cprimme *W,
      PRIMME_INT ldW, dummy_type_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *X, dummy_type_cprimme *R, dummy_type_cprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_cprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_cprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescprimme_normal(dummy_type_cprimme *V, PRIMME_INT ldV, dummy_type_cprimme *W,
      PRIMME_INT ldW, dummy_type_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_cprimme *hVals, dummy_type_cprimme *evecs, PRIMME_INT ldevecs, dummy_type_cprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscprimme_normal(dummy_type_cprimme *V, PRIMME_INT ldV, dummy_type_cprimme *W, PRIMME_INT ldW,
      dummy_type_cprimme *BV, PRIMME_INT ldBV, dummy_type_cprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkcprimme_normal(void *model_, primme_context ctx);
int update_statisticscprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncprimme_normal(void *model_);
void initializeModelcprimme_normal(void *model_, primme_params *primme);
int main_iter_cprimme(dummy_type_sprimme *evals, dummy_type_cprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescprimme(dummy_type_cprimme *V, PRIMME_INT ldV, dummy_type_cprimme *W,
      PRIMME_INT ldW, dummy_type_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *X, dummy_type_cprimme *R, dummy_type_cprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescprimme(dummy_type_cprimme *V, PRIMME_INT ldV, dummy_type_cprimme *W,
      PRIMME_INT ldW, dummy_type_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_cprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscprimme(dummy_type_cprimme *V, PRIMME_INT ldV, dummy_type_cprimme *W, PRIMME_INT ldW,
      dummy_type_cprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcprimme(void *model_, primme_context ctx);
int switch_from_GDpkcprimme(void *model_, primme_context ctx);
int update_statisticscprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncprimme(void *model_);
void initializeModelcprimme(void *model_, primme_params *primme);
int main_iter_zprimme_normal(dummy_type_zprimme *evals, dummy_type_zprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidateszprimme_normal(dummy_type_zprimme *V, PRIMME_INT ldV, dummy_type_zprimme *W,
      PRIMME_INT ldW, dummy_type_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *X, dummy_type_zprimme *R, dummy_type_zprimme *BX,
      int computeXR, dummy_type_zprimme *hVecs, int ldhVecs, dummy_type_zprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_zprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_zprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_zprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_zprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_zprimme *VtBV, int ldVtBV, dummy_type_zprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidateszprimme_normal(dummy_type_zprimme *V, PRIMME_INT ldV, dummy_type_zprimme *W,
      PRIMME_INT ldW, dummy_type_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *hVecs, int ldhVecs,
      dummy_type_zprimme *hVals, dummy_type_zprimme *evecs, PRIMME_INT ldevecs, dummy_type_zprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_zprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normszprimme_normal(dummy_type_zprimme *V, PRIMME_INT ldV, dummy_type_zprimme *W, PRIMME_INT ldW,
      dummy_type_zprimme *BV, PRIMME_INT ldBV, dummy_type_zprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRzprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkzprimme_normal(void *model_, primme_context ctx);
int update_statisticszprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkzprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownzprimme_normal(void *model_);
void initializeModelzprimme_normal(void *model_, primme_params *primme);
int main_iter_zprimme(dummy_type_dprimme *evals, dummy_type_zprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidateszprimme(dummy_type_zprimme *V, PRIMME_INT ldV, dummy_type_zprimme *W,
      PRIMME_INT ldW, dummy_type_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *X, dummy_type_zprimme *R, dummy_type_zprimme *BX,
      int computeXR, dummy_type_zprimme *hVecs, int ldhVecs, dummy_type_dprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_zprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_zprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_dprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_zprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_zprimme *VtBV, int ldVtBV, dummy_type_zprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidateszprimme(dummy_type_zprimme *V, PRIMME_INT ldV, dummy_type_zprimme *W,
      PRIMME_INT ldW, dummy_type_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *hVecs, int ldhVecs,
      dummy_type_dprimme *hVals, dummy_type_zprimme *evecs, PRIMME_INT ldevecs, dummy_type_dprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_zprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normszprimme(dummy_type_zprimme *V, PRIMME_INT ldV, dummy_type_zprimme *W, PRIMME_INT ldW,
      dummy_type_zprimme *BV, PRIMME_INT ldBV, dummy_type_dprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRzprimme(void *model_, primme_context ctx);
int switch_from_GDpkzprimme(void *model_, primme_context ctx);
int update_statisticszprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkzprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownzprimme(void *model_);
void initializeModelzprimme(void *model_, primme_params *primme);
int main_iter_magma_hprimme(dummy_type_sprimme *evals, dummy_type_magma_hprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_hprimme(dummy_type_magma_hprimme *V, PRIMME_INT ldV, dummy_type_magma_hprimme *W,
      PRIMME_INT ldW, dummy_type_magma_hprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_magma_hprimme *X, dummy_type_magma_hprimme *R, dummy_type_magma_hprimme *BX,
      int computeXR, dummy_type_sprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_hprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_hprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_sprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_sprimme *VtBV, int ldVtBV, dummy_type_sprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_hprimme(dummy_type_magma_hprimme *V, PRIMME_INT ldV, dummy_type_magma_hprimme *W,
      PRIMME_INT ldW, dummy_type_magma_hprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_sprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_magma_hprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_sprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_hprimme(dummy_type_magma_hprimme *V, PRIMME_INT ldV, dummy_type_magma_hprimme *W, PRIMME_INT ldW,
      dummy_type_magma_hprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_hprimme(void *model_, primme_context ctx);
int switch_from_GDpkmagma_hprimme(void *model_, primme_context ctx);
int update_statisticsmagma_hprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_hprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_hprimme(void *model_);
void initializeModelmagma_hprimme(void *model_, primme_params *primme);
int main_iter_magma_kprimme_normal(dummy_type_cprimme *evals, dummy_type_magma_kprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_kprimme_normal(dummy_type_magma_kprimme *V, PRIMME_INT ldV, dummy_type_magma_kprimme *W,
      PRIMME_INT ldW, dummy_type_magma_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_magma_kprimme *X, dummy_type_magma_kprimme *R, dummy_type_magma_kprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_cprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_kprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_kprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_cprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_kprimme_normal(dummy_type_magma_kprimme *V, PRIMME_INT ldV, dummy_type_magma_kprimme *W,
      PRIMME_INT ldW, dummy_type_magma_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_cprimme *hVals, dummy_type_magma_kprimme *evecs, PRIMME_INT ldevecs, dummy_type_cprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_kprimme_normal(dummy_type_magma_kprimme *V, PRIMME_INT ldV, dummy_type_magma_kprimme *W, PRIMME_INT ldW,
      dummy_type_magma_kprimme *BV, PRIMME_INT ldBV, dummy_type_cprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_kprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkmagma_kprimme_normal(void *model_, primme_context ctx);
int update_statisticsmagma_kprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_kprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_kprimme_normal(void *model_);
void initializeModelmagma_kprimme_normal(void *model_, primme_params *primme);
int main_iter_magma_kprimme(dummy_type_sprimme *evals, dummy_type_magma_kprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_kprimme(dummy_type_magma_kprimme *V, PRIMME_INT ldV, dummy_type_magma_kprimme *W,
      PRIMME_INT ldW, dummy_type_magma_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_magma_kprimme *X, dummy_type_magma_kprimme *R, dummy_type_magma_kprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_kprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_kprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_kprimme(dummy_type_magma_kprimme *V, PRIMME_INT ldV, dummy_type_magma_kprimme *W,
      PRIMME_INT ldW, dummy_type_magma_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_magma_kprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_kprimme(dummy_type_magma_kprimme *V, PRIMME_INT ldV, dummy_type_magma_kprimme *W, PRIMME_INT ldW,
      dummy_type_magma_kprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_kprimme(void *model_, primme_context ctx);
int switch_from_GDpkmagma_kprimme(void *model_, primme_context ctx);
int update_statisticsmagma_kprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_kprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_kprimme(void *model_);
void initializeModelmagma_kprimme(void *model_, primme_params *primme);
int main_iter_magma_sprimme(dummy_type_sprimme *evals, dummy_type_magma_sprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_sprimme(dummy_type_magma_sprimme *V, PRIMME_INT ldV, dummy_type_magma_sprimme *W,
      PRIMME_INT ldW, dummy_type_magma_sprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_magma_sprimme *X, dummy_type_magma_sprimme *R, dummy_type_magma_sprimme *BX,
      int computeXR, dummy_type_sprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_sprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_sprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_sprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_sprimme *VtBV, int ldVtBV, dummy_type_sprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_sprimme(dummy_type_magma_sprimme *V, PRIMME_INT ldV, dummy_type_magma_sprimme *W,
      PRIMME_INT ldW, dummy_type_magma_sprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_sprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_magma_sprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_sprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_sprimme(dummy_type_magma_sprimme *V, PRIMME_INT ldV, dummy_type_magma_sprimme *W, PRIMME_INT ldW,
      dummy_type_magma_sprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_sprimme(void *model_, primme_context ctx);
int switch_from_GDpkmagma_sprimme(void *model_, primme_context ctx);
int update_statisticsmagma_sprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_sprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_sprimme(void *model_);
void initializeModelmagma_sprimme(void *model_, primme_params *primme);
int main_iter_magma_cprimme_normal(dummy_type_cprimme *evals, dummy_type_magma_cprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_cprimme_normal(dummy_type_magma_cprimme *V, PRIMME_INT ldV, dummy_type_magma_cprimme *W,
      PRIMME_INT ldW, dummy_type_magma_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_magma_cprimme *X, dummy_type_magma_cprimme *R, dummy_type_magma_cprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_cprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_cprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_cprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_cprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_cprimme_normal(dummy_type_magma_cprimme *V, PRIMME_INT ldV, dummy_type_magma_cprimme *W,
      PRIMME_INT ldW, dummy_type_magma_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_cprimme *hVals, dummy_type_magma_cprimme *evecs, PRIMME_INT ldevecs, dummy_type_cprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_cprimme_normal(dummy_type_magma_cprimme *V, PRIMME_INT ldV, dummy_type_magma_cprimme *W, PRIMME_INT ldW,
      dummy_type_magma_cprimme *BV, PRIMME_INT ldBV, dummy_type_cprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_cprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkmagma_cprimme_normal(void *model_, primme_context ctx);
int update_statisticsmagma_cprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_cprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_cprimme_normal(void *model_);
void initializeModelmagma_cprimme_normal(void *model_, primme_params *primme);
int main_iter_magma_cprimme(dummy_type_sprimme *evals, dummy_type_magma_cprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_cprimme(dummy_type_magma_cprimme *V, PRIMME_INT ldV, dummy_type_magma_cprimme *W,
      PRIMME_INT ldW, dummy_type_magma_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_magma_cprimme *X, dummy_type_magma_cprimme *R, dummy_type_magma_cprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_cprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_cprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_cprimme(dummy_type_magma_cprimme *V, PRIMME_INT ldV, dummy_type_magma_cprimme *W,
      PRIMME_INT ldW, dummy_type_magma_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_magma_cprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_cprimme(dummy_type_magma_cprimme *V, PRIMME_INT ldV, dummy_type_magma_cprimme *W, PRIMME_INT ldW,
      dummy_type_magma_cprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_cprimme(void *model_, primme_context ctx);
int switch_from_GDpkmagma_cprimme(void *model_, primme_context ctx);
int update_statisticsmagma_cprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_cprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_cprimme(void *model_);
void initializeModelmagma_cprimme(void *model_, primme_params *primme);
int main_iter_magma_dprimme(dummy_type_dprimme *evals, dummy_type_magma_dprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_dprimme(dummy_type_magma_dprimme *V, PRIMME_INT ldV, dummy_type_magma_dprimme *W,
      PRIMME_INT ldW, dummy_type_magma_dprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_dprimme *H, int ldH, int basisSize, dummy_type_magma_dprimme *X, dummy_type_magma_dprimme *R, dummy_type_magma_dprimme *BX,
      int computeXR, dummy_type_dprimme *hVecs, int ldhVecs, dummy_type_dprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_dprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_dprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_dprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_dprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_dprimme *VtBV, int ldVtBV, dummy_type_dprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_dprimme(dummy_type_magma_dprimme *V, PRIMME_INT ldV, dummy_type_magma_dprimme *W,
      PRIMME_INT ldW, dummy_type_magma_dprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_dprimme *H, int ldH, int basisSize, dummy_type_dprimme *hVecs, int ldhVecs,
      dummy_type_dprimme *hVals, dummy_type_magma_dprimme *evecs, PRIMME_INT ldevecs, dummy_type_dprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_dprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_dprimme(dummy_type_magma_dprimme *V, PRIMME_INT ldV, dummy_type_magma_dprimme *W, PRIMME_INT ldW,
      dummy_type_magma_dprimme *BV, PRIMME_INT ldBV, dummy_type_dprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_dprimme(void *model_, primme_context ctx);
int switch_from_GDpkmagma_dprimme(void *model_, primme_context ctx);
int update_statisticsmagma_dprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_dprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_dprimme(void *model_);
void initializeModelmagma_dprimme(void *model_, primme_params *primme);
int main_iter_magma_zprimme_normal(dummy_type_zprimme *evals, dummy_type_magma_zprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_zprimme_normal(dummy_type_magma_zprimme *V, PRIMME_INT ldV, dummy_type_magma_zprimme *W,
      PRIMME_INT ldW, dummy_type_magma_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_magma_zprimme *X, dummy_type_magma_zprimme *R, dummy_type_magma_zprimme *BX,
      int computeXR, dummy_type_zprimme *hVecs, int ldhVecs, dummy_type_zprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_zprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_zprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_zprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_zprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_zprimme *VtBV, int ldVtBV, dummy_type_zprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_zprimme_normal(dummy_type_magma_zprimme *V, PRIMME_INT ldV, dummy_type_magma_zprimme *W,
      PRIMME_INT ldW, dummy_type_magma_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *hVecs, int ldhVecs,
      dummy_type_zprimme *hVals, dummy_type_magma_zprimme *evecs, PRIMME_INT ldevecs, dummy_type_zprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_zprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_zprimme_normal(dummy_type_magma_zprimme *V, PRIMME_INT ldV, dummy_type_magma_zprimme *W, PRIMME_INT ldW,
      dummy_type_magma_zprimme *BV, PRIMME_INT ldBV, dummy_type_zprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_zprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkmagma_zprimme_normal(void *model_, primme_context ctx);
int update_statisticsmagma_zprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_zprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_zprimme_normal(void *model_);
void initializeModelmagma_zprimme_normal(void *model_, primme_params *primme);
int main_iter_magma_zprimme(dummy_type_dprimme *evals, dummy_type_magma_zprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatesmagma_zprimme(dummy_type_magma_zprimme *V, PRIMME_INT ldV, dummy_type_magma_zprimme *W,
      PRIMME_INT ldW, dummy_type_magma_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_magma_zprimme *X, dummy_type_magma_zprimme *R, dummy_type_magma_zprimme *BX,
      int computeXR, dummy_type_zprimme *hVecs, int ldhVecs, dummy_type_dprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_magma_zprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_magma_zprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_dprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_zprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_zprimme *VtBV, int ldVtBV, dummy_type_zprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatesmagma_zprimme(dummy_type_magma_zprimme *V, PRIMME_INT ldV, dummy_type_magma_zprimme *W,
      PRIMME_INT ldW, dummy_type_magma_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *hVecs, int ldhVecs,
      dummy_type_dprimme *hVals, dummy_type_magma_zprimme *evecs, PRIMME_INT ldevecs, dummy_type_dprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_zprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normsmagma_zprimme(dummy_type_magma_zprimme *V, PRIMME_INT ldV, dummy_type_magma_zprimme *W, PRIMME_INT ldW,
      dummy_type_magma_zprimme *BV, PRIMME_INT ldBV, dummy_type_dprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRmagma_zprimme(void *model_, primme_context ctx);
int switch_from_GDpkmagma_zprimme(void *model_, primme_context ctx);
int update_statisticsmagma_zprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkmagma_zprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdownmagma_zprimme(void *model_);
void initializeModelmagma_zprimme(void *model_, primme_params *primme);
int main_iter_cublas_hprimme(dummy_type_sprimme *evals, dummy_type_cublas_hprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_hprimme(dummy_type_cublas_hprimme *V, PRIMME_INT ldV, dummy_type_cublas_hprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_hprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_cublas_hprimme *X, dummy_type_cublas_hprimme *R, dummy_type_cublas_hprimme *BX,
      int computeXR, dummy_type_sprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_hprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_hprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_sprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_sprimme *VtBV, int ldVtBV, dummy_type_sprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_hprimme(dummy_type_cublas_hprimme *V, PRIMME_INT ldV, dummy_type_cublas_hprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_hprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_sprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_cublas_hprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_sprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_hprimme(dummy_type_cublas_hprimme *V, PRIMME_INT ldV, dummy_type_cublas_hprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_hprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_hprimme(void *model_, primme_context ctx);
int switch_from_GDpkcublas_hprimme(void *model_, primme_context ctx);
int update_statisticscublas_hprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_hprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_hprimme(void *model_);
void initializeModelcublas_hprimme(void *model_, primme_params *primme);
int main_iter_cublas_kprimme_normal(dummy_type_cprimme *evals, dummy_type_cublas_kprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_kprimme_normal(dummy_type_cublas_kprimme *V, PRIMME_INT ldV, dummy_type_cublas_kprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cublas_kprimme *X, dummy_type_cublas_kprimme *R, dummy_type_cublas_kprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_cprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_kprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_kprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_cprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_kprimme_normal(dummy_type_cublas_kprimme *V, PRIMME_INT ldV, dummy_type_cublas_kprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_cprimme *hVals, dummy_type_cublas_kprimme *evecs, PRIMME_INT ldevecs, dummy_type_cprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_kprimme_normal(dummy_type_cublas_kprimme *V, PRIMME_INT ldV, dummy_type_cublas_kprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_kprimme *BV, PRIMME_INT ldBV, dummy_type_cprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_kprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkcublas_kprimme_normal(void *model_, primme_context ctx);
int update_statisticscublas_kprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_kprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_kprimme_normal(void *model_);
void initializeModelcublas_kprimme_normal(void *model_, primme_params *primme);
int main_iter_cublas_kprimme(dummy_type_sprimme *evals, dummy_type_cublas_kprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_kprimme(dummy_type_cublas_kprimme *V, PRIMME_INT ldV, dummy_type_cublas_kprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cublas_kprimme *X, dummy_type_cublas_kprimme *R, dummy_type_cublas_kprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_kprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_kprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_kprimme(dummy_type_cublas_kprimme *V, PRIMME_INT ldV, dummy_type_cublas_kprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_kprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_cublas_kprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_kprimme(dummy_type_cublas_kprimme *V, PRIMME_INT ldV, dummy_type_cublas_kprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_kprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_kprimme(void *model_, primme_context ctx);
int switch_from_GDpkcublas_kprimme(void *model_, primme_context ctx);
int update_statisticscublas_kprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_kprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_kprimme(void *model_);
void initializeModelcublas_kprimme(void *model_, primme_params *primme);
int main_iter_cublas_sprimme(dummy_type_sprimme *evals, dummy_type_cublas_sprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_sprimme(dummy_type_cublas_sprimme *V, PRIMME_INT ldV, dummy_type_cublas_sprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_sprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_cublas_sprimme *X, dummy_type_cublas_sprimme *R, dummy_type_cublas_sprimme *BX,
      int computeXR, dummy_type_sprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_sprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_sprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_sprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_sprimme *VtBV, int ldVtBV, dummy_type_sprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_sprimme(dummy_type_cublas_sprimme *V, PRIMME_INT ldV, dummy_type_cublas_sprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_sprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_sprimme *H, int ldH, int basisSize, dummy_type_sprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_cublas_sprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_sprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_sprimme(dummy_type_cublas_sprimme *V, PRIMME_INT ldV, dummy_type_cublas_sprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_sprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_sprimme(void *model_, primme_context ctx);
int switch_from_GDpkcublas_sprimme(void *model_, primme_context ctx);
int update_statisticscublas_sprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_sprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_sprimme(void *model_);
void initializeModelcublas_sprimme(void *model_, primme_params *primme);
int main_iter_cublas_cprimme_normal(dummy_type_cprimme *evals, dummy_type_cublas_cprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_cprimme_normal(dummy_type_cublas_cprimme *V, PRIMME_INT ldV, dummy_type_cublas_cprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cublas_cprimme *X, dummy_type_cublas_cprimme *R, dummy_type_cublas_cprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_cprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_cprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_cprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_cprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_cprimme_normal(dummy_type_cublas_cprimme *V, PRIMME_INT ldV, dummy_type_cublas_cprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_cprimme *hVals, dummy_type_cublas_cprimme *evecs, PRIMME_INT ldevecs, dummy_type_cprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_cprimme_normal(dummy_type_cublas_cprimme *V, PRIMME_INT ldV, dummy_type_cublas_cprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_cprimme *BV, PRIMME_INT ldBV, dummy_type_cprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_cprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkcublas_cprimme_normal(void *model_, primme_context ctx);
int update_statisticscublas_cprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_cprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_cprimme_normal(void *model_);
void initializeModelcublas_cprimme_normal(void *model_, primme_params *primme);
int main_iter_cublas_cprimme(dummy_type_sprimme *evals, dummy_type_cublas_cprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_sprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_cprimme(dummy_type_cublas_cprimme *V, PRIMME_INT ldV, dummy_type_cublas_cprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cublas_cprimme *X, dummy_type_cublas_cprimme *R, dummy_type_cublas_cprimme *BX,
      int computeXR, dummy_type_cprimme *hVecs, int ldhVecs, dummy_type_sprimme *hVals, dummy_type_sprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_sprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_cprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_cprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_sprimme *evals, dummy_type_sprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_cprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_sprimme *basisNorms, int *reset,
      dummy_type_cprimme *VtBV, int ldVtBV, dummy_type_cprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_cprimme(dummy_type_cublas_cprimme *V, PRIMME_INT ldV, dummy_type_cublas_cprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_cprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_cprimme *H, int ldH, int basisSize, dummy_type_cprimme *hVecs, int ldhVecs,
      dummy_type_sprimme *hVals, dummy_type_cublas_cprimme *evecs, PRIMME_INT ldevecs, dummy_type_sprimme *evals,
      dummy_type_sprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_cprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_cprimme(dummy_type_cublas_cprimme *V, PRIMME_INT ldV, dummy_type_cublas_cprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_cprimme *BV, PRIMME_INT ldBV, dummy_type_sprimme *hVals, int basisSize, dummy_type_sprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_cprimme(void *model_, primme_context ctx);
int switch_from_GDpkcublas_cprimme(void *model_, primme_context ctx);
int update_statisticscublas_cprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_cprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_cprimme(void *model_);
void initializeModelcublas_cprimme(void *model_, primme_params *primme);
int main_iter_cublas_dprimme(dummy_type_dprimme *evals, dummy_type_cublas_dprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_dprimme(dummy_type_cublas_dprimme *V, PRIMME_INT ldV, dummy_type_cublas_dprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_dprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_dprimme *H, int ldH, int basisSize, dummy_type_cublas_dprimme *X, dummy_type_cublas_dprimme *R, dummy_type_cublas_dprimme *BX,
      int computeXR, dummy_type_dprimme *hVecs, int ldhVecs, dummy_type_dprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_dprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_dprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_dprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_dprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_dprimme *VtBV, int ldVtBV, dummy_type_dprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_dprimme(dummy_type_cublas_dprimme *V, PRIMME_INT ldV, dummy_type_cublas_dprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_dprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_dprimme *H, int ldH, int basisSize, dummy_type_dprimme *hVecs, int ldhVecs,
      dummy_type_dprimme *hVals, dummy_type_cublas_dprimme *evecs, PRIMME_INT ldevecs, dummy_type_dprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_dprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_dprimme(dummy_type_cublas_dprimme *V, PRIMME_INT ldV, dummy_type_cublas_dprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_dprimme *BV, PRIMME_INT ldBV, dummy_type_dprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_dprimme(void *model_, primme_context ctx);
int switch_from_GDpkcublas_dprimme(void *model_, primme_context ctx);
int update_statisticscublas_dprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_dprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_dprimme(void *model_);
void initializeModelcublas_dprimme(void *model_, primme_params *primme);
int main_iter_cublas_zprimme_normal(dummy_type_zprimme *evals, dummy_type_cublas_zprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_zprimme_normal(dummy_type_cublas_zprimme *V, PRIMME_INT ldV, dummy_type_cublas_zprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_cublas_zprimme *X, dummy_type_cublas_zprimme *R, dummy_type_cublas_zprimme *BX,
      int computeXR, dummy_type_zprimme *hVecs, int ldhVecs, dummy_type_zprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_zprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_zprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_zprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_zprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_zprimme *VtBV, int ldVtBV, dummy_type_zprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_zprimme_normal(dummy_type_cublas_zprimme *V, PRIMME_INT ldV, dummy_type_cublas_zprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *hVecs, int ldhVecs,
      dummy_type_zprimme *hVals, dummy_type_cublas_zprimme *evecs, PRIMME_INT ldevecs, dummy_type_zprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_zprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_zprimme_normal(dummy_type_cublas_zprimme *V, PRIMME_INT ldV, dummy_type_cublas_zprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_zprimme *BV, PRIMME_INT ldBV, dummy_type_zprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_zprimme_normal(void *model_, primme_context ctx);
int switch_from_GDpkcublas_zprimme_normal(void *model_, primme_context ctx);
int update_statisticscublas_zprimme_normal(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_zprimme_normal(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_zprimme_normal(void *model_);
void initializeModelcublas_zprimme_normal(void *model_, primme_params *primme);
int main_iter_cublas_zprimme(dummy_type_dprimme *evals, dummy_type_cublas_zprimme *evecs, PRIMME_INT ldevecs,
      dummy_type_dprimme *resNorms, double startTime, int *ret, int *numRet,
      primme_context ctx);
int prepare_candidatescublas_zprimme(dummy_type_cublas_zprimme *V, PRIMME_INT ldV, dummy_type_cublas_zprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_cublas_zprimme *X, dummy_type_cublas_zprimme *R, dummy_type_cublas_zprimme *BX,
      int computeXR, dummy_type_zprimme *hVecs, int ldhVecs, dummy_type_dprimme *hVals, dummy_type_dprimme *hSVals,
      int *flags, int remainedEvals, dummy_type_dprimme *blockNorms, int blockNormsSize,
      int maxBlockSize, dummy_type_cublas_zprimme *evecs, int numLocked, PRIMME_INT ldevecs,
      dummy_type_cublas_zprimme *Bevecs, PRIMME_INT ldBevecs, dummy_type_dprimme *evals, dummy_type_dprimme *resNorms,
      int targetShiftIndex, int *iev, int *blockSize, int *recentlyConverged,
      int *numArbitraryVecs, double *smallestResNorm, dummy_type_zprimme *hVecsRot,
      int ldhVecsRot, int numConverged, dummy_type_dprimme *basisNorms, int *reset,
      dummy_type_zprimme *VtBV, int ldVtBV, dummy_type_zprimme *prevhVecs, int nprevhVecs,
      int ldprevhVecs, int practConvChecking, int *map, double startTime,
      primme_context ctx);
int copy_back_candidatescublas_zprimme(dummy_type_cublas_zprimme *V, PRIMME_INT ldV, dummy_type_cublas_zprimme *W,
      PRIMME_INT ldW, dummy_type_cublas_zprimme *BV, PRIMME_INT ldBV, PRIMME_INT nLocal,
      dummy_type_zprimme *H, int ldH, int basisSize, dummy_type_zprimme *hVecs, int ldhVecs,
      dummy_type_dprimme *hVals, dummy_type_cublas_zprimme *evecs, PRIMME_INT ldevecs, dummy_type_dprimme *evals,
      dummy_type_dprimme *resNorms, int targetShiftIndex, int numConverged, dummy_type_zprimme *VtBV,
      int ldVtBV, int *numRet, primme_context ctx);
int verify_normscublas_zprimme(dummy_type_cublas_zprimme *V, PRIMME_INT ldV, dummy_type_cublas_zprimme *W, PRIMME_INT ldW,
      dummy_type_cublas_zprimme *BV, PRIMME_INT ldBV, dummy_type_dprimme *hVals, int basisSize, dummy_type_dprimme *resNorms,
      int *flags, int *numConverged, primme_context ctx);
int switch_from_JDQMRcublas_zprimme(void *model_, primme_context ctx);
int switch_from_GDpkcublas_zprimme(void *model_, primme_context ctx);
int update_statisticscublas_zprimme(void *model_, primme_params *primme,
      double current_time, int recentConv, int calledAtRestart,
      int numConverged, double currentResNorm);
double ratio_JDQMR_GDpkcublas_zprimme(void *model_, int numLocked,
   double estimate_slowdown, double estimate_ratio_MV_outer);
void update_slowdowncublas_zprimme(void *model_);
void initializeModelcublas_zprimme(void *model_, primme_params *primme);
#endif
