Project
Loading...
Searching...
No Matches
CircleXY.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#ifndef MATHUTILS_INCLUDE_MATHUTILS_DETAIL_CIRCLEXY_H_
18#define MATHUTILS_INCLUDE_MATHUTILS_DETAIL_CIRCLEXY_H_
19
20#include "GPUCommonDef.h"
21#include "GPUCommonRtypes.h"
22
23namespace o2
24{
25namespace math_utils
26{
27namespace detail
28{
29
30template <typename T>
31struct CircleXY {
32 using value_t = T;
33
34 T rC; // circle radius
35 T xC; // x-center
36 T yC; // y-center
37 GPUd() CircleXY(T r = T(), T x = T(), T y = T());
38 GPUd() T getCenterD2() const;
40};
41
42template <typename T>
43GPUdi() CircleXY<T>::CircleXY(T r, T x, T y) : rC(r), xC(x), yC(y)
44{
45}
46
47template <typename T>
48GPUdi() T CircleXY<T>::getCenterD2() const
49{
50 return xC * xC + yC * yC;
51}
52} // namespace detail
53} // namespace math_utils
54} // namespace o2
55
56#endif /* MATHUTILS_INCLUDE_MATHUTILS_DETAIL_CIRCLEXY_H_ */
GLint GLenum GLint x
Definition glcorearb.h:403
GLboolean r
Definition glcorearb.h:1233
GPUdi() int nint(T x)
Definition basicMath.h:66
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...