-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UR] Support platform dependant typedefs #705
[UR] Support platform dependant typedefs #705
Conversation
a01d624
to
ab75ef2
Compare
@@ -490,6 +495,14 @@ typedef struct ur_rect_region_t { | |||
|
|||
} ur_rect_region_t; | |||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good approach.
@@ -32,6 +32,11 @@ from templates import helper as th | |||
// standard headers | |||
#include <stdint.h> | |||
#include <stddef.h> | |||
#if defined(_WIN32) | |||
#define NOMINMAX | |||
#include "windows.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows.h
is a bit notorious for being a big nasty mess, as noted by the need for NOMINMAX
. I have a feeling HANDLE
is actually defined in a different header, I'm gonna poke around on a Windows machine to see if we can avoid including windows.h
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the very least we should #define WIN32_LEAN_AND_MEAN
before including windows.h
.
6e9c995
to
7b47297
Compare
- an ISO-C standard identifier | ||
- a list of objects | ||
- `if` must be by one of {`Linux`, `Windows`, `Darwin`} | ||
- `else` must be None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe empry instead of None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also this doesn't say if
and else
should be mutually exclusive, it doesn't make sense to have when both at the same time.
7b47297
to
24ce983
Compare
24ce983
to
9d03fe4
Compare
Bindless images will implement this with |
This PR will enable platform dependent types to be defined as part of the UR specification. The supported platform types are: "Windows", "Linux" & "Darwin". This is useful to model platform specific types in UR such as a file descriptor.
TODO
typedef
value in YaML.mdwindows.h
has to be included since we refer toHANDLE
Closes #704