Ignore:
Timestamp:
Nov 27, 2012, 5:35:06 PM (7 years ago)
Author:
cameron
Message:

Initial check-in for Hierarchical Merging Carry Pack Strategy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r2698 r2700  
    1010from carryInfo import *
    1111import CCGO
     12import CCGO_HMCPS
    1213
    1314name_substitution_map = {}
     
    167168    def visit_Call(self, callnode):     
    168169        self.generic_visit(callnode)
    169         if CarryCountOfFn(callnode) > 0 and not self.is_Assign_value(callnode):
     170        if CheckForBuiltin(callnode) and not self.is_Assign_value(callnode):
    170171        #if not self.is_Assign_value(callnode):
    171172            tempVar = ast.Name(self.genVar(), ast.Load())
     
    321322
    322323def Strategic_CCGO_Factory(carryInfoSet):
    323     ccgo = CCGO.testCCGO(carryInfoSet, 'carryQ')
     324    #ccgo = CCGO.testCCGO(carryInfoSet, 'carryQ')
     325    ops = carryInfoSet.operation_count
     326    if ops == 0: ccgo = CCGO.CCGO()
     327    elif ops <= 2: ccgo = CCGO_HMCPS.HMCPS_CCGO(64, carryInfoSet, 'carryG', '__c')
     328    elif ops <= 4: ccgo = CCGO_HMCPS.HMCPS_CCGO(32, carryInfoSet, 'carryG', '__c')
     329    elif ops <= 8: ccgo = CCGO_HMCPS.HMCPS_CCGO(16, carryInfoSet, 'carryG', '__c')
     330    else: ccgo = CCGO_HMCPS.HMCPS_CCGO(8, carryInfoSet, 'carryG', '__c')
    324331    return ccgo
    325332
Note: See TracChangeset for help on using the changeset viewer.