AGX Dynamics  2.35.0.1
Mul.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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_MUL_H
23 #define AGXFN_MATH_MUL_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 #include <agx/Matrix4x4.h>
35 #include <agx/AffineMatrix4x4.h>
36 
37 
38 namespace agx { namespace Math { } }
39 
40 namespace agxFn
41 {
42  namespace Math
43  {
52  template <typename AutoT1, typename AutoT2, typename AutoT3>
53  AGX_FORCE_INLINE void Mul
54  (
55  /* Parameter list automatically generated, do not edit */
56  AutoT1& result,
57  const AutoT2& arg1,
58  const AutoT3& arg2
59  )
60  {
61  result = (AutoT1)(arg1 * arg2);
62  }
63 
65  template <typename AutoT1, typename AutoT2, typename AutoT3>
66  AGX_FORCE_INLINE AutoT1 Mul
67  (
68  const AutoT2& arg1,
69  const AutoT3& arg2
70  )
71  {
72  AutoT1 result;
73  agxFn::Math::Mul(result, arg1, arg2);
74  return result;
75  }
76 
77 
78 
88  template <typename AutoT1, typename AutoT2, typename AutoT3>
89  AGX_FORCE_INLINE void Mul
90  (
91  /* Parameter list automatically generated, do not edit */
92  const agx::RangeJob& job,
94  const agxData::Array< AutoT2 >& arg1,
95  const agxData::Array< AutoT3 >& arg2
96  )
97  {
98  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
99  {
100  agxFn::Math::Mul(result[i], arg1[i], arg2[i]);
101  }
102  }
103 
104 
114  template <typename AutoT1, typename AutoT2, typename AutoT3>
115  AGX_FORCE_INLINE void Mul
116  (
117  /* Parameter list automatically generated, do not edit */
118  const agx::RangeJob& job,
119  agxData::Array< AutoT1 >& result,
120  const agxData::Array< AutoT2 >& arg1,
121  const AutoT3& arg2
122  )
123  {
124  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
125  {
126  agxFn::Math::Mul(result[i], arg1[i], arg2);
127  }
128  }
129 
130 
140  template <typename AutoT1, typename AutoT2, typename AutoT3>
141  AGX_FORCE_INLINE void Mul
142  (
143  /* Parameter list automatically generated, do not edit */
144  const agx::RangeJob& job,
145  agxData::Array< AutoT1 >& result,
146  const AutoT2& arg1,
147  const agxData::Array< AutoT3 >& arg2
148  )
149  {
150  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
151  {
152  agxFn::Math::Mul(result[i], arg1, arg2[i]);
153  }
154  }
155 
156 
157  }
158 }
159 
160 #endif
Type-specific Array used for fast access into the data held by a Buffer.
Definition: Array.h:107
A range job executes a kernel implementation on a subset of the data.
Definition: Job.h:284
IndexRange & range()
Definition: Job.h:631
#define AGX_FORCE_INLINE
Definition: macros.h:58
The agx namespace contains the dynamics/math part of the AGX Dynamics API.