Intel® Software Network Knowledge Base Wiki


Constructing Nav Tree
One Moment...

(refresh menu)



 
Welcome, Guest | Quick Login | Register

Develop for Core processor


Implement ADDSUBxx Streaming SIMD Extensions 3 Instructions

Version 2, Changed by KYLE LEWIS on 1/3/2008
Created by: KYLEX.S.LEWIS@INTEL.COM

Challenge

Implement SSE3 single-precision and double-precision packed ADDSUBxx instructionsADDSUBPS has two 128-bit operands. The instruction performs single-precision addition on the second and fourth pairs of 32-bit data elements within the operands and single-precision subtraction on the first and third pairs. This instruction is effective at evaluating complex products on packed single-precision data.

ADDSUBPD has two 128-bit operands. The instruction performs double-precision addition on the second pair of quadwords and double-precision subtraction on the first pair. This instruction is useful when evaluating complex products on packed double-precision data.

Solution

Use the following guideline for packed ADDSUBxx instructions.

Double-precision and single-precision packed ADDSUBxx instructions are designed to support complex arithmetic computations. These instructions can be used with arrays of complex data types declared to be a structure of a real and imaginary numbers. The following example shows two code samples:

(A) Multiplies two pairs of single-precision, complex values

(B) Calculates the division of two pairs of single-precision, complex values

Double-precision complex multiplication and division can be calculated one pair at a time in a similar fashion. When evaluating more sophisticated expressions involving complex values, such as fractions with complex multiplications, evaluate the expression to favor multiplications and reduce the number of divisions.

Source

Next Generation Intel® Processor: Software Developers Guide

 



Served
23 Knowledge Bases
604 Pages
Search
Powering Up Search...


Vote on this Page

Tags For This Page
Loading Tags..

Tag This



Additional legal information