AGX Dynamics  2.37.3.2
Min.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or
9 having been advised so by Algoryx Simulation AB for a time limited evaluation,
10 or having purchased a valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 
19 // AUTOMATICALLY GENERATED, DO NOT EDIT! (except inline functions) //
21 
22 #ifndef AGXFN_MATH_MIN_H
23 #define AGXFN_MATH_MIN_H
24 
25 #include <agxData/Array.h>
26 #include <agxData/EntityPtr.h>
27 #include <agx/Integer.h>
28 #include <agx/Real.h>
29 #include <agx/Math.h>
30 #include <agx/Job.h>
31 
32 
33 namespace agx { namespace Math { } }
34 
35 namespace agxFn
36 {
37  namespace Math
38  {
47  template <typename AutoT1, typename AutoT2, typename AutoT3>
48  AGX_FORCE_INLINE void Min
49  (
50  /* Parameter list automatically generated, do not edit */
51  AutoT1& result,
52  const AutoT2& arg1,
53  const AutoT3& arg2
54  )
55  {
56  result = std::min(arg1, (AutoT2)arg2);
57  }
58 
60  template <typename AutoT1, typename AutoT2, typename AutoT3>
61  AGX_FORCE_INLINE AutoT1 Min
62  (
63  const AutoT2& arg1,
64  const AutoT3& arg2
65  )
66  {
67  AutoT1 result;
68  agxFn::Math::Min(result, arg1, arg2);
69  return result;
70  }
71 
72 
73 
83  template <typename AutoT1, typename AutoT2, typename AutoT3>
84  AGX_FORCE_INLINE void Min
85  (
86  /* Parameter list automatically generated, do not edit */
87  const agx::RangeJob& job,
89  const agxData::Array< AutoT2 >& arg1,
90  const agxData::Array< AutoT3 >& arg2
91  )
92  {
93  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
94  {
95  agxFn::Math::Min(result[i], arg1[i], arg2[i]);
96  }
97  }
98 
99 
109  template <typename AutoT1, typename AutoT2, typename AutoT3>
110  AGX_FORCE_INLINE void Min
111  (
112  /* Parameter list automatically generated, do not edit */
113  const agx::RangeJob& job,
114  agxData::Array< AutoT1 >& result,
115  const agxData::Array< AutoT2 >& arg1,
116  const AutoT3& arg2
117  )
118  {
119  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
120  {
121  agxFn::Math::Min(result[i], arg1[i], arg2);
122  }
123  }
124 
125 
135  template <typename AutoT1, typename AutoT2, typename AutoT3>
136  AGX_FORCE_INLINE void Min
137  (
138  /* Parameter list automatically generated, do not edit */
139  const agx::RangeJob& job,
140  agxData::Array< AutoT1 >& result,
141  const AutoT2& arg1,
142  const agxData::Array< AutoT3 >& arg2
143  )
144  {
145  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
146  {
147  agxFn::Math::Min(result[i], arg1, arg2[i]);
148  }
149  }
150 
151 
152  }
153 }
154 
155 #endif
IndexRange & range()
Definition: Job.h:631
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Definition: Vec3Template.h:861
#define AGX_FORCE_INLINE
Definition: Object.h:59
Type-specific Array used for fast access into the data held by a Buffer.
Definition: agxData.h:30
A range job executes a kernel implementation on a subset of the data.
Definition: Job.h:283
The agx namespace contains the dynamics/math part of the AGX Dynamics API.