/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.translator.transformation.claw.parallelize;

/**
 * Hold various information about the promotion of variable.
 *
 * @author clementval
 */
public class PromotionInfo {
  private String _identifier;
  private int _baseDimension;
  private int _targetDimension;


  /**
   * Contructs a new PromotionInfo object with all its information.
   * @param id               Identifier of the promoted variable.
   * @param baseDimension    Number of dimensions before the promotion.
   * @param targetDimension  Number of dimensions after the promotion.
   */
  public PromotionInfo(String id, int baseDimension, int targetDimension){
    _identifier = id;
    _baseDimension = baseDimension;
    _targetDimension = targetDimension;
  }

  /**
   * Check whether the variable was a scalar before the promotion.
   * @return True if the variable was a scalar. False otherwise.
   */
  public boolean wasScalar(){
    return _baseDimension == 0;
  }

}

@@ -367,16 +367,46 @@
 ension;%0A
+  private String _targetType;%0A
 %0A%0A  /**%0A
@@ -501,17 +501,16 @@
         
- 
 Identifi
@@ -566,17 +566,16 @@
 nsion   
- 
 Number o
@@ -637,17 +637,16 @@
 mension 
- 
 Number o
@@ -675,24 +675,81 @@
  promotion.%0A
+   * @param targetType      Type if after the promotion.%0A
    */%0A  publ
@@ -814,17 +814,62 @@
 imension
-)
+,%0A                       String targetType)%0A  
 %7B%0A    _i
@@ -960,16 +960,46 @@
 ension;%0A
+    _targetType = targetType;%0A
   %7D%0A%0A  /
@@ -1206,10 +1206,148 @@
 0;%0A  %7D%0A%0A
+  /**%0A   * Get the type id after the promotion.%0A   * @return Type id.%0A   */%0A  public String getTargetType()%7B%0A    return _targetType;%0A  %7D%0A%0A
 %7D%0A

Add target type