multiplication by a constant is sublinear vassil dimitrov laurent imbert andrew zakaluzny

Post on 05-Jan-2016

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

multiplication by a

constant is sublinear

Vassil DimitrovLaurent Imbert

Andrew Zakaluzny

2 of 18

Introduction– The Topic

Theory– The Double Base Number System

Algorithms for SCM– DBNS Algorithms

Conclusions– Comparisons– Future Work

Question Period

outline

3 of 18

topic

The Single Constant Multiplication Problem (SCM)

– Multiply an (unknown) integer x by a constant integer c using as few additions and shifts as possible.

– Unknown Complexity– Minimize the cost

Previous Works

– Recoding Techniques – naïve double and add method, SD method

– Bernstein, Lefèvre, Boullis & Tisserand, Dempster & MacLeod

4 of 18

improving current algorithms

Sublinearity of SCM Algorithms:

– Conjectured by Lefevre in 2003

– Sublinearity: shown by R.G.E Pinch in 1996

5 of 18

theory

6 of 18

redundancy & sparseness

Very Redundant:– 10 has exactly 5 different

unsigned DBNRs

– 100 has exactly 402 different unsigned DBNRs

– 1000 has exactly 1,295,579 different unsigned DBNRs

7 of 18

theory

8 of 18

a DBNS approach

9 of 18

DBNS blocking

10 of 18

numerical data

11 of 18

visual: constant size blocking

12 of 18

DBNS SCM blocking algorithm

Known worst case cost of implementation

Highly configurable– LUT or Greedy– Parameter values

Larger LUT = Lower run time costStrategy (64 bit constants): Average Cost

Binary 31

CSD 21.4

DBNS Constant Size Blocking (LUT size = 8) 18.8

DBNS Constant Size Blocking (LUT size = 12) 17.7

DBNS Constant Size Blocking (LUT size = 16) 16.8

13 of 18

non-trivial block sizes

First alternative:

– Left to Right method: • Skip leading 0s, trailing 0s, and partition

accordingly• Visual Example: LUT size = 4

14 of 18

non-trivial block sizes

Second alternative:

– Right To Left method: • Look for barriers of 0s (i.e. 00 is a barrier

size of m = 2)• Visual Example: LUT size = 4, m = 2 (00)• Best results when m = 3 or 4

15 of 18

blocking results

16 of 18

conclusion

SCM is an interesting and open problem

DBNS for SCM:– Blocking:

• Provably sublinear • Simple• Low bit complexity• Known worst case complexity• Extendable to any bit size (with

appropriate blocking)

– Ideal Parameters have been identified (for 32 and 64 bit constants)

17 of 18

future work

Comparisons with competing methods– Build in hardware– Implement in a compiler– Better comparisons (speed vs area)

MCM problem

Other Blocking Algorithms

18 of 18

questions

top related