Skip to content

Horizontal reductions with scalar initializer #66

@edanor

Description

@edanor

All reduction operations should also have a version with a scalar initializer. These operations are necessary to improve the programmability. For example to perform a hoirzontal reduction with a scalar value, the user has to write:

SIMDVec<float, 4> vec(...);
float init_value = ...;
float max_value = std::max(vec.hmax(), init_value);

With the scalar initializers one could just write:

float max_value = vec.hmax(init_value);

I've already extended the interface with HMAXS/MHMAXS, but the changes have to be propagated to all plugins and other reduction operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions