40 lines · plain
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include <clc/internal/clc.h>10#include <clc/relational/relational.h>11 12#define _CLC_RELATIONAL_OP(X, Y) ((X) < (Y)) || ((X) > (Y))13 14_CLC_DEFINE_SIMPLE_RELATIONAL_BINARY(int, int, __clc_islessgreater, float,15 float)16 17#ifdef cl_khr_fp6418 19#pragma OPENCL EXTENSION cl_khr_fp64 : enable20 21// The scalar version of __clc_islessgreater(double, double) returns an int, but22// the vector versions return long.23_CLC_DEFINE_SIMPLE_RELATIONAL_BINARY(int, long, __clc_islessgreater, double,24 double)25 26#endif27 28#ifdef cl_khr_fp1629 30#pragma OPENCL EXTENSION cl_khr_fp16 : enable31 32// The scalar version of __clc_islessgreater(half, half) returns an int, but the33// vector versions return short.34_CLC_DEFINE_SIMPLE_RELATIONAL_BINARY(int, short, __clc_islessgreater, half,35 half)36 37#endif38 39#undef _CLC_RELATIONAL_OP40