Files
OpenCL-CTS/test_common/harness/rounding_mode.h
Marcin Hajder 4216c5323d Fp16 conversions staging (#1864)
* Added unification of existing conversions test as preparation for cl_khr_fp16 adaptation

* Unified initialization procedures for conversions test.

* Completed unification of data structures to handle cl_khr_fp16

* Added support for selective launch of the test

* Added half support for test_conversions, work in progres (issue #142, conversions)

* Added more work on halfs support for conversions test (issue #142, conversions)

* Added cosmetic corrections

* Added more cosmetic corrections before opening draft PR

* Added corrections related to pre-submit windows build

* Added more pre-build related corrections

* Added pre-submit ubuntu build related correction

* Added more pre-submit related corrections

* Divided structures into separate source files (issue #142, conversions)

* Added more corrections related to presubmit check

* Removed redeclarations due to presubmit check

* Added more corrections related to presubmit check arm build

* Added cosmetic correction

* Adapted modifications from related PR #1719 to avoid merging conflicts

* fixed clang format

* Added corrections related to code review (cl_khr_fp16 suuport according to issue #142)

* Corrections related to macos CI check fail

* fix for unclear clang format discrepancy

* More corrections related to code review (cl_khr_fp16 for conversions #142)

---------

Co-authored-by: Ewan Crawford <ewan@codeplay.com>
2023-12-18 10:14:33 -08:00

62 lines
1.4 KiB
C

//
// Copyright (c) 2017 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef __ROUNDING_MODE_H__
#define __ROUNDING_MODE_H__
#include "compat.h"
#if (defined(_WIN32) && defined(_MSC_VER))
#include "errorHelpers.h"
#include "testHarness.h"
#endif
typedef enum
{
kDefaultRoundingMode = 0,
kRoundToNearestEven,
kRoundUp,
kRoundDown,
kRoundTowardZero,
kRoundingModeCount
} RoundingMode;
typedef enum
{
kuchar = 0,
kchar = 1,
kushort = 2,
kshort = 3,
kuint = 4,
kint = 5,
khalf = 6,
kfloat = 7,
kdouble = 8,
kulong = 9,
klong = 10,
// This goes last
kTypeCount
} Type;
extern RoundingMode set_round(RoundingMode r, Type outType);
extern RoundingMode get_round(void);
extern void *FlushToZero(void);
extern void UnFlushToZero(void *p);
#endif /* __ROUNDING_MODE_H__ */