Static Public Attributes | |
| REMOVE | |
| STUB | |
| HCC_MACRO | |
| DEVICE_MACRO | |
| EXCEPTION | |
| ASSERT | |
| EMPTYBODY | |
How to disable functions
REMOVE - Remove the function entirely (includes the signature).
e.g.
FROM:
```ret_type function(arg_type1 arg1, ..., ){
...
...
...
}```
TO:
```
```
STUB - Stub the function and return an empty object based off the type.
e.g.
FROM:
```ret_type function(arg_type1 arg1, ..., ){
...
...
...
}```
TO:
```ret_type function(arg_type1 arg1, ..., ){
ret_type obj;
return obj;
}```
HCC_MACRO - Add !defined(__HIP_PLATFORM_HCC__) preprocessors around the function.
This macro is defined by HIP if the compiler used is hcc.
e.g.
FROM:
```ret_type function(arg_type1 arg1, ..., ){
...
...
...
}```
TO:
```#if !defined(__HIP_PLATFORM_HCC__)
ret_type function(arg_type1 arg1, ..., ){
...
...
...
}
#endif
```
DEVICE_MACRO - Add !defined(__HIP_DEVICE_COMPILE__) preprocessors around the function.
This macro is defined by HIP if either hcc or nvcc are used in the device path.
e.g.
FROM:
```ret_type function(arg_type1 arg1, ..., ){
...
...
...
}```
TO:
```#if !defined(__HIP_DEVICE_COMPILE__)
ret_type function(arg_type1 arg1, ..., ){
...
...
...
}
#endif
```
EXCEPTION - Stub the function and throw an exception at runtime.
e.g.
FROM:
```ret_type function(arg_type1 arg1, ..., ){
...
...
...
}```
TO:
```ret_type function(arg_type1 arg1, ..., ){
throw std::runtime_error("The function function is not implemented.")
}```
ASSERT - Stub the function and throw an assert(0).
e.g.
FROM:
```ret_type function(arg_type1 arg1, ..., ){
...
...
...
}```
TO:
```ret_type function(arg_type1 arg1, ..., ){
assert(0);
}```
EMPTYBODY - Stub the function and keep an empty body.
e.g.
FROM:
```ret_type function(arg_type1 arg1, ..., ){
...
...
...
}```
TO:
```ret_type function(arg_type1 arg1, ..., ){
;
}```
Definition at line 79 of file hipify_python.py.
1.8.11