4 Commits

Author SHA1 Message Date
Slava Zakharin
1563a8752b
[flang][runtime] Allow building CUDA PTX library without global vars definitions. (#90280) 2024-04-29 08:19:45 -07:00
Slava Zakharin
8ebf741136
[flang][runtime] Prepare enabling PRINT of integer32 for device. (#86247)
This commit adds required files into the offload build closure,
which means adding RT_API_ATTRS and other markers.

The implementation does not work for CUDA yet, because of
std::variant,swap,reverse usage. These issues will be resolved
separately (e.g. by using libcudacxx header files).
2024-03-25 16:01:25 -07:00
Slava Zakharin
71e0261fb0
[flang][runtime] Added Fortran::common::optional for use on device.
This is a simplified implementation of std::optional that can be used
in the offload builds for the device code. The methods are properly
marked with RT_API_ATTRS so that the device compilation succedes.

Reviewers: klausler, jeanPerier

Reviewed By: jeanPerier

Pull Request: https://github.com/llvm/llvm-project/pull/85177
2024-03-15 14:25:47 -07:00
Peter Klausler
bafbae238a [flang] Initial UTF-8 support in runtime I/O
Implements UTF-8 encoding and decoding for external units
with OPEN(ENCODING='UTF-8').  This encoding applies to default
CHARACTER values that are not 7-bit ASCII as well as to
the wide CHARACTER kinds 2 and 4.  Basic testing is in place
via direct calls to the runtime I/O APIs, but serious checkout
awaits lowering support of the wide CHARACTER kinds.

Differential Revision: https://reviews.llvm.org/D122038
2022-03-22 11:48:14 -07:00