Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about __align__ #593

Open
zjin-lcf opened this issue Aug 22, 2023 · 1 comment
Open

question about __align__ #593

zjin-lcf opened this issue Aug 22, 2023 · 1 comment
Assignees

Comments

@zjin-lcf
Copy link
Contributor

typedef struct __align__(4)
{
  unsigned char r, g, b, a;
}
uchar4_aligned;

causes compile error (Please see zjin-lcf/HeCBench#46 for more details).

Is the following recommended for nvcc, hipcc, and clang++ ?

typedef struct
{
  unsigned char r, g, b, a;
}
uchar4_aligned __attribute__((aligned(4)));
@linehill
Copy link
Collaborator

The __align__ has been broken for a while but it used to work until some patch broke it. There's a ticket for it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants