Implement assumed-shape arrays (array descriptors)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 173
Description
Original issue: https://gitlab.com/lfortran/lfortran/-/issues/50
Here is a nice explanation how gfortran does it:
https://thinkingeek.com/2017/01/14/gfortran-array-descriptor/
struct descriptor_dimension
{
ptrdiff_t stride;
ptrdiff_t lower_bound;
ptrdiff_t upper_bound;
};
template <int Rank, typename Type>
struct descriptor {
Type *base_addr;
size_t offset;
ptrdiff_t dtype;
descriptor_dimension dim[Rank];
};
MR https://gitlab.com/lfortran/lfortran/-/merge_requests/125 shows how to work with structures in LLVM.
MR https://gitlab.com/lfortran/lfortran/-/merge_requests/126 shows how to use GFortran's assumed-shape arrays from another Fortran or C++ compiler.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked explanation of gfortran array descriptors, then review merge requests 125 and 126 for the repository's existing structure and interoperability work. The issue provides no source files or tests; done means implementing assumed-shape arrays using array descriptors as described and validating the relevant Fortran/C++ interoperability behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, fortran
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100