mirror of
https://github.com/amd/blis.git
synced 2026-04-20 15:48:50 +00:00
Redefined BLIS_NUM_ARCHS to update automatically.
Details: - Changed BLIS_NUM_ARCHS from a cpp macro definition to the last enum value in the arch_t enum. This means that it no longer needs to get updated manually whenever new subconfigurations are added to BLIS. Also removed the explicit initial index assigment of 0 from the first enum value, which was unnecessary due to how the C language standard mandates indexing of enum values. Thanks to Devin Matthews for originally submitting this as a PR in #446. - Updated docs/ConfigurationHowTo.md to reflect the aforementioned change.
This commit is contained in:
@@ -677,14 +677,14 @@ Adding support for a new-subconfiguration to BLIS is similar to adding support f
|
||||
BLIS_ARCH_POWER7,
|
||||
BLIS_ARCH_BGQ,
|
||||
|
||||
BLIS_ARCH_GENERIC
|
||||
BLIS_ARCH_GENERIC,
|
||||
|
||||
BLIS_NUM_ARCHS
|
||||
|
||||
} arch_t;
|
||||
```
|
||||
Additionally, you'll need to update the definition of `BLIS_NUM_ARCHS` to reflect the new total number of enumerated `arch_t` values:
|
||||
```c
|
||||
#define BLIS_NUM_ARCHS 16
|
||||
```
|
||||
Notice that the total number of `arch_t` values, `BLIS_NUM_ARCHS`, is updated automatically.
|
||||
|
||||
|
||||
|
||||
* **`frame/base/bli_gks.c`**. We must also update the global kernel structure, or gks, to register the new sub-configuration during library initialization. Sub-configuration registration occurs in `bli_gks_init()`. For `knl`, updating this function amounts to inserting the following lines
|
||||
|
||||
Reference in New Issue
Block a user