[foreign-memaccess] [Rev 01] RFR: JDK-8241866:Add API to reshape sequence layouts

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Mar 31 14:24:48 UTC 2020


> https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html
> 
> As in Python, clients can use _at most_ one `-1` dimension value, and that dimension value will be inferred by
> remaining dimensions.
> The changes also add the `flatten` method, which does the opposite - e.g. take a sequence layout, whose element layout
> could be other nested sequence layouts and flatten everything into an outermost sequence layout (where element count is
> adjusted as needed).  These routines are fairly general and helpful and I found myself in need for something similar
> when writing code doing parallel processing of memory segments, but there are many other possible use cases.

Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The incremental
webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits
since the last revision:

 - Addressed review comments
 - Fix whitespaces
 - Forgot to add file
 - Add SequenceLayout::reshape/flatten

-------------

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/75/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/75/files/12f351f6..494bdd4e

Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/75/webrev.01
 - incr: https://webrevs.openjdk.java.net/panama-foreign/75/webrev.00-01

  Stats: 65 lines in 5 files changed: 57 ins; 2 del; 6 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/75.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/75/head:pull/75

PR: https://git.openjdk.java.net/panama-foreign/pull/75


More information about the panama-dev mailing list