Files
compute-runtime/opencl/source/helpers/enqueue_properties.h
Mateusz Jablonski 7df9945ebe Add absolute include paths
Change-Id: I67a6919bbbff1d30c7d6cdb257b41c87bad51e7f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-23 23:49:12 +01:00

59 lines
1.6 KiB
C++

/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/blit_commands_helper.h"
namespace NEO {
struct EnqueueProperties {
enum class Operation {
Blit,
ExplicitCacheFlush,
EnqueueWithoutSubmission,
DependencyResolveOnGpu,
GpuKernel,
};
EnqueueProperties() = delete;
EnqueueProperties(bool blitEnqueue, bool hasKernels, bool isCacheFlushCmd, bool flushDependenciesOnly,
const BlitPropertiesContainer *blitPropertiesContainer) {
if (blitEnqueue) {
operation = Operation::Blit;
this->blitPropertiesContainer = blitPropertiesContainer;
return;
}
if (hasKernels) {
operation = Operation::GpuKernel;
this->blitPropertiesContainer = blitPropertiesContainer;
return;
}
if (isCacheFlushCmd) {
operation = Operation::ExplicitCacheFlush;
return;
}
if (flushDependenciesOnly) {
operation = Operation::DependencyResolveOnGpu;
return;
}
operation = Operation::EnqueueWithoutSubmission;
}
bool isFlushWithoutKernelRequired() const {
return (operation == Operation::Blit) || (operation == Operation::ExplicitCacheFlush) ||
(operation == Operation::DependencyResolveOnGpu);
}
const BlitPropertiesContainer *blitPropertiesContainer = nullptr;
Operation operation = Operation::EnqueueWithoutSubmission;
};
} // namespace NEO