Skip to content

Commit 717ec7b

Browse files
committed
introduce SVE_ATTR macro
- Add a preprocessor guard around SVE-specific function attributes - Encapsulate the +sve attribute behind OMPI_MCA_OP_SVE_EXTRA_FLAGS, ensuring that only builds which detected and enabled compiler SVE support will compile with SVE-targeted code paths. - Simplifies later code by using SVE_ATTR in function declarations instead of repeating the attribute clause. Signed-off-by: Marco Vogel <marco.vogel@fernuni-hagen.de>
1 parent 99a1c85 commit 717ec7b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ompi/mca/op/aarch64/op_aarch64.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424

2525
BEGIN_C_DECLS
2626

27+
#if defined(OMPI_MCA_OP_SVE_EXTRA_FLAGS)
28+
#define SVE_ATTR __attribute__ ((__target__ ("+sve")))
29+
#else
30+
#define SVE_ATTR
31+
#endif
32+
2733
/**
2834
* Derive a struct from the base op component struct, allowing us to
2935
* cache some component-specific information on our well-known

0 commit comments

Comments
 (0)