Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/gapi/src/compiler/gobjref.hpp
16337 views
1
// This file is part of OpenCV project.
2
// It is subject to the license terms in the LICENSE file found in the top-level directory
3
// of this distribution and at http://opencv.org/license.html.
4
//
5
// Copyright (C) 2018 Intel Corporation
6
7
8
#ifndef OPENCV_GAPI_GMATREF_HPP
9
#define OPENCV_GAPI_GMATREF_HPP
10
11
#include "opencv2/gapi/util/variant.hpp"
12
#include "opencv2/gapi/garg.hpp"
13
14
#include "api/gapi_priv.hpp" // GShape, HostCtor
15
16
namespace cv
17
{
18
19
namespace gimpl
20
{
21
struct RcDesc
22
{
23
int id; // id is unique but local to shape
24
GShape shape; // pair <id,shape> IS the unique ID
25
HostCtor ctor; // FIXME: is it really used here? Or in <Data>?
26
27
bool operator==(const RcDesc &rhs) const
28
{
29
// FIXME: ctor is not checked (should be?)
30
return id == rhs.id && shape == rhs.shape;
31
}
32
33
bool operator< (const RcDesc &rhs) const
34
{
35
return (id == rhs.id) ? shape < rhs.shape : id < rhs.id;
36
}
37
};
38
} // gimpl
39
40
namespace detail
41
{
42
template<> struct GTypeTraits<cv::gimpl::RcDesc>
43
{
44
static constexpr const ArgKind kind = ArgKind::GOBJREF;
45
};
46
}
47
48
} // cv
49
50
#endif // OPENCV_GAPI_GMATREF_HPP
51
52