Name

all - returns true if a boolean scalar or all components of a boolean vector are true.

Synopsis

bool all(bool a);
bool all(bool1 a);
bool all(bool2 a);
bool all(bool3 a);
bool all(bool4 a);

Parameters

a
Boolean vector or scalar of which to determine if any component is true.

Description

Returns true if a boolean scalar or all components of a boolean vector are true.

Reference Implementation

all for a bool4 vector could be implemented like this.

bool all(bool4 a)
{
  return a.x && a.y && a.z && a.w;
}

Profile Support

all is supported in all profiles.

Support in the fp20 is limited.

See Also

any