Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Change permutedims!! interface #7

Open
mtfishman opened this issue May 8, 2020 · 0 comments
Open

Change permutedims!! interface #7

mtfishman opened this issue May 8, 2020 · 0 comments

Comments

@mtfishman
Copy link
Member

Currently, permutedims!!(R::Tensor, T::Tensor, perm, f::Function) accepts only a 2-argument function that applies pairwise to the elements of R and permutedims(T, perm).

This could be replaced by a more general function map_permutedims!!(f::Function, R::Tensor, T1::Tensor, perm1, T2::Tensor, perm2, ...), where f is an n-argument function for inputs (T1, perm1, T2, perm2, ..., Tn, permn). This could act as a useful backend for more general ITensor broadcasting, and could directly be written in terms of Strided.jl broadcast calls like:

@strided R .= f.(permutedims(T1, perm1), permutedims(T2, perm2), ...)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant