1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 22:58:30 +00:00

Remove some ugly code from nvapi.h

This commit is contained in:
jsteube 2016-06-03 16:20:59 +02:00
parent 08934db58c
commit 3e30b62bf6

View File

@ -12,36 +12,13 @@
#include <common.h> #include <common.h>
/* /**
* Declarations from nvapi.h and subheaders * Declarations from nvapi.h and subheaders
**/
#ifndef __success
#define __nvapi_success
#define __success(epxr)
#endif
//#define NVAPI_INTERFACE extern __success(return == NVAPI_OK) NvAPI_Status __cdecl
#define NVAPI_INTERFACE extern __success(return == NVAPI_OK) NvAPI_Status
/*
* Definitions from nvapi_lite_common.h
*/ */
// mac os 32-bit still needs this #define NVAPI_INTERFACE extern NvAPI_Status
#if (defined(macintosh) || defined(__APPLE__)) && !defined(__LP64__)
typedef signed long NvS32; /* -2147483648 to 2147483647 */
#else
typedef signed int NvS32; /* -2147483648 to 2147483647 */
#endif
// mac os 32-bit still needs this typedef unsigned long NvU32;
#if ( (defined(macintosh) && defined(__LP64__) && (__NVAPI_RESERVED0__)) || \
(!defined(macintosh) && defined(__NVAPI_RESERVED0__)) )
typedef unsigned int NvU32; /* 0 to 4294967295 */
#else
typedef unsigned long NvU32; /* 0 to 4294967295 */
#endif
#define NV_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name #define NV_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
@ -56,10 +33,8 @@ typedef char NvAPI_LongString[NVAPI_LONG_STRING_MAX];
typedef char NvAPI_ShortString[NVAPI_SHORT_STRING_MAX]; typedef char NvAPI_ShortString[NVAPI_SHORT_STRING_MAX];
#define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16)) #define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16))
#define GET_NVAPI_VERSION(ver) (NvU32)((ver)>>16)
#define GET_NVAPI_SIZE(ver) (NvU32)((ver) & 0xffff)
#define NVAPI_MAX_PHYSICAL_GPUS 64 #define NVAPI_MAX_PHYSICAL_GPUS 64
typedef enum _NvAPI_Status typedef enum _NvAPI_Status
{ {
@ -220,60 +195,10 @@ NVAPI_INTERFACE NvAPI_EnumPhysicalGPUs (NvPhysicalGpuHandle nvGPUHandle[NVAPI_MA
NVAPI_INTERFACE NvAPI_GPU_GetPerfPoliciesInfo (NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_INFO_PARAMS_V1 *perfPolicies_info); NVAPI_INTERFACE NvAPI_GPU_GetPerfPoliciesInfo (NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_INFO_PARAMS_V1 *perfPolicies_info);
NVAPI_INTERFACE NvAPI_GPU_GetPerfPoliciesStatus (NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1 *perfPolicies_status); NVAPI_INTERFACE NvAPI_GPU_GetPerfPoliciesStatus (NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1 *perfPolicies_status);
#ifdef __nvapi_success
#undef __success
#undef __nvapi_success
#endif
/* /*
* End of declarations from nvapi.h and subheaders * End of declarations from nvapi.h and subheaders
**/ **/
// Just annotations (they do nothing special)
#ifndef __success
#define __success(x)
#endif
#ifndef __in
#define __in
#endif
#ifndef __out
#define __out
#endif
#ifndef __in_ecount
#define __in_ecount(x)
#endif
#ifndef __out_ecount
#define __out_ecount(x)
#endif
#ifndef __in_opt
#define __in_opt
#endif
#ifndef __out_opt
#define __out_opt
#endif
#ifndef __inout
#define __inout
#endif
#ifndef __inout_opt
#define __inout_opt
#endif
#ifndef __inout_ecount
#define __inout_ecount(x)
#endif
#ifndef __inout_ecount_full
#define __inout_ecount_full(x)
#endif
#ifndef __inout_ecount_part_opt
#define __inout_ecount_part_opt(x,y)
#endif
#ifndef __inout_ecount_full_opt
#define __inout_ecount_full_opt(x,y)
#endif
#ifndef __out_ecount_full_opt
#define __out_ecount_full_opt(x)
#endif
typedef NvPhysicalGpuHandle HM_ADAPTER_NVAPI; typedef NvPhysicalGpuHandle HM_ADAPTER_NVAPI;
#include <shared.h> #include <shared.h>