mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Dates corrected in copyright headers to reflect original publication date (2018 for OpenCL, 2020 for Level Zero). Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
36 lines
916 B
C++
36 lines
916 B
C++
/*
|
|
* Copyright (C) 2019-2021 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/helpers/simd_helper.h"
|
|
|
|
#include "test.h"
|
|
|
|
namespace NEO {
|
|
|
|
template <typename WALKER_TYPE>
|
|
class GivenSimdSizeWhenGetSimdConfigCalledThenCorrectEnumReturned {
|
|
public:
|
|
static void TestBodyImpl() {
|
|
uint32_t simd = 32;
|
|
auto result = getSimdConfig<WALKER_TYPE>(simd);
|
|
EXPECT_EQ(result, WALKER_TYPE::SIMD_SIZE::SIMD_SIZE_SIMD32);
|
|
|
|
simd = 16;
|
|
result = getSimdConfig<WALKER_TYPE>(simd);
|
|
EXPECT_EQ(result, WALKER_TYPE::SIMD_SIZE::SIMD_SIZE_SIMD16);
|
|
|
|
simd = 8;
|
|
result = getSimdConfig<WALKER_TYPE>(simd);
|
|
EXPECT_EQ(result, WALKER_TYPE::SIMD_SIZE::SIMD_SIZE_SIMD8);
|
|
|
|
simd = 1;
|
|
result = getSimdConfig<WALKER_TYPE>(simd);
|
|
EXPECT_EQ(result, WALKER_TYPE::SIMD_SIZE::SIMD_SIZE_SIMD32);
|
|
}
|
|
};
|
|
} // namespace NEO
|