[PATCH] D134921: [HLSL] add cos library function

Joshua Batista via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 16:20:45 PDT 2022


bob80905 created this revision.
bob80905 added reviewers: python3kgae, beanz, pow2clk.
Herald added a subscriber: Anastasia.
Herald added a project: All.
bob80905 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This change exposes the cos library function for HLSL,
excluding long, int, and long long doubles.
Cos is supported for all scalar, vector, and matrix types.

Long and long long double support is missing in this patch because those types
don't exist in HLSL. Int is missing because the cos function only works on floating type arguments.

The full documentation of the HLSL cos function is available here:
https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-cos


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134921

Files:
  clang/lib/Headers/hlsl/hlsl_intrinsics.h
  clang/test/CodeGenHLSL/builtins/cos.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134921.464084.patch
Type: text/x-patch
Size: 5990 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220929/7a786f74/attachment.bin>


More information about the cfe-commits mailing list