Bug fixes:

--Cleaner exit on some failures.
--Better reporting of OpenCL errors.
This commit is contained in:
Person
2017-08-27 21:24:33 -07:00
parent 4749a7aec4
commit 5da944f589
3 changed files with 56 additions and 4 deletions

View File

@ -985,6 +985,39 @@ size_t OpenCLWrapper::LocalMemSize() const { return m_LocalMemSize; }
size_t OpenCLWrapper::GlobalMemSize() const { return m_GlobalMemSize; }
size_t OpenCLWrapper::MaxAllocSize() const { return m_MaxAllocSize; }
/// <summary>
/// Clear the error report for this class as well as the global OpenCLInfo instance.
/// </summary>
void OpenCLWrapper::ClearErrorReport()
{
EmberReport::ClearErrorReport();
m_Info->ClearErrorReport();
}
/// <summary>
/// Concatenate and return the error report for this class and the
/// global OpenCLInfo instance as a single string.
/// </summary>
/// <returns>The concatenated error report string</returns>
string OpenCLWrapper::ErrorReportString()
{
auto s = EmberReport::ErrorReportString();
return s + m_Info->ErrorReportString();
}
/// <summary>
/// Concatenate and return the error report for this class and the
/// global OpenCLInfo instance as a vector of strings.
/// </summary>
/// <returns>The concatenated error report vector of strings</returns>
vector<string> OpenCLWrapper::ErrorReport()
{
auto ours = EmberReport::ErrorReport();
auto s = m_Info->ErrorReport();
ours.insert(ours.end(), s.begin(), s.end());
return ours;
}
/// <summary>
/// Make even grid dimensions.
/// The size of the blocks in terms of threads must divide evenly into the total number of threads in the grid.