cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
326 stars 92 forks source link

[Enhancement] Extension of initializing arbitrary bit integer in hcl.scalar from string #431

Open zzy82518996 opened 2 years ago

zzy82518996 commented 2 years ago

For fixing issues

Add feature: enable initializing the arbitrary bit integer using hcl.scalar from string

Link to the tests: tests/test_scalar.py

Detailed Description : We extend the heteroCL IR by adding the CastStr expression, and use APInt class to convert string to ConstantInt class in codegen_llvm.