Files
compute-runtime/shared/source/helpers/hw_walk_order.h
Mateusz Jablonski b697d75695 Correct dimension order in local ids generated for implicit args
when local ids are generated by HW, use same dim order for runtime generation
move common logic to separated file

Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-04 12:46:59 +01:00

28 lines
1.0 KiB
C++

/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <array>
#include <cstdint>
namespace NEO {
namespace HwWalkOrderHelper {
//make sure table below matches Hardware Spec
constexpr uint32_t walkOrderPossibilties = 6u;
constexpr uint8_t X = 0;
constexpr uint8_t Y = 1;
constexpr uint8_t Z = 2;
constexpr std::array<uint8_t, 3> compatibleDimensionOrders[walkOrderPossibilties] = {{X, Y, Z}, // 0 1 2
{X, Z, Y}, // 0 2 1
{Y, X, Z}, // 1 0 2
{Z, X, Y}, // 1 2 0
{Y, Z, X}, // 2 0 1
{Z, Y, X}}; // 2 1 0
} // namespace HwWalkOrderHelper
} // namespace NEO