Skip to content

[RFC]: add blas/ext/base/gscale-norm2 #655

@kgryte

Description

@kgryte

This API implements

$$y = \frac{x}{||x||_2}$$

This API divides each element in x by L2-norm and assigns the results to elements in y.

API signatures:

gscaleNorm2( N, x, strideX, y, strideY )
gscaleNorm2.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )

where

  • N: number of indexed elements.
  • x: input strided array.
  • strideX: stride length for x.
  • offsetX: starting index for x.
  • y: output strided array.
  • strideY: stride length for y.
  • offsetY: starting index for y.

Notes

  • To implement, call blas/base/*nrm2, followed by blas/ext/base/*wax with alpha = 1 / nrm2(x).

Follow-on Work

Once completed and merged, the following packages can be added

  • [RFC]: add blas/ext/base/dscale-norm2
  • [RFC]: add blas/ext/base/sscale-norm2
  • [RFC]: add blas/ext/base/ndarray/dscale-norm2
  • [RFC]: add blas/ext/base/ndarray/sscale-norm2
  • [RFC]: add blas/ext/base/ndarray/gscale-norm2
  • [RFC]: add blas/ext/scale-norm2

Metadata

Metadata

Assignees

Labels

FeatureTask to add a new feature.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions