This patch adds the Preprocessor changes needed by the standard algorithm offload feature being proposed here: https://discourse.llvm.org/t/rfc-adding-c-parallel-algorithm-offload-support-to-clang-llvm/72159/1. The verbose documentation is included in the head of the patch series. This change merely adds two macros to inform user space if we are compiling in stdpar mode and, respectively, if the optional allocation interposition mode has been requested, as well as associated minimal tests. The macros can be used by the runtime implementation of offload to drive conditional compilation, and are only defined if the HIP language has been enabled.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
190 ms | x64 debian > Clang.Driver::stdpar.c |
Event Timeline
Comment Actions
Updating this to reflect the outcome of the RFC, which is that this will be added as a HIP extension exclusively.
clang/lib/Frontend/InitPreprocessor.cpp | ||
---|---|---|
591 | We usually prefer defining the macro consistently in host and device compilation to avoid the chance of violation of ODR. |
We usually prefer defining the macro consistently in host and device compilation to avoid the chance of violation of ODR.