45 #ifndef PARNAIVEWRAP_H
46 #define PARNAIVEWRAP_H
48 #ifdef USE_NAIVE_MULTITHREAD
50 #include <atomic_ops.h>
53 #include "ac/pthread.h"
71 struct ParNaiveSolverData;
80 mutable std::vector<integer> piv;
83 mutable std::vector<doublereal> fwd;
84 std::vector<integer> todo;
85 mutable std::vector<AO_t> row_locks;
86 mutable std::vector<AO_TS_t> col_locks;
98 struct thread_data_t {
100 ParNaiveSolver *pSLUS;
101 unsigned threadNumber;
106 mutable Op thread_operation;
107 mutable unsigned thread_count;
108 mutable pthread_mutex_t thread_mutex;
109 mutable pthread_cond_t thread_cond;
112 static void *thread_op(
void *arg);
121 ParNaiveSolver(
unsigned nt,
const integer &size,
126 ~ParNaiveSolver(
void);
129 void IsValid(
void)
const;
133 void Solve(
void)
const;
162 virtual void IsValid(
void)
const;
167 ParNaiveSparseSolutionManager(
unsigned nt,
172 ~ParNaiveSparseSolutionManager(
void);
194 class ParNaiveSparsePermSolutionManager:
public ParNaiveSparseSolutionManager {
197 void ComputePermutation();
208 mutable std::vector<integer> perm;
209 mutable std::vector<integer> invperm;
211 virtual void MatrReset(
void);
214 ParNaiveSparsePermSolutionManager(
unsigned nt,
217 virtual ~ParNaiveSparsePermSolutionManager(
void);
220 virtual void Solve(
void);
223 virtual void MatrInitialize(
void);
virtual VectorHandler * pResHdl(void) const =0
virtual MatrixHandler * pMatHdl(void) const =0
virtual void MatrReset(void)=0
virtual void Solve(void)=0
virtual void Solve(void) const =0
static const doublereal a
virtual VectorHandler * pSolHdl(void) const =0