cornell-zhang / heterocl

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

[Backend][SODA]: Generate valid SODA code #123

Closed Blaok closed 5 years ago

Blaok commented 5 years ago

Since the ternary operator is not supported in SODA, HeteroCL need to generate select(condition, true_value, false_value) instead of condition ? true_value : false_value.

seanlatias commented 5 years ago

Seems like there's something wrong within the LLVM build. Let me take a look and see if I can fix it.

Blaok commented 5 years ago

Added another fix. I also merged the two functions that can print SODA code. Please let me know if that breaks anything.