Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
flopez committed May 9, 2020
1 parent 50dcda1 commit 0530a81
Showing 1 changed file with 0 additions and 126 deletions.
126 changes: 0 additions & 126 deletions src/kernels/assemble.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,132 +28,6 @@ namespace starpu {

extern starpu_data_handle_t workspace_hdl;

// Register handles for a node in StarPU
// template <typename NumericFrontType>
// void register_node(
// NumericFrontType& front) {

// using ValueType = typename NumericFrontType::ValueType;

// sylver::SymbolicFront& sfront = front.symb();
// int blksz = front.blksz();

// int const m = front.nrow();
// int const n = front.ncol();
// ValueType *a = front.lcol;
// int const lda = front.ldl();
// int const nr = front.nr(); // number of block rows
// int const nc = front.nc(); // number of block columns
// // sfront.handles.reserve(nr*nc);
// sfront.handles.resize(nr*nc); // Allocate handles

// for(int j = 0; j < nc; ++j) {
// int blkn = std::min(blksz, n - j*blksz);

// for(int i = j; i < nr; ++i) {
// int blkm = std::min(blksz, m - i*blksz);

// // TODO: remove the following register
// starpu_matrix_data_register(
// &(sfront.handles[i + j*nr]), // StarPU handle ptr
// STARPU_MAIN_RAM, // memory
// reinterpret_cast<uintptr_t>(&a[(j*blksz)*lda+(i*blksz)]),
// lda, blkm, blkn,
// sizeof(ValueType));

// // Register StarPU handle for block (i,j)
// front.blocks[j*nr+i].register_handle();

// }
// }

// int const ldcontrib = m-n;
// // Allocate and init handles in contribution blocks
// if (ldcontrib>0) {
// // Index of first block in contrib
// int rsa = n/blksz;
// // Number of block in contrib
// // int ncontrib = nr-rsa;

// for(int j = rsa; j < nr; j++) {
// for(int i = j; i < nr; i++) {
// // Register block in StarPU
// front.contrib_block(i, j).register_handle();
// // front.contrib_blocks[(i-rsa)+(j-rsa)*ncontrib].register_handle();
// }
// }
// }
// }

// ////////////////////////////////////////////////////////////////////////////////
// // register_node_indef

// /// @brief Register handles for a node in StarPU.
// template <typename NumericFrontType>
// void register_node_indef(NumericFrontType& front) {

// // Note: blocks are already registered when allocated
// using ValueType = typename NumericFrontType::ValueType;

// sylver::SymbolicFront& sfront = front.symb();
// int blksz = front.blksz();
// int m = front.nrow();
// int n = front.ncol();
// ValueType *a = front.lcol;
// int lda = spral::ssids::cpu::align_lda<ValueType>(m);
// int nr = front.nr(); // number of block rows
// int nc = front.nc(); // number of block columns
// auto& cdata = *front.cdata;

// // Block diagonal matrix
// ValueType *d = &a[n*lda];

// // sfront.handles.reserve(nr*nc);
// sfront.handles.resize(nr*nc); // allocate handles
// // printf("[register_front] sfront.handles size = %d\n", sfront.handles.size());
// for(int j = 0; j < nc; ++j) {

// int blkn = std::min(blksz, n - j*blksz);

// // Register cdata for APP factorization.
// // FIXME: Only if pivot_method is APP
// cdata[j].register_handle(); // Symbolic handle on column j
// cdata[j].register_d_hdl(d, 2*std::min((j+1)*blksz, n)); // Handle on diagonal D
// // cdata[j].register_d_hdl(d, 2*n); // Handle on diagonal D

// for(int i = j; i < nr; ++i) {
// int blkm = std::min(blksz, m - i*blksz);

// // TODO remove sfront.handles registration for indef case
// starpu_matrix_data_register(
// &(sfront.handles[i + j*nr]), // StarPU handle ptr
// STARPU_MAIN_RAM, // memory
// reinterpret_cast<uintptr_t>(&a[(j*blksz)*lda+(i*blksz)]),
// lda, blkm, blkn,
// sizeof(ValueType));

// // Register StarPU handle for block (i,j)
// front.blocks[j*nr+i].register_handle();
// }
// }

// int ldcontrib = m-n;

// // Allocate and init handles in contribution blocks
// if (ldcontrib>0 && front.contrib_blocks.size()>0) {
// // Index of first block in contrib
// int rsa = n/blksz;

// for(int j = rsa; j < nr; j++) {
// for(int i = j; i < nr; i++) {
// // Register block in StarPU
// // front.contrib_blocks[(i-rsa)+(j-rsa)*ncontrib].register_handle();
// front.contrib_block(i, j).register_handle();
// }
// }
// }
// }

/// @brief Unregister StarPU data handles associated with a node
template <typename NumericFrontType>
void unregister_node_indef(
Expand Down

0 comments on commit 0530a81

Please sign in to comment.