Open3D (C++ API)  0.20.0
Loading...
Searching...
No Matches
IoU.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2026 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8#pragma once
9
10#ifdef BUILD_SYCL_MODULE
11// IoUBevSYCLKernel/IoU3dSYCLKernel take a sycl::queue&, but only the
12// -fsycl-compiled TU that defines them (IoUSYCL.cpp) needs the complete
13// type; a reference parameter only needs a declaration to be seen. All other
14// consumers (IoU.cpp, IoU.cu, and pybind's iou.cpp, none built with -fsycl,
15// so none have the oneAPI SYCL include path on their command line) only ever
16// call the core::Device overload below and never need a complete
17// sycl::queue. Mirror SYCLContext.h's own pattern: include the real runtime
18// header only when actually SYCL-compiled, else forward-declare.
19#if defined(SYCL_LANGUAGE_VERSION)
20#include <sycl/sycl.hpp>
21#else
22namespace sycl {
23class queue;
24}
25#endif
26#endif
27
28#include "open3d/core/Device.h"
29
30namespace open3d {
31namespace ml {
32namespace contrib {
33
34#ifdef BUILD_CUDA_MODULE
41void IoUBevCUDAKernel(const float *boxes_a,
42 const float *boxes_b,
43 float *iou,
44 int num_a,
45 int num_b);
46
52void IoU3dCUDAKernel(const float *boxes_a,
53 const float *boxes_b,
54 float *iou,
55 int num_a,
56 int num_b);
57
58#endif
59
60#ifdef BUILD_SYCL_MODULE
73void IoUBevSYCLKernel(sycl::queue &queue,
74 const float *boxes_a,
75 const float *boxes_b,
76 float *iou,
77 int num_a,
78 int num_b);
79
86void IoU3dSYCLKernel(sycl::queue &queue,
87 const float *boxes_a,
88 const float *boxes_b,
89 float *iou,
90 int num_a,
91 int num_b);
92
105void IoUBevSYCLKernel(const core::Device &device,
106 const float *boxes_a,
107 const float *boxes_b,
108 float *iou,
109 int num_a,
110 int num_b);
111
118void IoU3dSYCLKernel(const core::Device &device,
119 const float *boxes_a,
120 const float *boxes_b,
121 float *iou,
122 int num_a,
123 int num_b);
124
125#endif
126
133void IoUBevCPUKernel(const float *boxes_a,
134 const float *boxes_b,
135 float *iou,
136 int num_a,
137 int num_b);
138
144void IoU3dCPUKernel(const float *boxes_a,
145 const float *boxes_b,
146 float *iou,
147 int num_a,
148 int num_b);
149
150} // namespace contrib
151} // namespace ml
152} // namespace open3d
sycl::queue queue
Definition SYCLContext.cpp:88
void IoUBevSYCLKernel(sycl::queue &queue, const float *boxes_a, const float *boxes_b, float *iou, int num_a, int num_b)
Definition IoUSYCL.cpp:22
void IoUBevCPUKernel(const float *boxes_a, const float *boxes_b, float *iou, int num_a, int num_b)
Definition IoU.cpp:19
void IoU3dSYCLKernel(sycl::queue &queue, const float *boxes_a, const float *boxes_b, float *iou, int num_a, int num_b)
Definition IoUSYCL.cpp:42
void IoU3dCPUKernel(const float *boxes_a, const float *boxes_b, float *iou, int num_a, int num_b)
Definition IoU.cpp:41
Definition PinholeCameraIntrinsic.cpp:16