// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#ifndef RCPP_PRIMME_RCPPEXPORTS_H_GEN_
#define RCPP_PRIMME_RCPPEXPORTS_H_GEN_

#include "PRIMME_types.h"
#include "PRIMME_types.h"
#include <Rcpp.h>

namespace PRIMME {

    using namespace Rcpp;

    namespace {
        void validateSignature(const char* sig) {
            Rcpp::Function require = Rcpp::Environment::base_env()["require"];
            require("PRIMME", Rcpp::Named("quietly") = true);
            typedef int(*Ptr_validate)(const char*);
            static Ptr_validate p_validate = (Ptr_validate)
                R_GetCCallable("PRIMME", "_PRIMME_RcppExport_validate");
            if (!p_validate(sig)) {
                throw Rcpp::function_not_exported(
                    "C++ function with signature '" + std::string(sig) + "' not found in PRIMME");
            }
        }
    }

    inline PrimmeParams _primme_initialize() {
        typedef SEXP(*Ptr__primme_initialize)();
        static Ptr__primme_initialize p__primme_initialize = NULL;
        if (p__primme_initialize == NULL) {
            validateSignature("PrimmeParams(*_primme_initialize)()");
            p__primme_initialize = (Ptr__primme_initialize)R_GetCCallable("PRIMME", "_PRIMME__primme_initialize");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_initialize();
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<PrimmeParams >(rcpp_result_gen);
    }

    inline void _primme_free(PrimmeParams primme) {
        typedef SEXP(*Ptr__primme_free)(SEXP);
        static Ptr__primme_free p__primme_free = NULL;
        if (p__primme_free == NULL) {
            validateSignature("void(*_primme_free)(PrimmeParams)");
            p__primme_free = (Ptr__primme_free)R_GetCCallable("PRIMME", "_PRIMME__primme_free");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_free(Shield<SEXP>(Rcpp::wrap(primme)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline void _primme_set_method(std::string methodstr, PrimmeParams primme) {
        typedef SEXP(*Ptr__primme_set_method)(SEXP,SEXP);
        static Ptr__primme_set_method p__primme_set_method = NULL;
        if (p__primme_set_method == NULL) {
            validateSignature("void(*_primme_set_method)(std::string,PrimmeParams)");
            p__primme_set_method = (Ptr__primme_set_method)R_GetCCallable("PRIMME", "_PRIMME__primme_set_method");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_set_method(Shield<SEXP>(Rcpp::wrap(methodstr)), Shield<SEXP>(Rcpp::wrap(primme)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline SEXP _primme_get_member(std::string labelstr, PrimmeParams primme) {
        typedef SEXP(*Ptr__primme_get_member)(SEXP,SEXP);
        static Ptr__primme_get_member p__primme_get_member = NULL;
        if (p__primme_get_member == NULL) {
            validateSignature("SEXP(*_primme_get_member)(std::string,PrimmeParams)");
            p__primme_get_member = (Ptr__primme_get_member)R_GetCCallable("PRIMME", "_PRIMME__primme_get_member");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_get_member(Shield<SEXP>(Rcpp::wrap(labelstr)), Shield<SEXP>(Rcpp::wrap(primme)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline void _primme_set_member(std::string labelstr, SEXP value, PrimmeParams primme) {
        typedef SEXP(*Ptr__primme_set_member)(SEXP,SEXP,SEXP);
        static Ptr__primme_set_member p__primme_set_member = NULL;
        if (p__primme_set_member == NULL) {
            validateSignature("void(*_primme_set_member)(std::string,SEXP,PrimmeParams)");
            p__primme_set_member = (Ptr__primme_set_member)R_GetCCallable("PRIMME", "_PRIMME__primme_set_member");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_set_member(Shield<SEXP>(Rcpp::wrap(labelstr)), Shield<SEXP>(Rcpp::wrap(value)), Shield<SEXP>(Rcpp::wrap(primme)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline List _dprimme(NumericMatrix ortho, NumericMatrix init, SEXP A, SEXP B, SEXP prec, SEXP convTest, PrimmeParams primme) {
        typedef SEXP(*Ptr__dprimme)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__dprimme p__dprimme = NULL;
        if (p__dprimme == NULL) {
            validateSignature("List(*_dprimme)(NumericMatrix,NumericMatrix,SEXP,SEXP,SEXP,SEXP,PrimmeParams)");
            p__dprimme = (Ptr__dprimme)R_GetCCallable("PRIMME", "_PRIMME__dprimme");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__dprimme(Shield<SEXP>(Rcpp::wrap(ortho)), Shield<SEXP>(Rcpp::wrap(init)), Shield<SEXP>(Rcpp::wrap(A)), Shield<SEXP>(Rcpp::wrap(B)), Shield<SEXP>(Rcpp::wrap(prec)), Shield<SEXP>(Rcpp::wrap(convTest)), Shield<SEXP>(Rcpp::wrap(primme)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List _zprimme(ComplexMatrix ortho, ComplexMatrix init, SEXP A, SEXP B, SEXP prec, SEXP convTest, PrimmeParams primme) {
        typedef SEXP(*Ptr__zprimme)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__zprimme p__zprimme = NULL;
        if (p__zprimme == NULL) {
            validateSignature("List(*_zprimme)(ComplexMatrix,ComplexMatrix,SEXP,SEXP,SEXP,SEXP,PrimmeParams)");
            p__zprimme = (Ptr__zprimme)R_GetCCallable("PRIMME", "_PRIMME__zprimme");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__zprimme(Shield<SEXP>(Rcpp::wrap(ortho)), Shield<SEXP>(Rcpp::wrap(init)), Shield<SEXP>(Rcpp::wrap(A)), Shield<SEXP>(Rcpp::wrap(B)), Shield<SEXP>(Rcpp::wrap(prec)), Shield<SEXP>(Rcpp::wrap(convTest)), Shield<SEXP>(Rcpp::wrap(primme)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline PrimmeSvdsParams _primme_svds_initialize() {
        typedef SEXP(*Ptr__primme_svds_initialize)();
        static Ptr__primme_svds_initialize p__primme_svds_initialize = NULL;
        if (p__primme_svds_initialize == NULL) {
            validateSignature("PrimmeSvdsParams(*_primme_svds_initialize)()");
            p__primme_svds_initialize = (Ptr__primme_svds_initialize)R_GetCCallable("PRIMME", "_PRIMME__primme_svds_initialize");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_svds_initialize();
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<PrimmeSvdsParams >(rcpp_result_gen);
    }

    inline void _primme_svds_free(PrimmeSvdsParams primme_svds) {
        typedef SEXP(*Ptr__primme_svds_free)(SEXP);
        static Ptr__primme_svds_free p__primme_svds_free = NULL;
        if (p__primme_svds_free == NULL) {
            validateSignature("void(*_primme_svds_free)(PrimmeSvdsParams)");
            p__primme_svds_free = (Ptr__primme_svds_free)R_GetCCallable("PRIMME", "_PRIMME__primme_svds_free");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_svds_free(Shield<SEXP>(Rcpp::wrap(primme_svds)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline void _primme_svds_set_method(std::string methodstr, std::string methodStage1str, std::string methodStage2str, PrimmeSvdsParams primme_svds) {
        typedef SEXP(*Ptr__primme_svds_set_method)(SEXP,SEXP,SEXP,SEXP);
        static Ptr__primme_svds_set_method p__primme_svds_set_method = NULL;
        if (p__primme_svds_set_method == NULL) {
            validateSignature("void(*_primme_svds_set_method)(std::string,std::string,std::string,PrimmeSvdsParams)");
            p__primme_svds_set_method = (Ptr__primme_svds_set_method)R_GetCCallable("PRIMME", "_PRIMME__primme_svds_set_method");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_svds_set_method(Shield<SEXP>(Rcpp::wrap(methodstr)), Shield<SEXP>(Rcpp::wrap(methodStage1str)), Shield<SEXP>(Rcpp::wrap(methodStage2str)), Shield<SEXP>(Rcpp::wrap(primme_svds)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline SEXP _primme_svds_get_member(std::string labelstr, PrimmeSvdsParams primme_svds) {
        typedef SEXP(*Ptr__primme_svds_get_member)(SEXP,SEXP);
        static Ptr__primme_svds_get_member p__primme_svds_get_member = NULL;
        if (p__primme_svds_get_member == NULL) {
            validateSignature("SEXP(*_primme_svds_get_member)(std::string,PrimmeSvdsParams)");
            p__primme_svds_get_member = (Ptr__primme_svds_get_member)R_GetCCallable("PRIMME", "_PRIMME__primme_svds_get_member");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_svds_get_member(Shield<SEXP>(Rcpp::wrap(labelstr)), Shield<SEXP>(Rcpp::wrap(primme_svds)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline void _primme_svds_set_member(std::string labelstr, SEXP value, PrimmeSvdsParams primme_svds) {
        typedef SEXP(*Ptr__primme_svds_set_member)(SEXP,SEXP,SEXP);
        static Ptr__primme_svds_set_member p__primme_svds_set_member = NULL;
        if (p__primme_svds_set_member == NULL) {
            validateSignature("void(*_primme_svds_set_member)(std::string,SEXP,PrimmeSvdsParams)");
            p__primme_svds_set_member = (Ptr__primme_svds_set_member)R_GetCCallable("PRIMME", "_PRIMME__primme_svds_set_member");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__primme_svds_set_member(Shield<SEXP>(Rcpp::wrap(labelstr)), Shield<SEXP>(Rcpp::wrap(value)), Shield<SEXP>(Rcpp::wrap(primme_svds)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline List _dprimme_svds(NumericMatrix orthol, NumericMatrix orthor, NumericMatrix initl, NumericMatrix initr, SEXP A, SEXP prec, PrimmeSvdsParams primme_svds) {
        typedef SEXP(*Ptr__dprimme_svds)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__dprimme_svds p__dprimme_svds = NULL;
        if (p__dprimme_svds == NULL) {
            validateSignature("List(*_dprimme_svds)(NumericMatrix,NumericMatrix,NumericMatrix,NumericMatrix,SEXP,SEXP,PrimmeSvdsParams)");
            p__dprimme_svds = (Ptr__dprimme_svds)R_GetCCallable("PRIMME", "_PRIMME__dprimme_svds");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__dprimme_svds(Shield<SEXP>(Rcpp::wrap(orthol)), Shield<SEXP>(Rcpp::wrap(orthor)), Shield<SEXP>(Rcpp::wrap(initl)), Shield<SEXP>(Rcpp::wrap(initr)), Shield<SEXP>(Rcpp::wrap(A)), Shield<SEXP>(Rcpp::wrap(prec)), Shield<SEXP>(Rcpp::wrap(primme_svds)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List _zprimme_svds(ComplexMatrix orthol, ComplexMatrix orthor, ComplexMatrix initl, ComplexMatrix initr, SEXP A, SEXP prec, PrimmeSvdsParams primme_svds) {
        typedef SEXP(*Ptr__zprimme_svds)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__zprimme_svds p__zprimme_svds = NULL;
        if (p__zprimme_svds == NULL) {
            validateSignature("List(*_zprimme_svds)(ComplexMatrix,ComplexMatrix,ComplexMatrix,ComplexMatrix,SEXP,SEXP,PrimmeSvdsParams)");
            p__zprimme_svds = (Ptr__zprimme_svds)R_GetCCallable("PRIMME", "_PRIMME__zprimme_svds");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__zprimme_svds(Shield<SEXP>(Rcpp::wrap(orthol)), Shield<SEXP>(Rcpp::wrap(orthor)), Shield<SEXP>(Rcpp::wrap(initl)), Shield<SEXP>(Rcpp::wrap(initr)), Shield<SEXP>(Rcpp::wrap(A)), Shield<SEXP>(Rcpp::wrap(prec)), Shield<SEXP>(Rcpp::wrap(primme_svds)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

}

#endif // RCPP_PRIMME_RCPPEXPORTS_H_GEN_
