diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-30 15:42:12 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-30 15:42:12 +0000 |
commit | e5369885dd8c925f7394207dd2752d488f0379a3 (patch) | |
tree | f6cb31461b66c393921c3fb2f58b9a79fc593901 /clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage-custom.cpp | |
parent | b12e410082d4974d930a1e9eb2e2e1c7714c66c7 (diff) | |
download | bcm5719-llvm-e5369885dd8c925f7394207dd2752d488f0379a3.tar.gz bcm5719-llvm-e5369885dd8c925f7394207dd2752d488f0379a3.zip |
[LIBOMPTARGET] Add support for mapping of lambda captures.
Summary:
Added support for correct mapping of variables captured by reference in
lambdas. That kind of mapping may appear only in target-executable
regions and must follow the original lambda or another lambda capture
for the same lambda.
The expected data: base address - the address of the lambda, begin
pointer - pointer to the address of the lambda capture, size - size of
the captured variable.
When OMP_TGT_MAPTYPE_PTR_AND_OBJ mapping type is seen in
target-executable region, the target address of the last processed item
is taken as the address of the original lambda `tgt_lambda_ptr`. Then,
the pointer to capture on the device is calculated like `tgt_lambda_ptr
+ (host_begin_pointer - host_begin_base)` and the target-based address
of the original variable (which host address is
`*(void**)begin_pointer`) is written to that pointer.
Reviewers: kkwli0, gtbercea, grokos
Subscribers: openmp-commits
Differential Revision: https://reviews.llvm.org/D51107
llvm-svn: 345608
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage-custom.cpp')
0 files changed, 0 insertions, 0 deletions