1 // 2 // Copyright (C) 2009-2021 Intel Corporation 3 // 4 // SPDX-License-Identifier: MIT 5 // 6 // 7 8 #pragma once 9 10 #include "GRLOCLCompatibility.h" 11 GRL_NAMESPACE_BEGIN(GRL)12GRL_NAMESPACE_BEGIN(GRL) 13 14 GRL_INLINE float4 bitShiftLdexp4(float4 x, int4 y) 15 { 16 y = (y + 127) << 23; 17 return x * as_float4(y); 18 } 19 bitShiftLdexp3(float3 x,int3 y)20 GRL_INLINE float3 bitShiftLdexp3(float3 x, int3 y) 21 { 22 y = (y + 127) << 23; 23 return x * as_float3(y); 24 } 25 bitShiftLdexp(float x,int y)26 GRL_INLINE float bitShiftLdexp(float x, int y) 27 { 28 y = (y + 127) << 23; 29 return x * as_float(y); 30 } 31 32 GRL_NAMESPACE_END(GRL)