-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use hardware-accelerated __fp16 types with Clang
- Loading branch information
1 parent
ae992b5
commit 0264b55
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
#ifndef FP16_MACROS_H | ||
#define FP16_MACROS_H | ||
|
||
|
||
#ifndef FP16_USE_FP16_TYPE | ||
#if defined(__clang__) | ||
#if defined(__F16C__) || defined(__aarch64__) | ||
#define FP16_USE_FP16_TYPE 1 | ||
#endif | ||
#endif | ||
#if !defined(FP16_USE_FP16_TYPE) | ||
#define FP16_USE_FP16_TYPE 0 | ||
#endif // !defined(FP16_USE_FP16_TYPE) | ||
#endif // !defined(FP16_USE_FP16_TYPE) | ||
|
||
#endif /* FP16_MACROS_H */ |