-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I was looking into whether ableC supports pragma directives, since as it's defined they are designed to be used to communicate with the compiler/pre-processor, and I noticed that they aren't defined in ableC at all. I was wondering whether there was a reason for this, since it seems like we could use pragma directives to allow programmers to communicate with extensions.
For instance, the tensor algebra extension can generate parallel code, and I'd like to have this controlled by the programmer using the extension. My current solution is using define's, with an ifdef in the tensor header file, so if the programmer specified the define to enable parallelism there is a global variable with a fully qualified name that we can lookup. If we supported pragma's (and had a way of accessing them from extensions) we could make this easier. I'm thinking this could also be useful for my current work on a parallel back-end, since it could allow the programmer to define behaviors for the parallel back-end or even the allocator. I'd guess there might be other applications as well.
I don't want to put this on someone else's plate, if this seems like something reasonable to add, I'd be willing to work on it, just wanted to bring it up as a question.