blob: 867eaa4591e3044ec11b7181f2f55bd6cadb0d7f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>FLEX: NvFlexDevice.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="flex.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="nvidia.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">FLEX
 <span id="projectnumber">1.2.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">NvFlexDevice.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a href="_nv_flex_device_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a914a7e6338379d00397bd3e7e07c0280"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API int </td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_device_8h.html#a914a7e6338379d00397bd3e7e07c0280">NvFlexDeviceGetSuggestedOrdinal</a> ()</td></tr>
<tr class="separator:a914a7e6338379d00397bd3e7e07c0280"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a922c489035a9bdb84bee1cd0ef73558d"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API bool </td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_device_8h.html#a922c489035a9bdb84bee1cd0ef73558d">NvFlexDeviceCreateCudaContext</a> (int ordinal)</td></tr>
<tr class="separator:a922c489035a9bdb84bee1cd0ef73558d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a97f4f513f226d573410478fa6d79f05a"><td class="memItemLeft" align="right" valign="top">NV_FLEX_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="_nv_flex_device_8h.html#a97f4f513f226d573410478fa6d79f05a">NvFlexDeviceDestroyCudaContext</a> ()</td></tr>
<tr class="separator:a97f4f513f226d573410478fa6d79f05a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>NvFlexDevice is an optional helper library that performs some initialization tasks related to GPU device management. The library can be used to query the NVIDIA PhysX control panel for the selected "PhysX" GPU, and to create an optimized CUDA context. Currently the library is a closed source component but is purely optional. See the FlexDemo for an example of how to use the device API. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a914a7e6338379d00397bd3e7e07c0280"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NV_FLEX_API int NvFlexDeviceGetSuggestedOrdinal </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the CUDA ordinal of the GPU selected as "PhysX" in the NVIDIA control panel. Returns -1 if there is no NVIDIA CUDA device available.</p>
<dl class="section note"><dt>Note</dt><dd>The returned ordinal is a CUDA ordinal and does not correspond to the DXGI ordinal. D3D users should use their own device selection method and pass the appropriate DXGI device index or custom D3D devices to <a class="el" href="_nv_flex_8h.html#a687e5ec141948f779faa9183b68cb743">NvFlexInit()</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a922c489035a9bdb84bee1cd0ef73558d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NV_FLEX_API bool NvFlexDeviceCreateCudaContext </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>ordinal</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a CUDA context optimized for Flex, returns true on success and sets the context as current on the calling thread. If using this method to initialize CUDA then you should ensure that no prior CUDA calls are made prior to avoid creating multiple contexts.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ordinal</td><td>The CUDA ordinal of the GPU to create the context on, this can be the suggested ordinal (see flexDeviceGetSuggestedOrdinal()), or a manually selected ordinal. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a97f4f513f226d573410478fa6d79f05a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NV_FLEX_API void NvFlexDeviceDestroyCudaContext </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy the context associated with the current thread, can be used to destroy the CUDA context created by flexDeviceCreateCudaContext(). </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Mar 19 2018 14:53:17 for FLEX by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
|