Various fixes to constants:
- Made `PsConstant` immutable - Add `interpret_as`/`reinterpret_as` to apply data types to constants - Add docstrings to `PsConstant` - Add out-of-bounds checking to constant creation - Add test cases
Showing
- src/pystencils/backend/constants.py 40 additions, 10 deletionssrc/pystencils/backend/constants.py
- src/pystencils/backend/kernelcreation/typification.py 1 addition, 1 deletionsrc/pystencils/backend/kernelcreation/typification.py
- src/pystencils/types/basic_types.py 20 additions, 28 deletionssrc/pystencils/types/basic_types.py
- tests/nbackend/kernelcreation/test_typification.py 12 additions, 5 deletionstests/nbackend/kernelcreation/test_typification.py
- tests/nbackend/test_constant_folding.py 0 additions, 26 deletionstests/nbackend/test_constant_folding.py
- tests/nbackend/test_constants.py 79 additions, 0 deletionstests/nbackend/test_constants.py
- tests/nbackend/types/test_constants.py 0 additions, 80 deletionstests/nbackend/types/test_constants.py
Please register or sign in to comment