I need to call a method from a third-party C library in my Chapel application, which requires a 128 bit integer variable to be passed by value. Chapel does not have a native 128 bit integral type defined, other than complex(128), which is a combination of 2 64 bit real types. If I was calling this method from a C/C++ program I could have used "long long" to passed it.
How do I create a 128 bit integral type (or equivalent) in Chapel and pass it to the third-party C library method from my Chapel program?
@Rinjo —
Assuming that Chapel does not need to understand the meaning of the 128-bit value directly itself, you should be able to define it as an external type using something like:
and then declare internal or external variables of that type using:
or pass such values between Chapel and C using things like:
If you're not already familiar with these features, you can learn more about them here: