Passing C enum arguments in CALL_EXTERNAL? [message #83231] |
Thu, 14 February 2013 19:35 |
Matt Francis
Messages: 94 Registered: May 2010
|
Member |
|
|
I have another CALL_EXTERNAL question. I am trying to call cblas_dgemm (see docs here http://www.prism.gatech.edu/~ndantam3/cblas-doc/doc/html/cbl as_8h.html#cbc643095eb54edbffb0c5e9080a2450 ) which requires, amongst other things, enum type arguements:
const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB
Now, my understanding is that enums are equivalent to INTs, which makes them equivalent to IDL LONGs. I've also checked the cblas.h code to find
enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102};
enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113};
So this I thought told me the values to set an IDL INT to in order to successfully call the routine. I set
> CBLAS_ORDER = 102l
However, calling the routing gives and error and crashes the IDL session. The error is random, but here is an example:
Order must be 101 or 102, but is set to 31094592Parameter 1 to routine cblas_dgemm was incorrect
The value '31094592' is different each time, which to me indicates the arguments are not correctly set. This is actually the first argument, so this shouldn't be caused by one of the other being set incorrectly. Does anyone know if there is anything trick with C enum? Or possible with const arguments? (or anything else...).
|
|
|