Notes on the Space-Time Mapping of Divide-and-Conquer Recursions

NotesontheSpace-TimeMappingofDivide-and-ConquerRecursionsChristophHerrmannandChristianLengauerat akult Fur f MathematikundInformatikat ersit Univassau, Py Germanfherrmann,lengauerg@fmi.uni -pas sau. dehttp://brahms.fmi.uni-pas sau . de/ cl/Abstracte Wprop oseafunctionalprogrameleton skforbalanced xed-degreedivide-and-conquerandmetho dforitsparalleltation implemenonmessage-passingultipro m cessors.Inthemetho d,op erationsoftheeleton skare rstmapp edtoageometriccomputationalmo delh whicisthenmapp edtospace-timeinorderexp osethet inherenparallelism.Thish approacisinspiredy bmetho dofparallelizingnestedlo opsinthep olytop emo del.ords: Keywdivide-and-conquer,functionalprogramming,parallelization,p olytop emo del,eleton, skspace-timemapping.1tro InductionThedivide-and-conquer(D&C)paradigmisasp ecialcaseofcascadingrecursionh whicenablest eciensolutionstoy manpracticalproblemse liktheultiplication mofmatricesorlargetegers, infastourier Ftransform,sorting,etc.e Wareterested inintheparallelizationofD&Crecursionswithgoalsublinearexecutiontimesonamesh.y Sublinearitcanonlyb eed hiev acifinputdataarereadinparallelandpro cessedparallel.e Who coseameshb ecauseitiswidelyusedgeneral-purp osepro cessortop ologywithlargebisectionwidth.Inpractice,meshese v haonlyafewdimensionsypically (to) w tandproblemswithnon-lo calunication. commor Ftailrecursions(i.e.,lo ops),thereisaerful pw ocompile-timeparallelizationmetho dbasedontheideaofthespace-timemappingofp olytop es( nitep olyhedra)]. [7Thecomputationalmo delalo opnestise olytop p,h whicisb emeddedto inaulti-dimensional mteger inlattice.h Eacdimensionofthep olytop ecorresp ondstoonelo op.Thepts oinofthep olytop ecorresp ondtoindividualiterationslo opnest.ideaae-time ac spmappingreferstoco ordinatetransformationswithh whictime(parallelism)andspace(pro cessorallo cation)canb emadeexplicitinthismo del.Aspace-timemappingputsthep olytop eto inaco ordinatesystemh whicsomeaxesumerate enspace(i.e.,t represenparallello ops)andtheotherstimetial sequenlo ops). Thespace-timemappingcanb ehosen ctooptimizey anoneofab umer nob e jectivfunctionse liktheb umer nofexecutionsteps,pro cessors,hannels, cunications, commetc.Inorderforthemathematicaltheoryto, applythelo opb ounds,datadep endencesandspace-timemappingsust mb ear line.y Annesth whicquali esforthep olytop emo delcanb eacceleratedtolinearexecutiontime,i.e.,requiresonlyonetimedimension.Thetial sequenexecutiontimeofanestnlo ops(withrangesh whicdep endontheproblemsize)isap olynomialofdegreen.Ourgoalistoh approactheparallelizationofD&Crecursionsanalogously:e warelo okingforanappropriateometric gecomputationalmo delinh whictimeandspacecanb emadeexplicity bformalmappingswhosehoice ccanb eguidedy bcertainoptimizationcriteria.e Wust me v leathep olytop emo delb ecauseD&Crecursionsdonotful lleral sevofitsts. requiremenStill,asinlo opparallelization,theunderlyingdatastructureisector variable vwhosets elemencanb eaccessed. tly concurrenSp eci callyconsideredisthecaseofanon-binarydivision:ourstudyonp olynomialpro ductusingternaryD&C.2TheMo delLettheterme e gr d-de xeonquer divide-and-c[2]describ eclassofalgorithmsh whice solvaproblemy bdividingitto ina xedb umer, ny sak,ofsmallersubproblemsthesameyp te,thenely recursivapplyingitselftothesubproblemstil unabasiccaseished reacand,, nallybining comsolutionsofobtainthesolutionoforiginalproblem.Thebasiccasescanoftenb eed solvy batrivialalgorithm,butalsob eoftheD&Cyp tees. themselvBecausee wt an wtomap, staticallyi.e. ,indeptly endenalues v