SheafSystem  0.0.0.0
sec_stp.impl.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Implementation for sec_stp facet function templates.
19 
20 #ifndef SEC_STP_IMPL_H
21 #define SEC_STP_IMPL_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef ASSERT_CONTRACT_H
28 #include "SheafSystem/assert_contract.h"
29 #endif
30 
31 #ifndef SEC_STP_H
32 #include "SheafSystem/sec_stp.h"
33 #endif
34 
35 namespace fiber_bundle
36 {
37 
38 //==============================================================================
39 // NON-MEMBER FUNCTIONS
40 //==============================================================================
41 
42 //==============================================================================
43 
44 template <typename V0, typename V1, typename VR>
45 void
46 symmetric_product_functor<V0, V1, VR>::
47 operator()(const V0& x0, const V1& x1, VR& xresult)
48 {
49  symmetric_product(x0, x1, xresult);
50 }
51 
52 //==============================================================================
53 
55 template <typename S0, typename S1, typename SR>
56 void symmetric_product(const S0& x0, const S1& x1, SR& xresult,
57  bool xauto_access)
58 {
59  typedef typename S0::fiber_type::volatile_type V0;
60  typedef typename S1::fiber_type::volatile_type V1;
61  typedef typename SR::fiber_type::volatile_type VR;
62  symmetric_product_functor<V0, V1, VR> f;
63  binary_op(x0, x1, xresult, f, xauto_access);
64 }
65 
66 
67 } // namespace fiber_bundle
68 
69 #endif // ifndef SEC_STP_IMPL_H
SHEAF_DLL_SPEC void symmetric_product(const stp_lite &x0, const stp_lite &x1, stp_lite &xresult)
Symmetric product (pre-allocated version for volatile types).
Definition: stp.cc:898
void binary_op(const S0 &x0, const S1 &x1, SR &xresult, F xfunctor, bool xauto_access)
Binary operator.
Definition: sec_vd.impl.h:48
Namespace for the fiber_bundles component of the sheaf system.