pystencils.types.PsIntegerType#
- class pystencils.types.PsIntegerType(width, signed=True, const=False)#
Signed and unsigned integer types.
PsIntegerType
cannot be instantiated on its own, but only throughPsSignedIntegerType
andPsUnsignedIntegerType
. This distinction is meant mostly to help in pattern matching.- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- property numpy_dtype: dtype | None#
A np.dtype object representing this data type.
Available both for backward compatibility and for interaction with the numpy-based runtime system.
- create_literal(value)#
Create a C numerical literal for a constant of this type.
- Raises:
PsTypeError – If the given value’s type is not the numeric type’s compiler-internal representation.
- Return type:
- Parameters:
value (Any)
- create_constant(value)#
Create the internal representation of a constant with this type.
- Raises:
PsTypeError – If the given value cannot be interpreted in this type.
- Return type:
- Parameters:
value (Any)