On Thu, 20 Oct 2011, nathan binkert wrote:

Is it possible to have multiple definitions of an enum, and decide at the
time of execution which one to be used?

Using enums properly, no.  Enums are compile time type information.
You can approximate this though using casts and stuff like that.


Let me paint the actual situation. Each coherence protocol in Ruby generates a MachineType enum, and this varies depending on the protocol. This enum and some of the functions defined on the enum are used in different parts of Ruby. Currently, I see this enum to be the only blocking factor in compiling different protocols together. I have not been able to find a good way to make this enum private to the protocols. Any suggestions?

Thanks
Nilay
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to