Multiply-accumulate

Multiply-accumulate

In computing, especially digital signal processing, multiply-accumulate is a common operation that computes the product of two numbers and adds that product to an accumulator.

: a leftarrow a + b imes c

When done with floating point numbers it might be performed with two roundings (typical in many DSPs) or with a single rounding. When performed with a single rounding, it is called a fused multiply-add (FMA) or fused multiply-accumulate (FMAC).

Modern computers may contain a dedicated multiply-accumulate unit, or "MAC-unit", consisting of a multiplier implemented in combinational logic followed by an adder and an accumulator register which stores the result when clocked. The output of the register is fed back to one input of the adder, so that on each clock the output of the multiplier is added to the register. Combinational multipliers require a large amount of logic, but can compute a product much more quickly than the method of shifting and adding typical of earlier computers. The first processors to be equipped with MAC-units were digital signal processors, but the technique is now common in general-purpose processors too.

In floating-point arithmetic

When done with integers, the operation is typically exact (computed modulo some power of 2). However, floating-point numbers have only a certain amount of mathematical precision. That is, digital floating-point arithmetic is generally not associative or distributive. (See Floating point#Accuracy problems.)

Therefore, it makes a difference to the result whether the multiply-add is performed with two roundings, or in one operation with a single rounding. When performed with a single rounding, the operation is termed a fused multiply-add.

Fused multiply-add

A "fused" multiply-add is a floating-point multiply-add operation performed in one step, with a single rounding. That is, where an unfused multiply-add would compute the product b imes c, round it to "N" significant bits, add the result to "a", and round back to "N" significant bits, a fused multiply-add would compute the entire sum a+b imes c to its full precision before rounding the final result down to "N" significant bits.

When implemented in a microprocessor, this is typically faster than a multiply operation followed by an add. Because of this instruction there is no need for a hardware divide or square root unit, since they can both be implemented efficiently in software using the FMA.

A fast FMA can speed up and improve the accuracy of many computations which involve the accumulation of products:
* Dot product
* Matrix multiplication
* Polynomial evaluation (e.g., with Horner's rule)

The FMA operation will likely be added to IEEE 754 in IEEE 754r.

The 1999 standard of the C programming language supports the FMA operation through the fma standard math library function.

FMA capability is also present in the NVIDIA GeForce 200 Series (GTX 200) and NVIDIA Tesla T10 computing GPU processors. A fused multiply-add is implemented on the SPARC64, PowerPC, PA-RISC (PA-8000 and above) and Itanium processors and will be implemented in AMD processors with SSE5 instruction set support. Intel plans to implement FMA in its 'Haswell' chip, due sometime in 2012. [http://www.reghardware.co.uk/2008/08/19/idf_intel_architecture_roadmap/ - Intel adds 22nm octo-core 'Haswell' to CPU design roadmap, The Register]

Reference


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Multiply-accumulate — (« multiplie puis accumule », en anglais) est une opération arithmétique très souvent employée en traitement du signal, et correspondant à une instruction machine dans la plupart des DSP. Elle peut s écrire : Portail de… …   Wikipédia en Français

  • Multiply–accumulate operation — In computing, especially digital signal processing, the multiply–accumulate operation is a common step that computes the product of two numbers and adds that product to an accumulator. The hardware unit that performs the operation is known as a… …   Wikipedia

  • Multiply-Accumulate — Ein Multiplikationsakkumulator (MAK) oder englisch Multiplier Accumulator (MAC) kommt in der digitalen Signalverarbeitung in speziellen Signalprozessoren oder als Erweiterung konventioneller CPUs zum Einsatz (AltiVec, SIMD). Es kann die MAC… …   Deutsch Wikipedia

  • accumulate — ac·cu·mu·late vb lat·ed, lat·ing vt: to gather esp. little by little; specif: to add (income from a fund) back into the principal vi: to increase gradually in amount or number Merriam Webster’s Dictionary of Law. Merriam Webster. 1996 …   Law dictionary

  • multiply — index accrue (increase), accumulate (enlarge), bear (yield), compound, enlarge, expand …   Law dictionary

  • multiply — [v] increase; reproduce accumulate, add, aggrandize, aggregate, augment, boost, breed, build up, compound, cube, double, enlarge, expand, extend, generate, heighten, magnify, manifold, mount, populate, procreate, produce, proliferate, propagate,… …   New thesaurus

  • accumulate — Synonyms and related words: accouple, accrue, advance, agglomerate, agglutinate, aggregate, aggroup, amass, appreciate, articulate, assemble, associate, backlog, balloon, band, batch, bloat, bond, boom, bracket, breed, bridge, bridge over, bring… …   Moby Thesaurus

  • multiply — Synonyms and related words: abound with, accrue, accumulate, add, advance, aggrandize, algebraize, appreciate, army, augment, balloon, be alive with, be fruitful, be productive, bear, beef up, beget, bloat, boom, boost, breed, breed true, bristle …   Moby Thesaurus

  • accumulate — verb he has accumulated thousands of frequent flier miles mother whales transfer chemicals accumulated in their tissue to their offspring during gestation Syn: gather, collect, assemble; amass, stockpile, pile up, heap up, store (up), hoard,… …   Thesaurus of popular words

  • multiply — verb 1) their difficulties seem to be multiplying Syn: increase, grow, become more numerous, accumulate, proliferate, mount up, mushroom, snowball Ant: decrease 2) the rabbits have multiplied Syn …   Thesaurus of popular words

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”