AGX Dynamics  2.37.2.0
Div.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_DIV_H
23 #define AGXFN_MATH_DIV_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 #include <agx/Vec4.h>
32 #include <agx/Vec3.h>
33 #include <agx/Vec2.h>
34 
35 
36 namespace agx { namespace Math { } }
37 
38 namespace agxFn
39 {
40  namespace Math
41  {
50  template <typename AutoT1, typename AutoT2, typename AutoT3>
51  AGX_FORCE_INLINE void Div
52  (
53  /* Parameter list automatically generated, do not edit */
54  AutoT1& result,
55  const AutoT2& arg1,
56  const AutoT3& arg2
57  )
58  {
59  result = (AutoT1)(arg1 / arg2);
60  }
61 
63  template <typename AutoT1, typename AutoT2, typename AutoT3>
64  AGX_FORCE_INLINE AutoT1 Div
65  (
66  const AutoT2& arg1,
67  const AutoT3& arg2
68  )
69  {
70  AutoT1 result;
71  agxFn::Math::Div(result, arg1, arg2);
72  return result;
73  }
74 
75 
76 
86  template <typename AutoT1, typename AutoT2, typename AutoT3>
87  AGX_FORCE_INLINE void Div
88  (
89  /* Parameter list automatically generated, do not edit */
90  const agx::RangeJob& job,
92  const agxData::Array< AutoT2 >& arg1,
93  const agxData::Array< AutoT3 >& arg2
94  )
95  {
96  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
97  {
98  agxFn::Math::Div(result[i], arg1[i], arg2[i]);
99  }
100  }
101 
102 
112  template <typename AutoT1, typename AutoT2, typename AutoT3>
113  AGX_FORCE_INLINE void Div
114  (
115  /* Parameter list automatically generated, do not edit */
116  const agx::RangeJob& job,
117  agxData::Array< AutoT1 >& result,
118  const agxData::Array< AutoT2 >& arg1,
119  const AutoT3& arg2
120  )
121  {
122  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
123  {
124  agxFn::Math::Div(result[i], arg1[i], arg2);
125  }
126  }
127 
128 
138  template <typename AutoT1, typename AutoT2, typename AutoT3>
139  AGX_FORCE_INLINE void Div
140  (
141  /* Parameter list automatically generated, do not edit */
142  const agx::RangeJob& job,
143  agxData::Array< AutoT1 >& result,
144  const AutoT2& arg1,
145  const agxData::Array< AutoT3 >& arg2
146  )
147  {
148  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
149  {
150  agxFn::Math::Div(result[i], arg1, arg2[i]);
151  }
152  }
153 
154 
155  }
156 }
157 
158 #endif
IndexRange & range()
Definition: Job.h:631
#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.