Skip to content

Commit

Permalink
Improve some style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-lindquist committed Nov 10, 2023
1 parent c6eea43 commit adbd340
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 34 deletions.
27 changes: 9 additions & 18 deletions src/ge2tb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ void ge2tb(
if (k < A_mt) {
BcastList bcast_list_V;
for (int64_t i = k; i < A_mt; ++i) {
// send A(i, k) across row A(i, k+1:nt-1)
bcast_list_V.push_back(
{i, k, {A.sub(i, i, k+1, A_nt-1)}});
}
Expand Down Expand Up @@ -279,15 +280,10 @@ void ge2tb(
// Can release tiles parallel to the main execution
#pragma omp task
{
for (int64_t i = k; i < A_mt; ++i) {
if (A.tileIsLocal(i, k)) {
A.tileUpdateOrigin(i, k);
A.releaseLocalWorkspaceTile(i, k);
}
else {
A.releaseRemoteWorkspaceTile(i, k);
}
}
// Ensure the origin is up to date, then remove the panel's workspace
U_panel.tileUpdateAllOrigin();
U_panel.releaseLocalWorkspace();
U_panel.releaseRemoteWorkspace();

for (int64_t i : first_indices) {
if (TUlocal.tileIsLocal( i, k )) {
Expand Down Expand Up @@ -435,15 +431,10 @@ void ge2tb(
// Can release tiles parallel to the main execution
#pragma omp task
{
for (int64_t j = k+1; j < A_nt; ++j) {
if (A.tileIsLocal(k, j)) {
A.tileUpdateOrigin(k, j);
A.releaseLocalWorkspaceTile(k, j);
}
else {
A.releaseRemoteWorkspaceTile(k, j);
}
}
// Ensure the origin is up to date, then remove the panel's workspace
V_panel.tileUpdateAllOrigin();
V_panel.releaseLocalWorkspace();
V_panel.releaseRemoteWorkspace();

for (int64_t j : first_indices) {
if (TVlocal.tileIsLocal( k, j )) {
Expand Down
15 changes: 5 additions & 10 deletions src/he2hb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -598,18 +598,13 @@ void he2hb(
// Release workspace tiles
#pragma omp task slate_omp_default_none \
depend( inout:block[ k ] ) \
shared( A, Tlocal, Treduce ) \
shared( A_panel, Tlocal, Treduce ) \
firstprivate( k, nt, first_indices )
{
for (int64_t i = k+1; i < nt; ++i) {
if (A.tileIsLocal( i, k )) {
A.tileUpdateOrigin( i, k );
A.releaseLocalWorkspaceTile( i, k );
}
else {
A.releaseRemoteWorkspaceTile( i, k );
}
}
// Ensure the origin is up to date, then remove the panel's workspace
A_panel.tileUpdateAllOrigin();
A_panel.releaseLocalWorkspace();
A_panel.releaseRemoteWorkspace();

for (int64_t i : first_indices) {
if (Tlocal.tileIsLocal( i, k )) {
Expand Down
10 changes: 4 additions & 6 deletions src/internal/internal_util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ inline bool compareSecond(
}

//------------------------------------------------------------------------------
/// An helper function to find each rank's first (top-most) row in panel k for
/// A helper function to find each rank's first (top-most) row in panel k for
/// the QR-family of routines.
///
/// @param[in] A_panel
Expand All @@ -80,8 +80,7 @@ inline bool compareSecond(
/// @param[in] k
/// Index of the current panel in the input matrix $A$.
///
/// @param[out] first_indices
/// The array of computed indices.
/// @return The array of computed indices.
///
/// @ingroup geqrf_impl
///
Expand Down Expand Up @@ -111,7 +110,7 @@ std::vector< int64_t > geqrf_compute_first_indices(
}

//------------------------------------------------------------------------------
/// An helper function to find each rank's first (left-most) row in panel k for
/// A helper function to find each rank's first (left-most) row in panel k for
/// the LQ-family of routines.
///
/// @param[in] A_panel
Expand All @@ -120,8 +119,7 @@ std::vector< int64_t > geqrf_compute_first_indices(
/// @param[in] k
/// Index of the current panel in the input matrix $A$.
///
/// @param[out] first_indices
/// The array of computed indices.
/// @return The array of computed indices.
///
/// @ingroup gelqf_impl
///
Expand Down

0 comments on commit adbd340

Please sign in to comment.