Free host arrays at end of program

This commit is contained in:
Tom Deakin 2015-07-28 13:59:31 +01:00
parent a9a087622d
commit dcf734387e
2 changed files with 10 additions and 0 deletions

View File

@ -288,6 +288,11 @@ int main(int argc, char *argv[])
<< std::endl; << std::endl;
} }
// Free host vectors
free(h_a);
free(h_b);
free(h_c);
} }
std::string getDeviceName(int device) std::string getDeviceName(int device)

View File

@ -313,6 +313,11 @@ int main(int argc, char *argv[])
<< std::endl; << std::endl;
} }
// Free host vectors
free(h_a);
free(h_b);
free(h_c);
} }
catch (cl::Error &e) catch (cl::Error &e)
{ {