@Override public Unit matchScalarInteger( final TIntegerType t) throws JPRACompilerCheckerException { final BigInteger size = t.getSizeInBits().getValue(); if (!JPRAChecker.this.caps.isMatrixIntegerSizeSupported(size)) { throw JPRACompilerCheckerException.matrixIntegerSizeNotSupported( t, size, JPRAChecker.this.caps.getMatrixIntegerSizeSupported()); } return Unit.unit(); }
@Override public Unit matchScalarInteger( final TIntegerType t) throws JPRACompilerCheckerException { final BigInteger size = t.getSizeInBits().getValue(); if (!JPRAChecker.this.caps.isMatrixIntegerSizeSupported(size)) { throw JPRACompilerCheckerException.matrixIntegerSizeNotSupported( t, size, JPRAChecker.this.caps.getMatrixIntegerSizeSupported()); } return Unit.unit(); }
@Override public Unit matchScalarInteger( final TIntegerType t) throws JPRACompilerCheckerException { final BigInteger size = t.getSizeInBits().getValue(); if (!JPRAChecker.this.caps.isVectorIntegerSizeSupported(size)) { throw JPRACompilerCheckerException.vectorIntegerSizeNotSupported( t, size, JPRAChecker.this.caps.getVectorIntegerSizeSupported()); } return Unit.unit(); }
@Override public Unit matchScalarInteger( final TIntegerType t) throws JPRACompilerCheckerException { final BigInteger size = t.getSizeInBits().getValue(); if (!JPRAChecker.this.caps.isVectorIntegerSizeSupported(size)) { throw JPRACompilerCheckerException.vectorIntegerSizeNotSupported( t, size, JPRAChecker.this.caps.getVectorIntegerSizeSupported()); } return Unit.unit(); }
@Override public Unit matchInteger(final TIntegerType t) { /* Construct a meta type field, and assign a value to it. */ final FieldName f_name = this.field.getName(); final ClassName c_name = JPRAClasses.getModelScalarTypeForScalarType(t); final String meta_field_name = JPRAGeneratedNames.getMetaTypeFieldName(f_name); this.class_builder.addField( c_name, meta_field_name, Modifier.FINAL, Modifier.PRIVATE); this.constructor_builder.addStatement( "this.$N = $T.of($L)", meta_field_name, c_name, t.getSizeInBits().getValue()); return Unit.unit(); }
final BigInteger field_size = f_type.getSizeInBits().getValue(); final String mask = JPRAMasks.createOneMask( container_size.intValue(), 0, field_size.intValue() - 1);