summaryrefslogtreecommitdiffstats
path: root/tools/gfx/cuda/cuda-query.h
blob: 04d7edc43a0fdfbacf2ff5e8a211e952d7729040 (plain)
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
// cuda-query.h
#pragma once
#include "cuda-base.h"

namespace gfx
{
#ifdef GFX_ENABLE_CUDA
using namespace Slang;

namespace cuda
{

class QueryPoolImpl : public QueryPoolBase
{
public:
    // The event object for each query. Owned by the pool.
    List<CUevent> m_events;

    // The event that marks the starting point.
    CUevent m_startEvent;

    Result init(const IQueryPool::Desc& desc);

    ~QueryPoolImpl();

    virtual SLANG_NO_THROW Result SLANG_MCALL
    getResult(GfxIndex queryIndex, GfxCount count, uint64_t* data) override;
};

} // namespace cuda
#endif
} // namespace gfx