General: Internal code generator overhaul

This commit is contained in:
Philippe Tillet
2016-04-02 18:19:33 -04:00
parent 6ac5e1f55b
commit 7f77fba4d4
131 changed files with 5854 additions and 5721 deletions

View File

@@ -33,8 +33,8 @@ Event::Event(backend_type backend) : backend_(backend), h_(backend_, true)
switch(backend_)
{
case CUDA:
cuda::check(dispatch::dispatch::cuEventCreate(&h_.cu().first, CU_EVENT_DEFAULT));
cuda::check(dispatch::dispatch::cuEventCreate(&h_.cu().second, CU_EVENT_DEFAULT));
check(dispatch::dispatch::cuEventCreate(&h_.cu().first, CU_EVENT_DEFAULT));
check(dispatch::dispatch::cuEventCreate(&h_.cu().second, CU_EVENT_DEFAULT));
break;
case OPENCL:
break;
@@ -54,7 +54,7 @@ long Event::elapsed_time() const
{
case CUDA:
float time;
cuda::check(dispatch::cuEventElapsedTime(&time, h_.cu().first, h_.cu().second));
check(dispatch::cuEventElapsedTime(&time, h_.cu().first, h_.cu().second));
return 1e6*time;
case OPENCL:
return static_cast<long>(ocl::info<CL_PROFILING_COMMAND_END>(h_.cl()) - ocl::info<CL_PROFILING_COMMAND_START>(h_.cl()));