Skip to content

[RFC]: add blas/ext/base/gcusome #545

@kgryte

Description

@kgryte

This API is the strided equivalent of array/base/cusome and cumulatively tests whether at least k elements in a strided array are truthy.

API signatures:

cusome( N, k, x, strideX, out, strideOut )
cusome( N, k, x, strideX, offsetX, out, strideOut, offsetOut );

where

  • N: number of indexed elements
  • k: minimum number of truthy elements
  • x: input strided array
  • strideX: stride length of x
  • offsetX: starting index for x
  • out: output strided array
  • strideOut: stride length of out
  • offsetOut: starting index for out

Example:

var x = [ 0, 1, 1, 1 ];
var out = [ false, false, false, false ];

cusome( x.length, 2, x, 1, out, 1 );
// out => [ false, false, true, true ]

Follow-on Work

Once completed, the following packages can be added

  • [RFC]: add `blas/ext/base/dcusome
  • [RFC]: add blas/ext/base/scusome
  • [RFC]: add blas/ext/base/ccusome
  • [RFC]: add blas/ext/base/zcusome
  • [RFC]: add blas/ext/base/ndarray/dcusome
  • [RFC]: add blas/ext/base/ndarray/scusome
  • [RFC]: add blas/ext/base/ndarray/gcusome
  • [RFC]: add blas/ext/base/ndarray/ccusome
  • [RFC]: add blas/ext/base/ndarray/zcusome
  • [RFC]: add blas/ext/cusome

For the non-generic APIs, the output array should always be a boolean array.

Metadata

Metadata

Assignees

Labels

FeatureTask to add a new feature.difficulty: 1Low degree of difficulty. Should be straightforward to implement and/or resolve.estimate: <2hrsTask which should take less than 2 hours.priority: NormalNormal priority concern or feature request.🤖 AIAllowed to use AI.

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