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

Fixed casting issue #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all 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
4 changes: 2 additions & 2 deletions Solutions/Exercise09/C/pi_ocl.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main(int argc, char *argv[])
int nsteps;
float step_size;
size_t nwork_groups;
size_t max_size, work_group_size = 8;
size_t work_group_size = 8;
float pi_res;

cl_mem d_partial_sums;
Expand Down Expand Up @@ -145,7 +145,7 @@ int main(int argc, char *argv[])

nsteps = work_group_size * niters * nwork_groups;
step_size = 1.0f/(float)nsteps;
h_psum = calloc(sizeof(float), nwork_groups);
h_psum = (float*)calloc(sizeof(float), nwork_groups);
if (!h_psum)
{
printf("Error: could not allocate host memory for h_psum\n");
Expand Down