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

Fix sub_group_mask_constructors #819

Merged
merged 3 commits into from
Nov 4, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ void copy_ulong_long2marray(sycl::marray<T, dim>& marray,
elem_size * dim > sizeof(value) ? sizeof(value) : elem_size * dim;
size_t shift = 0;
size_t i = 0;
char* valuePtr = reinterpret_cast<char*>(&value);
bader marked this conversation as resolved.
Show resolved Hide resolved
while (shift + elem_size <= num_bytes && i < dim) {
memcpy(&(marray[i]), &value + shift, elem_size);
memcpy(&(marray[i]), valuePtr + shift, elem_size);
++i;
shift += elem_size;
}
Expand All @@ -52,8 +53,9 @@ void copy_marray2ulong_long(unsigned long long& value,
elem_size * dim > sizeof(value) ? sizeof(value) : elem_size * dim;
size_t shift = 0;
size_t i = 0;
char* valuePtr = reinterpret_cast<char*>(&value);
bader marked this conversation as resolved.
Show resolved Hide resolved
while (shift + elem_size <= num_bytes && i < dim) {
memcpy(&value + shift, &(marray[i]), elem_size);
memcpy(valuePtr + shift, &(marray[i]), elem_size);
++i;
shift += elem_size;
}
Expand Down