Could you add a default enumeration to each of the various enumerations in Cloo? That is, an enumeration for the case when no flags are being passed - i.e. for the value 0. This would make it a lot easier to use in F#, which requires explicit enums for each value, or else a long, ugly type cast.
e.g. change
public enum CommandQueueFlags : long
{
QueueOutOfOrderExecModeEnable = ((int)(1 << 0)),
QueueProfilingEnable = ((int)(1 << 1)),
}
to
public enum CommandQueueFlags : long
{
QueueNoFlags = 0,
QueueOutOfOrderExecModeEnable = ((int)(1 << 0)),
QueueProfilingEnable = ((int)(1 << 1)),
}
Which lets me change
Microsoft.FSharp.Core.LanguagePrimitives.EnumOfValue<int64,OpenTK.Compute.CL10.CommandQueueFlags>(0L)
to
OpenTK.Compute.CL10.CommandQueueFlags.QueueNoFlags
This will be implemented into the next version which features a new hand-written layer of enums. The old one made use of autogenerated constructs and those didn't permit such modifications easily.
Ok. I've added None to queue flags. You can find it in /Cloo/Source/Enums.cs.
I also checked the rest of the enums but it doesn't make sense for them to have such a flag. For example, you have to specify read and/or write access for a buffer. Passing none in this case would be an error.
If you can think of more enums where such a value would be useful, let me know.
Awesome! I'll check out the latest snapshot and see how they work. :-)
Implemented in 0.6.0.