ai_version.h
Go to the documentation of this file.
1// Copyright 2022 Autodesk, Inc. All rights reserved.
2//
3// Use of this software is subject to the terms of the Autodesk license
4// agreement provided at the time of installation or download, or which
5// otherwise accompanies this software in either electronic or hard copy form.
6
12#pragma once
13#include "ai_api.h"
14
15#define ARNOLD_XSTR(s) ARNOLD_STR(s)
16#define ARNOLD_STR(s) #s
17
18#define AI_MAXSIZE_VERSION 32
19
20/*
21 * AI_VERSION_FIX *MUST* be a string!
22 * (something like "0.test" is acceptable, too!)
23 */
24#define AI_VERSION_ARCH_NUM 7
25#define AI_VERSION_MAJOR_NUM 2
26#define AI_VERSION_MINOR_NUM 0
27#define AI_VERSION_FIX "0"
28
29#define AI_VERSION_ARCH ARNOLD_XSTR(AI_VERSION_ARCH_NUM)
30#define AI_VERSION_MAJOR ARNOLD_XSTR(AI_VERSION_MAJOR_NUM)
31#define AI_VERSION_MINOR ARNOLD_XSTR(AI_VERSION_MINOR_NUM)
32
33/*
34 * Expose Arnold version as a single integer number than can be easily used for direct comparison. E.g.:
35 *
36 * #if ARNOLD_VERSION_NUM >= 60002
37 */
38#define ARNOLD_VERSION_NUM (AI_VERSION_ARCH_NUM*10000)+(AI_VERSION_MAJOR_NUM*100)+AI_VERSION_MINOR_NUM
39
40/*
41 * Minimum OptiX version we will allow Arnold GPU to run with
42 * major = AI_MIN_OPTIX_VERSION/10000
43 * minor = (AI_MIN_OPTIX_VERSION%10000)/100
44 * micro = AI_MIN_OPTIX_VERSION%100
45 */
46#define AI_MIN_OPTIX_VERSION 60500
47
48/*
49 * Minimum NVML major version we will allow Arnold GPU to run with
50 */
51#define AI_MIN_NVML_VERSION 7
52
53/*
54 * Minimum CUDA Compute Capability version we will allow Arnold GPU to run with
55 */
56#define AI_MIN_CUDA_COMPUTE_CAPABILITY 5.0f
57
66#define AI_VERSION AI_VERSION_ARCH "." AI_VERSION_MAJOR "." AI_VERSION_MINOR "." AI_VERSION_FIX
67
68AI_API const char* AiGetVersion(char* arch, char* major, char* minor, char* fix);
69AI_API const char* AiGetVersionInfo();
70AI_API const char* AiGetCompileOptions();
71AI_API bool AiCheckAPIVersion(const char* arch, const char* major, const char* minor);
72AI_API void AiSetAppString(const char* appstr);
73
78{
79 AI_COPYRIGHT_NOTICES_CORE,
80 AI_COPYRIGHT_NOTICES_PLUGINS
81};
82
83AI_API const char* AiGetCopyrightNotices(AtCopyrightNoticeType copyright_notice_type);
84
85/*\}*/
DLL export prefix for API functions (necessary for multi-platform development)
AtCopyrightNoticeType
Copyright Notice types.
Definition: ai_version.h:78
AI_API const char * AiGetCompileOptions()
Returns a string with compile-time options.
Definition: ai_version.cpp:84
AI_API const char * AiGetVersionInfo()
Returns the Arnold version string plus compile-time information.
Definition: ai_version.cpp:179
AI_API void AiSetAppString(const char *appstr)
Sets the application-defined string.
Definition: ai_version.cpp:228
AI_API const char * AiGetVersion(char *arch, char *major, char *minor, char *fix)
Returns the Arnold version string.
Definition: ai_version.cpp:60
AI_API const char * AiGetCopyrightNotices(AtCopyrightNoticeType copyright_notice_type)
Returns the copyright notices for Arnold and its dependencies.
Definition: ai_version.cpp:275
AI_API bool AiCheckAPIVersion(const char *arch, const char *major, const char *minor)
Checks if a given version string is compatible with the running version.
Definition: ai_version.cpp:202

© 2022 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com