This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][libomptarget] Fix union.
ClosedPublic

Authored by gtbercea on Mar 8 2018, 8:43 AM.

Details

Summary

To make the two parts of the union have the same size, the size of vect needs to be increased by 16 bits.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

gtbercea created this revision.Mar 8 2018, 8:43 AM
ABataev added inline comments.Mar 8 2018, 9:09 AM
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
162–163

It is better to remove this union at all and use memcpy

gtbercea updated this revision to Diff 137590.Mar 8 2018, 9:23 AM

Eliminate union as suggested in the comment.

gtbercea marked an inline comment as done.Mar 8 2018, 9:23 AM
This revision is now accepted and ready to land.Mar 8 2018, 9:24 AM
gtbercea updated this revision to Diff 137602.Mar 8 2018, 10:06 AM

Use assignment.

grokos accepted this revision.Mar 8 2018, 10:20 AM

I think the assignment makes more sense.

This revision was automatically updated to reflect the committed changes.