mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 03:01:20 +08:00
33 lines
665 B
C
33 lines
665 B
C
|
|
/*
|
||
|
|
* Copyright (C) 2023 Intel Corporation
|
||
|
|
*
|
||
|
|
* SPDX-License-Identifier: MIT
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
namespace NEO {
|
||
|
|
enum class TransferDirection {
|
||
|
|
HostToHost,
|
||
|
|
HostToLocal,
|
||
|
|
LocalToHost,
|
||
|
|
LocalToLocal,
|
||
|
|
};
|
||
|
|
|
||
|
|
inline TransferDirection createTransferDirection(bool srcLocal, bool dstLocal) {
|
||
|
|
if (srcLocal) {
|
||
|
|
if (dstLocal) {
|
||
|
|
return TransferDirection::LocalToLocal;
|
||
|
|
} else {
|
||
|
|
return TransferDirection::LocalToHost;
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
if (dstLocal) {
|
||
|
|
return TransferDirection::HostToLocal;
|
||
|
|
} else {
|
||
|
|
return TransferDirection::HostToHost;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
} // namespace NEO
|