Skip to content

Pragmas in ableC #138

@counc009

Description

@counc009

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions