I obtained a lot of error messages from compiler if I use two strings as below.
#define K 1./8192.
One message is below
MKL\\\\Include\\\\mkl_cblas.h(255): error: expected a ")"
const MKL_INT N, const MKL_INT K, const float *A, const MKL_INT lda,
I had open mkl_cblas.h and saw
void cblas_stbmv(, const MKL_INT K, );
Name of my favorite value is busied. Why not to use standard definition
void cblas_stbmv(, const MKL_INT, );?
Thanks for your useful suggestion. MKL header files are to beimproved for usability.
On the other hand, it's very dangerous using one letter macros names in programs.
E.g.,MY_K_CONSTANTcould improve readability of your program.
Having argument names in header files may help with systems like MS IntelliSense - you see the name of the arg while you type and this helps more than seeng just the type. There are functions with a dozen of arguments, many of them same type, so knowing the name is helpful.
One can always break compilation by defining some name *before* including other header file, no surprise. Is there something thatpreventsputting the definition *after* the header file is included?
Hi Victor, Dima,
Thanks for yours timely answers. I agree what usages of arguments names are very convenient (e.g. I use it in MS Studio). But I dont understand why single capital latter is used in MKL header file? If you have a look on MKL user guide when you can see what functions arguments are lowercase letters or capital letters with prefix.
Value K is used in cblas_stbmv function. I believe it is inner routine. Family of the functions ?tbmv with lowercase letters is available for users.
By the way, readability of code in software industry and applied computations are different values. Formulas as in the article it is a good case for me. Unfortunately, I compile multi files project and cant to swap #define and #include instructions.