mul

Description

Multiply.

Signature

T mul<T>(
    T x,
    T y)
    where T : __BuiltinArithmeticType;

vector<T, N> mul<T, int N>(
    vector<T, N> x,
    T y)
    where T : __BuiltinArithmeticType;

vector<T, N> mul<T, int N>(
    T x,
    vector<T, N> y)
    where T : __BuiltinArithmeticType;

matrix<T, N, M> mul<T, int N, int M>(
    matrix<T, N, M> x,
    T y)
    where T : __BuiltinArithmeticType;

matrix<T, N, M> mul<T, int N, int M>(
    T x,
    matrix<T, N, M> y)
    where T : __BuiltinArithmeticType;

T mul<T, int N>(
    vector<T, N> x,
    vector<T, N> y)
    where T : __BuiltinFloatingPointType;

T mul<T, int N>(
    vector<T, N> x,
    vector<T, N> y)
    where T : __BuiltinIntegerType;

vector<T, M> mul<T, int N, int M>(
    vector<T, N> left,
    matrix<T, N, M> right)
    where T : __BuiltinFloatingPointType;

vector<T, M> mul<T, int N, int M>(
    vector<T, N> left,
    matrix<T, N, M> right)
    where T : __BuiltinIntegerType;

vector<T, M> mul<T, int N, int M>(
    vector<T, N> left,
    matrix<T, N, M> right)
    where T : __BuiltinLogicalType;

vector<T, N> mul<T, int N, int M>(
    matrix<T, N, M> left,
    vector<T, M> right)
    where T : __BuiltinFloatingPointType;

vector<T, N> mul<T, int N, int M>(
    matrix<T, N, M> left,
    vector<T, M> right)
    where T : __BuiltinIntegerType;

vector<T, N> mul<T, int N, int M>(
    matrix<T, N, M> left,
    vector<T, M> right)
    where T : __BuiltinLogicalType;

matrix<T, R, C> mul<T, int R, int N, int C>(
    matrix<T, R, N> left,
    matrix<T, N, C> right)
    where T : __BuiltinFloatingPointType;

matrix<T, R, C> mul<T, int R, int N, int C>(
    matrix<T, R, N> left,
    matrix<T, N, C> right)
    where T : __BuiltinIntegerType;

matrix<T, R, C> mul<T, int R, int N, int C>(
    matrix<T, R, N> left,
    matrix<T, N, C> right)
    where T : __BuiltinLogicalType;

DifferentialPair<vector<T, M>> mul<T, int N, int M>(
    DifferentialPair<vector<T, N>> left,
    DifferentialPair<matrix<T, N, M>> right)
    where T : __BuiltinFloatingPointType;

DifferentialPair<vector<T, N>> mul<T, int N, int M>(
    DifferentialPair<matrix<T, N, M>> left,
    DifferentialPair<vector<T, M>> right)
    where T : __BuiltinFloatingPointType;

DifferentialPair<matrix<T, R, C>> mul<T, int R, int N, int C>(
    DifferentialPair<matrix<T, R, N>> left,
    DifferentialPair<matrix<T, N, C>> right)
    where T : __BuiltinFloatingPointType;

void mul<T, int R, int N, int C>(
    inout DifferentialPair<matrix<T, R, N>> left,
    inout DifferentialPair<matrix<T, N, C>> right,
    matrix<T, R, C> dOut)
    where T : __BuiltinFloatingPointType;

Generic Parameters

T: __BuiltinArithmeticType

N : int

M : int

T: __BuiltinFloatingPointType

T: __BuiltinIntegerType

T: __BuiltinLogicalType

R : int

C : int

Parameters

x : T

The first value.

y : T

The second value.

x : vector<T, N>

The first value.

y : vector<T, N>

The second value.

x : matrix<T, N, M>

The first value.

y : matrix<T, N, M>

The second value.

left : vector<T, N>

right : matrix<T, N, M>

left : matrix<T, N, M>

right : vector<T, M>

left : matrix<T, R, N>

right : matrix<T, N, C>

left : DifferentialPair<vector<T, N >>

right : DifferentialPair<matrix<T, N, M >>

left : DifferentialPair<matrix<T, N, M >>

right : DifferentialPair<vector<T, M >>

left : DifferentialPair<matrix<T, R, N >>

right : DifferentialPair<matrix<T, N, C >>

dOut : matrix<T, R, C>

Return value

The inner product of x and y.

Availability and Requirements

Defined for the following targets:

hlsl

Available in all stages.

glsl

Available in all stages.

cpp

Available in all stages.

cuda

Available in all stages.

metal

Available in all stages.

spirv

Available in all stages.