3 #ifndef DISTNMF_DISTANLSBPP_HPP_ 4 #define DISTNMF_DISTANLSBPP_HPP_ 15 #define ONE_THREAD_MATRIX_SIZE 1000 18 #define ONE_THREAD_MATRIX_SIZE giventInput.n_cols + 5 23 template <
class INPUTMATTYPE>
29 void allocateMatrices() {}
34 void updateOtherGivenOneMultipleRHS(
const MAT& giventGiven,
35 const MAT& giventInput,
MAT* othermat) {
37 #pragma omp parallel for schedule(dynamic) 38 for (
UINT i = 0; i < numThreads; i++) {
41 if (spanEnd > giventInput.n_cols - 1) {
42 spanEnd = giventInput.n_cols - 1;
46 if (spanStart <= spanEnd) {
47 if (spanStart == spanEnd) {
49 giventGiven, (
VEC)giventInput.col(spanStart),
true);
52 giventGiven, (
MAT)giventInput.cols(spanStart, spanEnd),
true);
58 <<
", end=" << spanEnd
59 <<
", tid=" << omp_get_thread_num());
67 <<
", end=" << spanEnd
68 <<
", tid=" << omp_get_thread_num()
69 <<
" cpu=" << sched_getcpu());
72 if (spanStart == spanEnd) {
74 (*othermat).row(i) = solVec;
76 (*othermat).rows(spanStart, spanEnd) =
93 updateOtherGivenOneMultipleRHS(this->HtH, this->AHtij, &this->W);
94 this->Wt = this->W.t();
103 updateOtherGivenOneMultipleRHS(this->WtW, this->WtAij, &this->H);
104 this->Ht = this->H.t();
109 const MAT& rightlowrankfactor,
111 :
DistAUNMF<INPUTMATTYPE>(input, leftlowrankfactor, rightlowrankfactor,
112 communicator, numkblks) {
113 localWnorm.zeros(this->k);
114 Wnorm.zeros(this->k);
115 PRINTROOT(
"DistANLSBPP() constructor successful");
130 #endif // DISTNMF_DISTANLSBPP_HPP_ MATTYPE getSolutionMatrix()
#define DISTPRINTINFO(MSG)
VECTYPE getSolutionVector()
#define ONE_THREAD_MATRIX_SIZE
Provides the updateW and updateH for the distributed ANLS/BPP algorithm.
ncp_factors contains the factors of the ncp every ith factor is of size n_i * k number of factors is ...
DistANLSBPP(const INPUTMATTYPE &input, const MAT &leftlowrankfactor, const MAT &rightlowrankfactor, const MPICommunicator &communicator, const int numkblks)