AGX Dynamics  2.35.0.1
Sin.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_SIN_H
23 #define AGXFN_MATH_SIN_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  {
46  template <typename AutoT1, typename AutoT2>
47  AGX_FORCE_INLINE void Sin
48  (
49  /* Parameter list automatically generated, do not edit */
50  AutoT1& result,
51  const AutoT2& arg
52  )
53  {
54  result = (AutoT1)std::sin(arg);
55  }
56 
58  template <typename AutoT1, typename AutoT2>
59  AGX_FORCE_INLINE AutoT1 Sin
60  (
61  const AutoT2& arg
62  )
63  {
64  AutoT1 result;
65  agxFn::Math::Sin(result, arg);
66  return result;
67  }
68 
69 
70 
79  template <typename AutoT1, typename AutoT2>
80  AGX_FORCE_INLINE void Sin
81  (
82  /* Parameter list automatically generated, do not edit */
83  const agx::RangeJob& job,
85  const agxData::Array< AutoT2 >& arg
86  )
87  {
88  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
89  {
90  agxFn::Math::Sin(result[i], arg[i]);
91  }
92  }
93 
94 
103  template <typename AutoT1, typename AutoT2>
104  AGX_FORCE_INLINE void Sin
105  (
106  /* Parameter list automatically generated, do not edit */
107  const agx::RangeJob& job,
108  agxData::Array< AutoT1 >& result,
109  const AutoT2& arg
110  )
111  {
112  for (size_t i = job.range().begin(); i < job.range().end(); ++i)
113  {
114  agxFn::Math::Sin(result[i], arg);
115  }
116  }
117 
118 
119  }
120 }
121 
122 #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.