Ignore:
Timestamp:
Dec 27, 2012, 7:07:56 AM (6 years ago)
Author:
cameron
Message:

Separate allocation from init, add BLOCK_SIZE parameter, tidy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r2792 r2799  
    322322
    323323def Strategic_CCGO_Factory(carryInfoSet):
     324  BLOCK_SIZE = 128
    324325  if experimentalMode:
    325326    ops = carryInfoSet.operation_count
    326327    if ops == 0: ccgo = CCGO.CCGO()
    327     elif ops <= 2: ccgo = CCGO_HMCPS.HMCPS_CCGO2(64, carryInfoSet, 'carryG', '__c')
    328     elif ops <= 4: ccgo = CCGO_HMCPS.HMCPS_CCGO2(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')
    331     else: ccgo = CCGO_HMCPS.HMCPS_CCGO2(16, carryInfoSet, 'carryG', '__c')
     328    elif ops <= 2: ccgo = CCGO_HMCPS.HMCPS_CCGO2(BLOCK_SIZE, 64, carryInfoSet, 'carryG', '__c')
     329    elif ops <= 4: ccgo = CCGO_HMCPS.HMCPS_CCGO2(BLOCK_SIZE, 32, carryInfoSet, 'carryG', '__c')
     330    #elif ops <= 8: ccgo = CCGO_HMCPS.HMCPS_CCGO(BLOCK_SIZE, 16, carryInfoSet, 'carryG', '__c')
     331    #else: ccgo = CCGO_HMCPS.HMCPS_CCGO(BLOCK_SIZE, 8, carryInfoSet, 'carryG', '__c')
     332    else: ccgo = CCGO_HMCPS.HMCPS_CCGO2(BLOCK_SIZE, 16, carryInfoSet, 'carryG', '__c')
    332333  else:
    333     ccgo = CCGO.testCCGO(carryInfoSet, 'carryQ')
     334    ccgo = CCGO.testCCGO(BLOCK_SIZE, carryInfoSet, 'carryQ')
     335  ccgo.allocate_all()
    334336  return ccgo
    335337
Note: See TracChangeset for help on using the changeset viewer.