Skip to content

Simplify the GENTFUNC/GENTPROT macros using variadic macros.#744

Merged
fgvanzee merged 1 commit intomasterfrom
simplify_gentfunc
May 7, 2023
Merged

Simplify the GENTFUNC/GENTPROT macros using variadic macros.#744
fgvanzee merged 1 commit intomasterfrom
simplify_gentfunc

Conversation

@devinamatthews
Copy link
Copy Markdown
Member

Variadic macros are a standard C99 feature and widely supported. I took care not to use variadic macros where 0 variadic arguments are expected as that is a non-standard extension.

@fgvanzee
Copy link
Copy Markdown
Member

fgvanzee commented May 7, 2023

Looks good to me. I'll draft a commit log entry and squash shortly.

@fgvanzee fgvanzee merged commit 0873c0f into master May 7, 2023
@fgvanzee fgvanzee deleted the simplify_gentfunc branch May 7, 2023 19:03
ct-clmsn pushed a commit to ct-clmsn/blis that referenced this pull request Jul 29, 2023
Details:
- Consolidated INSERT_GENTFUNC_* (and corresponding GENTPROT) macro sets
  using variadic macros (__VA_ARGS__), which means we no longer need a
  different INSERT_ macro for each possible number of arguments the 
  macro might take. This change seems reasonable given that variadic
  macros are a standard C99 feature and widely supported. I took care 
  not to use variadic macros where 0 variadic arguments are expected 
  since that is a non-standard extension.
- Added pre-typecast parentheses to arithmetic expressions in printf() 
  statements in bli_thread_range_tlb.c.
fgvanzee added a commit that referenced this pull request May 22, 2024
Details:
- Consolidated INSERT_GENTFUNC_* (and corresponding GENTPROT) macro sets
  using variadic macros (__VA_ARGS__), which means we no longer need a
  different INSERT_ macro for each possible number of arguments the
  macro might take. This change seems reasonable given that variadic
  macros are a standard C99 feature and widely supported. I took care
  not to use variadic macros where 0 variadic arguments are expected
  since that is a non-standard extension.
- Added pre-typecast parentheses to arithmetic expressions in printf()
  statements in bli_thread_range_tlb.c.
- (cherry picked from 0873c0f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants