Package org.trifort.rootbeer.generate.opencl.fields

Examples of org.trifort.rootbeer.generate.opencl.fields.OffsetCalculator


    try {
      SootClass soot_class = m_sootClass;
     
      //find the largest size from all super classes
      while(true){
        OffsetCalculator calc = OpenCLScene.v().getOffsetCalculator(soot_class);
        int size = calc.getSize(soot_class);
        if(size > max){
          max = size;
        }
        if(soot_class.hasSuperclass()){
          soot_class = soot_class.getSuperclass();
View Full Code Here


  public OffsetCalculator getOffsetCalculator(SootClass soot_class){
    List<CompositeField> composites = getCompositeFields();
    for(CompositeField composite : composites){
      List<SootClass> classes = composite.getClasses();
      if(classes.contains(soot_class))
        return new OffsetCalculator(composite);
    }
    throw new RuntimeException("Cannot find composite field for soot_class");
  }
View Full Code Here

  public int getSize(){
    return getType().getSize();
  }

  private void calculateOffsets(CompositeField composite){   
    OffsetCalculator calc = new OffsetCalculator(composite);
    m_offsets = new TreeMap<Integer, List<SootClass>>();
    for(SootClass sclass : composite.getClasses()){
      int field_offset = calc.getOffset(this, sclass);
      List<SootClass> classes;
      if(m_offsets.containsKey(field_offset)){
        classes = m_offsets.get(field_offset);
      } else {
        classes = new ArrayList<SootClass>();
View Full Code Here

TOP

Related Classes of org.trifort.rootbeer.generate.opencl.fields.OffsetCalculator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.