nvperfapi_data.h

Go to the documentation of this file.
00001 #ifndef NVPERFAPI_DATA_H
00002 #define NVPERFAPI_DATA_H
00003 
00004 /*
00005  * Copyright 2014-2017  NVIDIA Corporation.  All rights reserved.
00006  *
00007  * NOTICE TO USER:
00008  *
00009  * This source code is subject to NVIDIA ownership rights under U.S. and
00010  * international Copyright laws.
00011  *
00012  * This software and the information contained herein is PROPRIETARY and
00013  * CONFIDENTIAL to NVIDIA and is being provided under the terms and conditions
00014  * of a form of NVIDIA software license agreement.
00015  *
00016  * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
00017  * CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
00018  * IMPLIED WARRANTY OF ANY KIND.  NVIDIA DISCLAIMS ALL WARRANTIES WITH
00019  * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
00020  * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
00021  * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
00022  * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
00023  * OF USE, DATA OR PROFITS,  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00024  * OR OTHER TORTIOUS ACTION,  ARISING OUT OF OR IN CONNECTION WITH THE USE
00025  * OR PERFORMANCE OF THIS SOURCE CODE.
00026  *
00027  * U.S. Government End Users.   This source code is a "commercial item" as
00028  * that term is defined at  48 C.F.R. 2.101 (OCT 1995), consisting  of
00029  * "commercial computer  software"  and "commercial computer software
00030  * documentation" as such terms are  used in 48 C.F.R. 12.212 (SEPT 1995)
00031  * and is provided to the U.S. Government only as a commercial end item.
00032  * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
00033  * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
00034  * source code with only those rights set forth herein.
00035  *
00036  * Any use of this source code in individual and commercial software must
00037  * include, in the user documentation and internal comments to the code,
00038  * the above Disclaimer and U.S. Government End Users Notice.
00039  */
00040 
00041 #include "nvperfapi_common_types.h"
00042 
00043 
00044 #if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
00045 #pragma GCC visibility push(default)
00046 #endif
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00052 
00058 /***************************************************************************/
00068 struct NVPA_StackDataOptions;
00069 
00074 NVPA_Status NVPA_StackDataOptions_Create(
00075     NVPA_StackDataOptions** ppStackDataOptions
00076 );
00077 
00080 NVPA_Status NVPA_StackDataOptions_Destroy(
00081     NVPA_StackDataOptions* pStackDataOptions
00082 );
00083 
00094 NVPA_Status NVPA_StackDataOptions_SetLockedAccess(
00095     NVPA_StackDataOptions* pStackDataOptions,
00096     NVPA_Bool lockedAccess
00097 );
00098 
00104 /***************************************************************************/
00144 struct NVPA_StackData;
00145 
00146 
00160 NVPA_Status NVPA_D3D11_PredictStackDataReady(
00161     struct ID3D11DeviceContext* pDeviceContext,
00162     NVPA_Bool* pIsReady
00163 );
00164 
00178 NVPA_Status NVPA_D3D12_Queue_PredictStackDataReady(
00179     struct ID3D12CommandQueue* pCommandQueue,
00180     NVPA_Bool* pIsReady
00181 );
00182 
00197 NVPA_Status NVPA_OpenGL_PredictStackDataReady(
00198     NVPA_Bool* pIsReady
00199 );
00200 
00215 NVPA_Status NVPA_EGL_PredictStackDataReady(
00216     NVPA_Bool* pIsReady
00217 );
00218 
00232 #ifndef __cplusplus
00233 NVPA_Status NVPA_CUDA_PredictStackDataReady(
00234     NVPA_Bool* pIsReady,
00235     struct CUctx_st* ctx
00236 );
00237 #else
00238 NVPA_Status NVPA_CUDA_PredictStackDataReady(NVPA_Bool* pIsReady, struct CUctx_st* ctx = NULL);
00239 #endif
00240 
00249 NVPA_Status NVPA_D3D11_GetStackData(
00250     struct ID3D11DeviceContext* pDeviceContext,
00251     const NVPA_StackData** ppStackData
00252 );
00253 
00262 NVPA_Status NVPA_D3D12_Queue_GetStackData(
00263     struct ID3D12CommandQueue* pCommandQueue,
00264     const NVPA_StackData** ppStackData
00265 );
00266 
00277 NVPA_Status NVPA_OpenGL_GetStackData(
00278     const NVPA_StackData** ppStackData
00279 );
00280 
00291 NVPA_Status NVPA_EGL_GetStackData(
00292     const NVPA_StackData** ppStackData
00293 );
00294 
00306 #ifndef __cplusplus
00307 NVPA_Status NVPA_CUDA_GetStackData(
00308     const NVPA_StackData** ppStackData,
00309     struct CUctx_st* ctx
00310 );
00311 #else
00312 NVPA_Status NVPA_CUDA_GetStackData(const NVPA_StackData** ppStackData, struct CUctx_st* ctx = NULL);
00313 #endif
00314 
00326 NVPA_Status NVPA_StackData_CreateStackData(
00327     const NVPA_StackData* pStackData,
00328     const NVPA_StackDataOptions* pStackDataOptions,
00329     NVPA_StackData** ppStackData
00330 );
00331 
00334 NVPA_Status NVPA_StackData_Acquire(
00335     const NVPA_StackData* pStackData
00336 );
00337 
00342 NVPA_Status NVPA_StackData_Release(
00343     const NVPA_StackData* pStackData
00344 );
00345 
00352 NVPA_Status NVPA_StackData_GetConfig(
00353     const NVPA_StackData* pStackData,
00354     const NVPA_Config** ppConfig
00355 );
00356 
00368 NVPA_Status NVPA_StackData_CreateStackId(
00369     NVPA_StackData* pStackData,
00370     size_t numRangeIds,
00371     NVPA_RangeId* rangeIds,
00372     NVPA_StackId* stackId
00373 );
00374 
00385 NVPA_Status NVPA_StackData_AccumulateStackDataIntoOriginalStacks(
00386     const NVPA_StackData* pSource,
00387     size_t numSourceStackIds,
00388     NVPA_StackId* pSourceStackIds,
00389     NVPA_StackData* pTarget
00390 );
00391 
00401 NVPA_Status NVPA_StackData_AccumulateStackDataIntoSingleStackId(
00402     const NVPA_StackData* pSource,
00403     size_t numSourceStackIds,
00404     NVPA_StackId* pSourceStackIds,
00405     NVPA_StackData* pTarget,
00406     NVPA_StackId targetStackId
00407 );
00408 
00419 NVPA_Status NVPA_StackData_AccumulateRangeData(
00420     const NVPA_StackData* pSource,
00421     size_t numSourceRangeIds,
00422     NVPA_RangeId* pSourceRangeIds,
00423     NVPA_StackData* pTarget
00424 );
00425 
00431 NVPA_Status NVPA_StackData_GetMaxStackSize(
00432     const NVPA_StackData* pStackData,
00433     size_t* pMaxStackSize
00434 );
00435 
00441 NVPA_Status NVPA_StackData_IsReady(
00442     const NVPA_StackData* pStackData,
00443     NVPA_Bool* pIsReady
00444 );
00445 
00454 NVPA_Status NVPA_StackData_GetNumStackIds(
00455     const NVPA_StackData* pStackData,
00456     size_t* pNumStacks
00457 );
00458 
00473 NVPA_Status NVPA_StackData_GetStackIds(
00474     const NVPA_StackData* pStackData,
00475     size_t numStackIds,
00476     NVPA_StackId* pStackIds,
00477     size_t* pNumStackIds
00478 );
00479 
00490 NVPA_Status NVPA_StackData_GetRangeIds(
00491     const NVPA_StackData* pStackData,
00492     NVPA_StackId stackId,
00493     size_t numRangeIds,
00494     NVPA_RangeId* pRangeIds,
00495     size_t* pNumRangeIds
00496 );
00497 
00507 NVPA_Status NVPA_StackData_GetMetricValues(
00508     const NVPA_StackData* pStackData,
00509     NVPA_StackId stackId,
00510     size_t numValues,
00511     double* pValues,
00512     uint32_t* pValueErrors,
00513     size_t* pNumValues
00514 );
00515 
00521 #ifdef __cplusplus
00522 } /* extern "C" */
00523 #endif
00524 
00525 #if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
00526 #pragma GCC visibility pop
00527 #endif
00528 
00529 
00530 #endif /* NVPERFAPI_DATA_H */

NVIDIA(R) PerfWorks SDK Documentation (c) 2015-2016. NVIDIA Corporation. All Rights Reserved.