Home
last modified time | relevance | path

Searched refs:Functor (Results 1 – 25 of 70) sorted by relevance

123

/external/tensorflow/tensorflow/core/kernels/
Dcwise_ops_common.h84 template <typename Device, typename Functor>
87 typedef typename Functor::in_type Tin; // Input scalar data type.
88 typedef typename Functor::out_type Tout; // Output scalar data type.
99 bool* const error_ptr = Functor::has_errors ? &error : nullptr; in Compute()
108 functor::BinaryFunctor<Device, Functor, 1>()( in Compute()
112 if (Functor::has_errors && error) { in Compute()
122 functor::BinaryFunctor<Device, Functor, 1>().Left( in Compute()
126 if (Functor::has_errors && error) { in Compute()
135 functor::BinaryFunctor<Device, Functor, 1>().Right( in Compute()
139 if (Functor::has_errors && error) { in Compute()
[all …]
Dcwise_ops_sycl_common.h40 template <typename Functor>
41 struct UnaryFunctor<SYCLDevice, Functor> {
42 void operator()(const SYCLDevice& d, typename Functor::tout_type out,
43 typename Functor::tin_type in) {
44 To32Bit(out).device(d) = To32Bit(in).unaryExpr(typename Functor::func());
49 template <typename Functor, int NDIMS, bool has_errors>
50 struct BinaryFunctor<SYCLDevice, Functor, NDIMS, has_errors> {
51 void operator()(const SYCLDevice& d, typename Functor::tout_type out,
52 typename Functor::tin_type in0,
53 typename Functor::tin_type in1, bool* error) {
[all …]
Dcwise_ops_gpu_common.cu.h41 template <typename Functor>
42 struct UnaryFunctor<GPUDevice, Functor> {
43 void operator()(const GPUDevice& d, typename Functor::tout_type out,
44 typename Functor::tin_type in) {
45 To32Bit(out).device(d) = To32Bit(in).unaryExpr(typename Functor::func());
50 template <typename Functor, int NDIMS, bool has_errors>
51 struct BinaryFunctor<GPUDevice, Functor, NDIMS, has_errors> {
52 void operator()(const GPUDevice& d, typename Functor::tout_type out,
53 typename Functor::tin_type in0,
54 typename Functor::tin_type in1, bool* error) {
[all …]
Dcwise_ops_gradients.h172 template <typename Device, typename Functor>
174 void operator()(const Device& d, typename Functor::tout_type out,
175 typename Functor::tin_type in0,
176 typename Functor::tin_type in1);
182 template <typename Functor>
183 struct SimpleBinaryFunctor<CPUDevice, Functor> {
184 void operator()(const CPUDevice& d, typename Functor::tout_type out,
185 typename Functor::tin_type in0,
186 typename Functor::tin_type in1) {
187 out.device(d) = in0.binaryExpr(in1, typename Functor::func());
[all …]
Dcwise_ops_gpu_gradients.cu.h41 template <typename Functor>
42 struct SimpleBinaryFunctor<GPUDevice, Functor> {
43 void operator()(const GPUDevice& d, typename Functor::tout_type out,
44 typename Functor::tin_type in1,
45 typename Functor::tin_type in2) {
47 To32Bit(in1).binaryExpr(in2, typename Functor::func());
Dreduction_ops_common.h176 typedef functor::ReduceFunctor<Device, Reducer> Functor;
185 Functor::Reduce(ctx, tmp_out.flat<T>(),
203 Functor::FillIdentity(d, tmp_out.flat<T>(), reducer);
206 Functor::Reduce(ctx, helper.out<T, 0>(&tmp_out), helper.in<T, 1>(data),
210 Functor::Reduce(ctx, helper.out<T, 1>(&tmp_out), helper.in<T, 2>(data),
214 Functor::Reduce(ctx, helper.out<T, 1>(&tmp_out), helper.in<T, 2>(data),
219 Functor::Reduce(ctx, helper.out<T, 1>(&tmp_out), helper.in<T, 3>(data),
223 Functor::Reduce(ctx, helper.out<T, 2>(&tmp_out), helper.in<T, 3>(data),
240 Functor::Reduce(ctx, tmp_out.flat<T>(),
Dmkl_cwise_ops_common.cc32 template <typename Device, typename Functor>
33 class MklBinaryOp : public BinaryOp<Device, Functor> {
36 : BinaryOp<Device, Functor>(context) {} in MklBinaryOp()
46 BinaryOp<Device, Functor>::Compute(context); in Compute()
/external/eigen/unsupported/Eigen/src/NumericalDiff/
DNumericalDiff.h39 typedef _Functor Functor; typedef
40 typedef typename Functor::Scalar Scalar;
41 typedef typename Functor::InputType InputType;
42 typedef typename Functor::ValueType ValueType;
43 typedef typename Functor::JacobianType JacobianType;
45 NumericalDiff(Scalar _epsfcn=0.) : Functor(), epsfcn(_epsfcn) {} in Functor() function
46 NumericalDiff(const Functor& f, Scalar _epsfcn=0.) : Functor(f), epsfcn(_epsfcn) {} in Functor() function
50 NumericalDiff(const T0& a0) : Functor(a0), epsfcn(0) {} in NumericalDiff()
52 NumericalDiff(const T0& a0, const T1& a1) : Functor(a0, a1), epsfcn(0) {} in NumericalDiff()
54 NumericalDiff(const T0& a0, const T1& a1, const T2& a2) : Functor(a0, a1, a2), epsfcn(0) {} in NumericalDiff()
[all …]
/external/eigen/unsupported/Eigen/src/AutoDiff/
DAutoDiffJacobian.h16 template<typename Functor> class AutoDiffJacobian : public Functor
19 AutoDiffJacobian() : Functor() {} in AutoDiffJacobian()
20 AutoDiffJacobian(const Functor& f) : Functor(f) {} in AutoDiffJacobian()
25 AutoDiffJacobian(const T& ...Values) : Functor(Values...) {} in AutoDiffJacobian()
28 AutoDiffJacobian(const T0& a0) : Functor(a0) {} in AutoDiffJacobian()
30 AutoDiffJacobian(const T0& a0, const T1& a1) : Functor(a0, a1) {} in AutoDiffJacobian()
32 AutoDiffJacobian(const T0& a0, const T1& a1, const T2& a2) : Functor(a0, a1, a2) {} in AutoDiffJacobian()
35 typedef typename Functor::InputType InputType;
36 typedef typename Functor::ValueType ValueType;
73 Functor::operator()(x, v, Params...); in operator()
[all …]
/external/libchrome/base/
Dbind_internal.h57 template <typename Functor, typename BoundArgsTuple, typename SFINAE = void>
62 template <typename Functor, typename SFINAE = void>
324 template <typename Functor, typename SFINAE = void>
361 template <typename Functor, typename SFINAE>
383 template <typename Functor>
384 struct FunctorTraits<Functor,
385 std::enable_if_t<IsCallableObject<Functor>::value &&
386 std::is_empty<Functor>::value>> {
387 using RunType = ExtractCallableRunType<Functor>;
588 template <typename Functor>
[all …]
Dbind.h183 template <typename Functor, typename... Args>
184 inline OnceCallback<MakeUnboundRunType<Functor, Args...>>
185 BindOnce(Functor&& functor, Args&&... args) {
186 static_assert(!internal::IsOnceCallback<std::decay_t<Functor>>() ||
187 (std::is_rvalue_reference<Functor&&>() &&
188 !std::is_const<std::remove_reference_t<Functor>>()),
195 using Helper = internal::BindTypeHelper<Functor, Args...>;
207 using BindState = internal::MakeBindStateType<Functor, Args...>;
208 using UnboundRunType = MakeUnboundRunType<Functor, Args...>;
221 std::forward<Functor>(functor),
[all …]
/external/libcxx/test/std/utilities/function.objects/func.invoke/
Dinvoke.pass.cpp81 template <class Signature, class Expect, class Functor>
82 void test_b12(Functor&& f) { in test_b12()
92 std::invoke(func_ptr, std::forward<Functor>(f), std::move(arg)) in test_b12()
97 typedef typename std::result_of<ClassFunc&&(Functor&&, NonCopyable&&)>::type in test_b12()
103 std::invoke(func_ptr, std::forward<Functor>(f), std::move(arg)); in test_b12()
107 template <class Expect, class Functor>
108 void test_b34(Functor&& f) { in test_b34()
115 std::invoke(func_ptr, std::forward<Functor>(f)) in test_b34()
120 typedef typename std::result_of<ClassFunc&&(Functor&&)>::type in test_b34()
126 std::invoke(func_ptr, std::forward<Functor>(f)); in test_b34()
[all …]
/external/eigen/unsupported/Eigen/
DAdolcForward98 template<typename Functor> class AdolcForwardJacobian : public Functor
103 AdolcForwardJacobian() : Functor() {}
104 AdolcForwardJacobian(const Functor& f) : Functor(f) {}
108 AdolcForwardJacobian(const T0& a0) : Functor(a0) {}
110 AdolcForwardJacobian(const T0& a0, const T1& a1) : Functor(a0, a1) {}
112 AdolcForwardJacobian(const T0& a0, const T1& a1, const T1& a2) : Functor(a0, a1, a2) {}
114 typedef typename Functor::InputType InputType;
115 typedef typename Functor::ValueType ValueType;
116 typedef typename Functor::JacobianType JacobianType;
126 Functor::operator()(x, v);
[all …]
/external/eigen/unsupported/test/
DNonLinearOptimization.cpp108 struct Functor struct
121 Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {} in Functor() argument
122 Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {} in Functor() argument
131 struct lmder_functor : Functor<double> argument
133 lmder_functor(void): Functor<double>(3,15) {} in lmder_functor()
243 struct hybrj_functor : Functor<double>
245 hybrj_functor(void) : Functor<double>(9,9) {} in hybrj_functor()
349 struct hybrd_functor : Functor<double>
351 hybrd_functor(void) : Functor<double>(9,9) {} in hybrd_functor()
431 struct lmstr_functor : Functor<double>
[all …]
DNumericalDiff.cpp13 struct Functor struct
26 Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {} in Functor() argument
27 Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {} in Functor() function
34 struct my_functor : Functor<double> argument
36 my_functor(void): Functor<double>(3,15) {} in my_functor()
/external/eigen/Eigen/src/Core/products/
DParallelizer.h87 template<bool Condition, typename Functor, typename Index>
88 void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, bool transpose) in parallelize_gemm()
111 Index pb_max_threads = std::max<Index>(1,size / Functor::Traits::nr); in parallelize_gemm()
144 blockRows = (blockRows/Functor::Traits::mr)*Functor::Traits::mr; in parallelize_gemm()
/external/eigen/Eigen/src/SparseCore/
DSparseAssign.h127 template< typename DstXprType, typename SrcXprType, typename Functor>
128 struct Assignment<DstXprType, SrcXprType, Functor, Sparse2Sparse>
137 template< typename DstXprType, typename SrcXprType, typename Functor>
138 struct Assignment<DstXprType, SrcXprType, Functor, Sparse2Dense>
140 static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
142 …if(internal::is_same<Functor,internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::…
177 template< typename DstXprType, typename SrcXprType, typename Functor>
178 struct Assignment<DstXprType, SrcXprType, Functor, Diagonal2Sparse>
/external/libchrome/mojo/public/cpp/system/tests/
Ddata_pipe_drainer_unittest.cc15 template <typename Functor>
16 base::RepeatingClosure BindLambda(Functor callable) { in BindLambda()
17 return base::BindRepeating([](Functor callable) { callable(); }, callable); in BindLambda()
/external/eigen/Eigen/src/Core/
DTriangularMatrix.h735 …posite, typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version = Sp…
736 …el : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
739 …typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Ba…
753 …ignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType…
782 template<int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType, typename Functor>
784 void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func)
798 DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
822 template< typename DstXprType, typename SrcXprType, typename Functor>
823 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
825 EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
[all …]
DAssignEvaluator.h595 template<typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version = Sp…
606 …typedef copy_using_evaluator_traits<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor> AssignmentTrait…
610 …ignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType…
695 const Functor &m_functor;
704 template<typename DstXprType,typename SrcXprType, typename Functor>
706 void resize_if_allowed(DstXprType &dst, const SrcXprType& src, const Functor &/*func*/)
724 template<typename DstXprType, typename SrcXprType, typename Functor>
725 …INLINE void call_dense_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func)
738 typedef generic_dense_assignment_kernel<DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
767 template< typename DstXprType, typename SrcXprType, typename Functor,
[all …]
DSelfAdjointView.h276 …SetOpposite, typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version>
277 …assignment_kernel<UpLo,SelfAdjoint,SetOpposite,DstEvaluatorTypeT,SrcEvaluatorTypeT,Functor,Version>
278 : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
281 …typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Ba…
295 …ignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType…
/external/clang/test/Parser/
Dobjcxx14-protocol-in-template.mm8 template <typename Functor> void F(Functor functor) {}
/external/eigen/unsupported/Eigen/src/NonLinearOptimization/
Dfdjac1.h7 const FunctorType &Functor, in fdjac1() argument
44 iflag = Functor(x, wa1); in fdjac1()
60 iflag = Functor(x, wa1); in fdjac1()
/external/clang/test/SemaCXX/
Dtypo-correction-cxx11.cpp30 auto Functor = [x]() {}; in f() local
31 long Alignment = __alignof__(Functor); in f()
/external/eigen/Eigen/src/Core/util/
DXprHelper.h526 template <typename A, typename B, typename Functor> struct cwise_promote_storage_type;
528 template <typename A, typename Functor> struct cwise_promote_storage_type<A,A,Fun…
529 template <typename Functor> struct cwise_promote_storage_type<Dense,D…
530 template <typename A, typename Functor> struct cwise_promote_storage_type<A,Dense…
531 template <typename B, typename Functor> struct cwise_promote_storage_type<Dense,B…
532 template <typename Functor> struct cwise_promote_storage_type<Sparse,…
533 template <typename Functor> struct cwise_promote_storage_type<Dense,S…

123