dp4 - Four component dot product

dp4 - Four component dot product

Calling Format

dp4     dest, src0, src1

Operands

Name Registers
dest An output register or temporary register.
src0 A temporary register, input register, or floating-point constant register.
src1 A temporary register, input register, or floating-point constant register.

You cannot specify a floating-point constant register for both src0 and src1.
You cannot specify input registers using different indices for src0 and src1 at the same time.

Overview

Stores the dot product of the four components of src0 and src1 in dest.

Operation

dot = ( src0.x * src1.x ) + ( src0.y * src1.y ) + ( src0.z * src1.z )+ ( src0.w * src1.w )
dest.x = dot
dest.y = dot
dest.z = dot
dest.w = dot

Code Example

dp4     r0, c1,      v2
dp4     o0, r7.yzwx, c4.xxyw

Timetable

123456
dp4 read MUL ADD ADD post write

Revision History

2011/12/20
Initial version.

CONFIDENTIAL