Intel® C++ Compiler 16.0 User and Reference Guide

_mm512_reduce_add_ps/_mm512_mask_reduce_add_ps

Returns a float32 scalar value of an addition operation. There is no corresponding instruction. This intrinsic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).

Syntax

Without Mask

extern float __cdecl _mm512_reduce_add_ps(_m512 v2);

With Mask

extern float __cdecl _mm512_mask_reduce_add_ps(__mmask16 k1, _m512 v2);

Parameters

v2

float32 vector used for the addition operation

k1

Writemask; only those elements of the source vectors with corresponding bit set to '1' in the k1 mask are computed and stored in the result

Description

Adds up all the elements of the float32 vector v2 and returns a scalar value. The addition operation is illustrated as follows:

v[0] + v[1] + v[2] + ...+ v[n] = scalar value

The masked variant has one additional argument: k1. Only those elements in the source registers with the corresponding bit set in vector mask k1 are used for computing. Elements in v2 with corresponding bit clear in k1 are copied as is to the resulting vector.

Returns

Returns the scalar value of the addition operation.