Skip to content

Propagate efficient NDArray scalar+tensor operations for staticTensor #39

Open
@Iainmon

Description

@Iainmon

Propagate efficient NDArray scalar+tensor operations such as

operator +(a: ndarray(?rank,?eltType),c: ?scalarType): ndarray(rank,eltType)
        where isNumericType(scalarType) do
    return ndarray.scalarMapOp("+",a,c);

up into the staticTensor and dynamicTensor world. Right now they are implemented as

// lib/StaticTensor.chpl
operator +(a: staticTensor(?rank,?eltType),c: ?scalarType): staticTensor(rank,eltType)
        where isNumericType(scalarType) {
    return a + staticTensor.valueLike(a,c : eltType);
}

Which is not the most efficient implementation, and should use the versions defined in NDArray.chpl.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions