Poplar and PopLibs
|
IPU vector math functions. More...
#include <ipudef.h>
#include <cmath>
#include "__vector_math.h"
Namespaces | |
namespace | ipu |
IPU intrinsic functions. | |
Functions | |
float | ipu::acos (float x) |
The arccos function, the inverse of cosine. More... | |
float2 | ipu::acos (float2 x) |
The arccos function, the inverse of cosine. More... | |
half | ipu::acos (half x) |
The arccos function, the inverse of cosine. More... | |
half2 | ipu::acos (half2 x) |
The arccos function, the inverse of cosine. More... | |
half4 | ipu::acos (half4 x) |
The arccos function, the inverse of cosine. More... | |
float | ipu::acosh (float x) |
The arccosh function, the inverse of the hyperbolic cosine. More... | |
float2 | ipu::acosh (float2 x) |
The arccosh function, the inverse of the hyperbolic cosine. More... | |
half | ipu::acosh (half x) |
The arccosh function, the inverse of the hyperbolic cosine. More... | |
half2 | ipu::acosh (half2 x) |
The arccosh function, the inverse of the hyperbolic cosine. More... | |
half4 | ipu::acosh (half4 x) |
The arccosh function, the inverse of the hyperbolic cosine. More... | |
float | ipu::asin (float x) |
The arcsin function, the inverse of sine. More... | |
float2 | ipu::asin (float2 x) |
The arcsin function, the inverse of sine. More... | |
half | ipu::asin (half x) |
The arcsin function, the inverse of sine. More... | |
half2 | ipu::asin (half2 x) |
The arcsin function, the inverse of sine. More... | |
half4 | ipu::asin (half4 x) |
The arcsin function, the inverse of sine. More... | |
float | ipu::asinh (float x) |
The arcsinh function, the inverse of the hyperbolic sine. More... | |
float2 | ipu::asinh (float2 x) |
The arcsinh function, the inverse of the hyperbolic sine. More... | |
half | ipu::asinh (half x) |
The arcsinh function, the inverse of the hyperbolic sine. More... | |
half2 | ipu::asinh (half2 x) |
The arcsinh function, the inverse of the hyperbolic sine. More... | |
half4 | ipu::asinh (half4 x) |
The arcsinh function, the inverse of the hyperbolic sine. More... | |
float | ipu::atan (float x) |
The arctan function, the inverse of tangent. More... | |
float2 | ipu::atan (float2 x) |
The arctan function, the inverse of tangent. More... | |
half | ipu::atan (half x) |
The arctan function, the inverse of tangent. More... | |
half2 | ipu::atan (half2 x) |
The arctan function, the inverse of tangent. More... | |
half4 | ipu::atan (half4 x) |
The arctan function, the inverse of tangent. More... | |
float | ipu::atanh (float x) |
The arctanh function, the inverse of the hyperbolic tangent. More... | |
float2 | ipu::atanh (float2 x) |
The arctanh function, the inverse of the hyperbolic tangent. More... | |
half | ipu::atanh (half x) |
The arctanh function, the inverse of the hyperbolic tangent. More... | |
half2 | ipu::atanh (half2 x) |
The arctanh function, the inverse of the hyperbolic tangent. More... | |
half4 | ipu::atanh (half4 x) |
The arctanh function, the inverse of the hyperbolic tangent. More... | |
float | ipu::cbrt (float x) |
The cubic root function. More... | |
float2 | ipu::cbrt (float2 x) |
The cubic root function. More... | |
half | ipu::cbrt (half x) |
The cubic root function. More... | |
half2 | ipu::cbrt (half2 x) |
The cubic root function. More... | |
half4 | ipu::cbrt (half4 x) |
The cubic root function. More... | |
float | ipu::ceil (float x) |
Rounds up input to the closest integral value. More... | |
float2 | ipu::ceil (float2 x) |
Rounds up input to the closest integral value. More... | |
half | ipu::ceil (half x) |
Rounds up input to the closest integral value. More... | |
half2 | ipu::ceil (half2 x) |
Rounds up input to the closest integral value. More... | |
half4 | ipu::ceil (half4 x) |
Rounds up input to the closest integral value. More... | |
float | ipu::cos (float x) |
The trigonometric cosine function. More... | |
float2 | ipu::cos (float2 x) |
The trigonometric cosine function. More... | |
half | ipu::cos (half x) |
The trigonometric cosine function. More... | |
half2 | ipu::cos (half2 x) |
The trigonometric cosine function. More... | |
half4 | ipu::cos (half4 x) |
The trigonometric cosine function. More... | |
float | ipu::cosh (float x) |
The hyperbolic cosine function. More... | |
float2 | ipu::cosh (float2 x) |
The hyperbolic cosine function. More... | |
half | ipu::cosh (half x) |
The hyperbolic cosine function. More... | |
half2 | ipu::cosh (half2 x) |
The hyperbolic cosine function. More... | |
half4 | ipu::cosh (half4 x) |
The hyperbolic cosine function. More... | |
float | ipu::erf (float x) |
The error function. More... | |
float2 | ipu::erf (float2 x) |
The error function. More... | |
half | ipu::erf (half x) |
The error function. More... | |
half2 | ipu::erf (half2 x) |
The error function. More... | |
half4 | ipu::erf (half4 x) |
The error function. More... | |
float | ipu::erfc (float x) |
The complementary error function. More... | |
float2 | ipu::erfc (float2 x) |
The complementary error function. More... | |
half | ipu::erfc (half x) |
The complementary error function. More... | |
half2 | ipu::erfc (half2 x) |
The complementary error function. More... | |
half4 | ipu::erfc (half4 x) |
The complementary error function. More... | |
float2 | ipu::exp (float2 x) |
The base-e exponential function. More... | |
half | ipu::exp (half x) |
The base-e exponential function. More... | |
half4 | ipu::exp (half4 x) |
The base-e exponential function. More... | |
float2 | ipu::exp2 (float2 x) |
The base-2 exponential function. More... | |
half | ipu::exp2 (half x) |
The base-2 exponential function. More... | |
half4 | ipu::exp2 (half4 x) |
The base-2 exponential function. More... | |
float | ipu::expm1 (float x) |
The base-e exponential function, minus one: exp(x ) - 1. More... | |
float2 | ipu::expm1 (float2 x) |
The base-e exponential function, minus one: exp(x ) - 1. More... | |
half | ipu::expm1 (half x) |
The base-e exponential function, minus one: exp(x ) - 1. More... | |
half2 | ipu::expm1 (half2 x) |
The base-e exponential function, minus one: exp(x ) - 1. More... | |
half4 | ipu::expm1 (half4 x) |
The base-e exponential function, minus one: exp(x ) - 1. More... | |
float | ipu::fabs (float x) |
Computes the absolute value of the input. More... | |
float2 | ipu::fabs (float2 x) |
Computes the absolute value of the input. More... | |
half | ipu::fabs (half x) |
Computes the absolute value of the input. More... | |
half2 | ipu::fabs (half2 x) |
Computes the absolute value of the input. More... | |
half4 | ipu::fabs (half4 x) |
Computes the absolute value of the input. More... | |
float | ipu::floor (float x) |
Rounds down input to the closest integral value. More... | |
float2 | ipu::floor (float2 x) |
Rounds down input to the closest integral value. More... | |
half | ipu::floor (half x) |
Rounds down input to the closest integral value. More... | |
half2 | ipu::floor (half2 x) |
Rounds down input to the closest integral value. More... | |
half4 | ipu::floor (half4 x) |
Rounds down input to the closest integral value. More... | |
float | ipu::log (float x) |
The natural logarithm. More... | |
float2 | ipu::log (float2 x) |
The natural logarithm. More... | |
half | ipu::log (half x) |
The natural logarithm. More... | |
half2 | ipu::log (half2 x) |
The natural logarithm. More... | |
half4 | ipu::log (half4 x) |
The natural logarithm. More... | |
float | ipu::log10 (float x) |
The base-10 logarithm. More... | |
float2 | ipu::log10 (float2 x) |
The base-10 logarithm. More... | |
half | ipu::log10 (half x) |
The base-10 logarithm. More... | |
half2 | ipu::log10 (half2 x) |
The base-10 logarithm. More... | |
half4 | ipu::log10 (half4 x) |
The base-10 logarithm. More... | |
float | ipu::log1p (float x) |
The natural logarithm of 1 + x . More... | |
float2 | ipu::log1p (float2 x) |
The natural logarithm of 1 + x . More... | |
half | ipu::log1p (half x) |
The natural logarithm of 1 + x . More... | |
half2 | ipu::log1p (half2 x) |
The natural logarithm of 1 + x . More... | |
half4 | ipu::log1p (half4 x) |
The natural logarithm of 1 + x . More... | |
float2 | ipu::log2 (float2 x) |
The base-2 logarithm. More... | |
half | ipu::log2 (half x) |
The base-2 logarithm. More... | |
half4 | ipu::log2 (half4 x) |
The base-2 logarithm. More... | |
float | ipu::nearbyint (float x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
float2 | ipu::nearbyint (float2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
half | ipu::nearbyint (half x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
half2 | ipu::nearbyint (half2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
half4 | ipu::nearbyint (half4 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
float | ipu::rint (float x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
float2 | ipu::rint (float2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
half | ipu::rint (half x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
half2 | ipu::rint (half2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
half4 | ipu::rint (half4 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
float | ipu::round (float x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
float2 | ipu::round (float2 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
half | ipu::round (half x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
half2 | ipu::round (half2 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
half4 | ipu::round (half4 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
float | ipu::sin (float x) |
The trigonometric sine function. More... | |
float2 | ipu::sin (float2 x) |
The trigonometric sine function. More... | |
half | ipu::sin (half x) |
The trigonometric sine function. More... | |
half2 | ipu::sin (half2 x) |
The trigonometric sine function. More... | |
half4 | ipu::sin (half4 x) |
The trigonometric sine function. More... | |
float | ipu::sinh (float x) |
The hyperbolic sine function. More... | |
float2 | ipu::sinh (float2 x) |
The hyperbolic sine function. More... | |
half | ipu::sinh (half x) |
The hyperbolic sine function. More... | |
half2 | ipu::sinh (half2 x) |
The hyperbolic sine function. More... | |
half4 | ipu::sinh (half4 x) |
The hyperbolic sine function. More... | |
float | ipu::sqrt (float x) |
The square root function. More... | |
float2 | ipu::sqrt (float2 x) |
The square root function. More... | |
half | ipu::sqrt (half x) |
The square root function. More... | |
half2 | ipu::sqrt (half2 x) |
The square root function. More... | |
half4 | ipu::sqrt (half4 x) |
The square root function. More... | |
float | ipu::rsqrt (float x) |
The reciprocal square root function. More... | |
float2 | ipu::rsqrt (float2 x) |
The reciprocal square root function. More... | |
half | ipu::rsqrt (half x) |
The reciprocal square root function. More... | |
half2 | ipu::rsqrt (half2 x) |
The reciprocal square root function. More... | |
half4 | ipu::rsqrt (half4 x) |
The reciprocal square root function. More... | |
float | ipu::tan (float x) |
The trigonometric tangent function. More... | |
float2 | ipu::tan (float2 x) |
The trigonometric tangent function. More... | |
half | ipu::tan (half x) |
The trigonometric tangent function. More... | |
half2 | ipu::tan (half2 x) |
The trigonometric tangent function. More... | |
half4 | ipu::tan (half4 x) |
The trigonometric tangent function. More... | |
float2 | ipu::tanh (float2 x) |
The hyperbolic tangent function. More... | |
half | ipu::tanh (half x) |
The hyperbolic tangent function. More... | |
half4 | ipu::tanh (half4 x) |
The hyperbolic tangent function. More... | |
float | ipu::tgamma (float x) |
The gamma function. More... | |
float2 | ipu::tgamma (float2 x) |
The gamma function. More... | |
half | ipu::tgamma (half x) |
The gamma function. More... | |
half2 | ipu::tgamma (half2 x) |
The gamma function. More... | |
half4 | ipu::tgamma (half4 x) |
The gamma function. More... | |
float | ipu::trunc (float x) |
Rounds input towards zero to the nearest integral value that is not larger in magnitude than x . More... | |
float2 | ipu::trunc (float2 x) |
Rounds input towards zero to the nearest integral value that is not larger in magnitude than x . More... | |
half | ipu::trunc (half x) |
Rounds input towards zero to the nearest integral value that is not larger in magnitude than x . More... | |
half2 | ipu::trunc (half2 x) |
Rounds input towards zero to the nearest integral value that is not larger in magnitude than x . More... | |
half4 | ipu::trunc (half4 x) |
Rounds input towards zero to the nearest integral value that is not larger in magnitude than x . More... | |
float | ipu::sigmoid (float x) |
The sigmoid function, ie 1/(1 + exp(- x )). More... | |
float2 | ipu::sigmoid (float2 x) |
The sigmoid function, ie 1/(1 + exp(- x )). More... | |
half | ipu::sigmoid (half x) |
The sigmoid function, ie 1/(1 + exp(- x )). More... | |
half2 | ipu::sigmoid (half2 x) |
The sigmoid function, ie 1/(1 + exp(- x )). More... | |
half4 | ipu::sigmoid (half4 x) |
The sigmoid function, ie 1/(1 + exp(- x )). More... | |
float | ipu::atan2 (float x, float y) |
The arctangent of ( y )/( x ), in radians. More... | |
float2 | ipu::atan2 (float2 x, float2 y) |
The arctangent of ( y )/( x ), in radians. More... | |
half | ipu::atan2 (half x, half y) |
The arctangent of ( y )/( x ), in radians. More... | |
half2 | ipu::atan2 (half2 x, half2 y) |
The arctangent of ( y )/( x ), in radians. More... | |
half4 | ipu::atan2 (half4 x, half4 y) |
The arctangent of ( y )/( x ), in radians. More... | |
float | ipu::copysign (float x, float y) |
Composes a value of magnitude x with the sign of y . More... | |
float2 | ipu::copysign (float2 x, float2 y) |
Composes a value of magnitude x with the sign of y . More... | |
half | ipu::copysign (half x, half y) |
Composes a value of magnitude x with the sign of y . More... | |
half2 | ipu::copysign (half2 x, half2 y) |
Composes a value of magnitude x with the sign of y . More... | |
half4 | ipu::copysign (half4 x, half4 y) |
Composes a value of magnitude x with the sign of y . More... | |
float | ipu::fdim (float x, float y) |
Calculates the absolute difference between the two inputs. More... | |
float2 | ipu::fdim (float2 x, float2 y) |
Calculates the absolute difference between the two inputs. More... | |
half | ipu::fdim (half x, half y) |
Calculates the absolute difference between the two inputs. More... | |
half2 | ipu::fdim (half2 x, half2 y) |
Calculates the absolute difference between the two inputs. More... | |
half4 | ipu::fdim (half4 x, half4 y) |
Calculates the absolute difference between the two inputs. More... | |
float | ipu::fmax (float x, float y) |
Calculates the maximum of the two inputs. More... | |
float2 | ipu::fmax (float2 x, float2 y) |
Calculates the maximum of the two inputs. More... | |
half | ipu::fmax (half x, half y) |
Calculates the maximum of the two inputs. More... | |
half2 | ipu::fmax (half2 x, half2 y) |
Calculates the maximum of the two inputs. More... | |
half4 | ipu::fmax (half4 x, half4 y) |
Calculates the maximum of the two inputs. More... | |
float | ipu::fmin (float x, float y) |
Calculates the minimum of the two inputs. More... | |
float2 | ipu::fmin (float2 x, float2 y) |
Calculates the minimum of the two inputs. More... | |
half | ipu::fmin (half x, half y) |
Calculates the minimum of the two inputs. More... | |
half2 | ipu::fmin (half2 x, half2 y) |
Calculates the minimum of the two inputs. More... | |
half4 | ipu::fmin (half4 x, half4 y) |
Calculates the minimum of the two inputs. More... | |
float | ipu::fmod (float x, float y) |
Calculates the remainder of the division x / y rounded towards zero. More... | |
float2 | ipu::fmod (float2 x, float2 y) |
Calculates the remainder of the division x / y rounded towards zero. More... | |
half | ipu::fmod (half x, half y) |
Calculates the remainder of the division x / y rounded towards zero. More... | |
half2 | ipu::fmod (half2 x, half2 y) |
Calculates the remainder of the division x / y rounded towards zero. More... | |
half4 | ipu::fmod (half4 x, half4 y) |
Calculates the remainder of the division x / y rounded towards zero. More... | |
float | ipu::hypot (float x, float y) |
Calculates the hypotenuse of the right-angled triangle whose two shorter sides are of lengths given by the two inputs. More... | |
float2 | ipu::hypot (float2 x, float2 y) |
Calculates the hypotenuse of the right-angled triangle whose two shorter sides are of lengths given by the two inputs. More... | |
half | ipu::hypot (half x, half y) |
Calculates the hypotenuse of the right-angled triangle whose two shorter sides are of lengths given by the two inputs. More... | |
half2 | ipu::hypot (half2 x, half2 y) |
Calculates the hypotenuse of the right-angled triangle whose two shorter sides are of lengths given by the two inputs. More... | |
half4 | ipu::hypot (half4 x, half4 y) |
Calculates the hypotenuse of the right-angled triangle whose two shorter sides are of lengths given by the two inputs. More... | |
float | ipu::pow (float x, float y) |
Calculates x to the power of y . More... | |
float2 | ipu::pow (float2 x, float2 y) |
Calculates x to the power of y . More... | |
half | ipu::pow (half x, half y) |
Calculates x to the power of y . More... | |
half2 | ipu::pow (half2 x, half2 y) |
Calculates x to the power of y . More... | |
half4 | ipu::pow (half4 x, half4 y) |
Calculates x to the power of y . More... | |
float | ipu::remainder (float x, float y) |
Calculates the remainder of the division x / y , rounded to the nearest integral value, with halfway cases rounded to the even number. More... | |
float2 | ipu::remainder (float2 x, float2 y) |
Calculates the remainder of the division x / y , rounded to the nearest integral value, with halfway cases rounded to the even number. More... | |
half | ipu::remainder (half x, half y) |
Calculates the remainder of the division x / y , rounded to the nearest integral value, with halfway cases rounded to the even number. More... | |
half2 | ipu::remainder (half2 x, half2 y) |
Calculates the remainder of the division x / y , rounded to the nearest integral value, with halfway cases rounded to the even number. More... | |
half4 | ipu::remainder (half4 x, half4 y) |
Calculates the remainder of the division x / y , rounded to the nearest integral value, with halfway cases rounded to the even number. More... | |
float | ipu::fma (float x, float y, float z) |
Computes ( x * y ) + z . More... | |
float2 | ipu::fma (float2 x, float2 y, float2 z) |
Computes ( x * y ) + z . More... | |
half | ipu::fma (half x, half y, half z) |
Computes ( x * y ) + z . More... | |
half2 | ipu::fma (half2 x, half2 y, half2 z) |
Computes ( x * y ) + z . More... | |
half4 | ipu::fma (half4 x, half4 y, half4 z) |
Computes ( x * y ) + z . More... | |
long long | ipu::llrint (float x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
longlong2 | ipu::llrint (float2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
long long | ipu::llrint (half x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
longlong2 | ipu::llrint (half2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
longlong4 | ipu::llrint (half4 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
long long | ipu::llround (float x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
longlong2 | ipu::llround (float2 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
long long | ipu::llround (half x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
longlong2 | ipu::llround (half2 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
longlong4 | ipu::llround (half4 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
long | ipu::lrint (float x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
long2 | ipu::lrint (float2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
long | ipu::lrint (half x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
long2 | ipu::lrint (half2 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
long4 | ipu::lrint (half4 x) |
Rounds input to a nearby integral value, using the current rounding mode. More... | |
long | ipu::lround (float x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
long2 | ipu::lround (float2 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
long | ipu::lround (half x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
long2 | ipu::lround (half2 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
long4 | ipu::lround (half4 x) |
Rounds input to nearest integral value, with halfway cases rounded away from zero. More... | |
float | ipu::exp (float src) |
Targets the f32exp instruction. More... | |
half2 | ipu::exp (half2 src) |
Targets the f16v2exp instruction. More... | |
float | ipu::exp2 (float src) |
Targets the f32exp instruction. More... | |
half2 | ipu::exp2 (half2 src) |
Targets the f16v2exp instruction. More... | |
float | ipu::log2 (float src) |
Targets the f32ln instruction. More... | |
half2 | ipu::log2 (half2 src) |
Targets the f16v2log2 instruction. More... | |
float | ipu::tanh (float src) |
Targets the f32tanh instruction. More... | |
half2 | ipu::tanh (half2 src) |
Targets the f16v2tanh instruction. More... | |
IPU vector math functions.
Vector math functions that can be used in C++ IPU code.