#ifndef INCLUDE_GUARD_SOLVE_H
#define INCLUDE_GUARD_SOLVE_H

#include "R_api.h"

/**
 * Solves a linear equation system of the form
 *      A X = B
 * for `X` where `A` is a `dimA` x `dimA` matrix and `B` is `dimA` x `nrhs`.
 */
void solve(
    /*    dims */   const int dimA, const int nrhs,
    /*  matrix */   const double* A, const int ldA,
    /*  matrix */   const double* B, const int ldB,
    /*  matrix */         double* X, const int ldX,
                    double* work_mem, int* info
);

#endif /* INCLUDE_GUARD_SOLVE_H */
