Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add members and methods denoting comm ownership for Matrix and Vector methods

未关闭
#28 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp

调研方向

首先定位 CAROM::Vector 和 CAROM::Matrix 的类定义及其构造函数,然后检查现有的 communicator 或分布式索引工具。添加所请求的 communicator 成员、访问器和自由函数,并通过满足所列出的行范围、维度和进程所有权后置条件来表明已完成。

由索引模型根据 Issue 内容生成。

描述

Specifically, add the following to each class T, where T is a CAROM::Vector or CAROM::Matrix, a CAROM::Vector is treated as a single column matrix, and none of the functions below should be templated:

  • a private MPI_Comm d_comm member
  • initialize that member in the constructor of each object
  • include a MPI_Comm getComm() const getter method
  • a free function of the form std::vector<int> GetDimensionOnEachProcess(T &input), that returns the number of rows of the object on each process
  • a free function of the form std::vector<int> GetRowSpanOnEachProcess(T &input), where T is a CAROM::Matrix or CAROM::Vector that returns the range of row indices of the object on each process. Let std::vector<int> result be the value returned by this function. The following postconditions should be satisfied: (1) result.size() should be one plus the number of processes on d_comm, and (2) if a disjoint contiguous index span of input resides on each process such that index 0 is owned by process 0, and the lowest index owned by each process is an increasing sequence when ordered by increasing process number, then process p contains rows result[p] through result[p + 1] - 1
  • a free function of the form int GetProcessContainingRow(T &input, int row) such that if int result is returned by this function, then row row is on process number result

These utility functions come up frequently in implementing linear algebraic operations. I suspect that if data objects are associated with communicators, the operations like matrix decompositions will not need to have communicators associated with them.

主要语言
C++
星标
236
派生
47
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

llnl/libROM 的其他 Issue

查看 llnl/libROM 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。