This is an archive of the discontinued LLVM Phabricator instance.

add floor library function
ClosedPublic

Authored by bob80905 on Dec 1 2022, 12:36 PM.

Details

Summary

This change exposes the floor library function for HLSL,
excluding long, int, and long long doubles.
Floor 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 floor function only works on floating type arguments.

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

Diff Detail

Event Timeline

bob80905 created this revision.Dec 1 2022, 12:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 1 2022, 12:36 PM
Herald added a subscriber: Anastasia. · View Herald Transcript
bob80905 requested review of this revision.Dec 1 2022, 12:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 1 2022, 12:36 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bob80905 updated this revision to Diff 480218.Dec 5 2022, 1:07 PM
  • update with clang format
beanz accepted this revision.Dec 5 2022, 2:37 PM

LGTM. @bob80905 if you haven't already, you should follow the steps here (https://www.llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access) to get commit access.

This revision is now accepted and ready to land.Dec 5 2022, 2:37 PM
This revision was automatically updated to reflect the committed changes.