Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 271) sorted by relevance

1234567891011

/petsc/include/petsc/private/cpp/
H A Dtype_traits.hpp28 template <bool B, class T = void>
29 using enable_if_t = typename std::enable_if<B, T>::type;
30 template <bool B, class T, class F>
31 using conditional_t = typename std::conditional<B, T, F>::type;
32 template <class T>
33 using remove_const_t = typename std::remove_const<T>::type;
34 template <class T>
35 using add_const_t = typename std::add_const<T>::type;
36 template <class T>
37 using remove_cv_t = typename std::remove_cv<T>::type;
[all …]
H A Dmemory.hpp25 template <class T>
27 using unique_single = std::unique_ptr<T>;
30 template <class T>
31 struct unique_if<T[]> {
32 using unique_array_unknown_bound = std::unique_ptr<T[]>;
35 template <class T, std::size_t N>
36 struct unique_if<T[N]> {
42 template <class T, class... Args>
43 inline typename detail::unique_if<T>::unique_single make_unique(Args &&...args)
45 return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
[all …]
H A Dutility.hpp20 template <class T, class U = T>
21 inline T exchange(T &orig, U &&new_value)
23 T old_value = std::move(orig);
28 template <class T, T... idx>
30 static_assert(std::is_integral<T>::value, "");
32 using value_type = T;
42 template <class T, T N>
43 using make_integer_sequence = __make_integer_seq<integer_sequence, T, N>;
45 template <class T, T N>
46 using make_integer_sequence = integer_sequence<T, __integer_pack(N)...>;
[all …]
H A Darray.hpp23 template <class... T>
24 struct return_type_helper<void, T...> : std::common_type<T...> { };
26 template <class D, class... T>
27 using array_return_type = std::array<typename return_type_helper<D, T...>::type, sizeof...(T)>;
29 template <typename T, std::size_t NL, std::size_t... IL, std::size_t NR, std::size_t... IR>
30T, NL + NR> concat_array_impl(const std::array<T, NL> &l, const std::array<T, NR> &r, index_sequen… in concat_array_impl() argument
37 template <class D = void, class... T>
38 …etail::array_return_type<D, T...> make_array(T &&...t) noexcept(std::is_nothrow_constructible<deta… in make_array()
40 return {std::forward<T>(t)...}; in make_array()
43 template <typename T, std::size_t NL, std::size_t NR>
[all …]
H A Dtuple.hpp17 template <std::size_t I, class T>
18 using tuple_element_t = typename std::tuple_element<I, T>::type;
25 template <std::size_t... Idx, typename T, typename F>
26 constexpr inline F &&tuple_for_each(index_sequence<Idx...>, T &&tuple, F &&f) in tuple_for_each()
29 return (void)expander{((void)f(std::get<Idx>(std::forward<T>(tuple))), 0)...}, std::forward<F>(f); in tuple_for_each()
32 template <typename T, typename F>
33 constexpr inline F &&tuple_for_each(index_sequence<>, T &&, F &&f) noexcept in tuple_for_each() argument
40 template <typename T, typename F>
41 constexpr inline F &&tuple_for_each(T &&tuple, F &&f) in tuple_for_each()
43 using seq = make_index_sequence<std::tuple_size<remove_reference_t<T>>::value>; in tuple_for_each()
[all …]
/petsc/src/sys/objects/device/impls/cupm/
H A Dcupmevent.hpp21 template <DeviceType T, unsigned long flags>
22 …_VISIBILITY_INTERNAL CUPMEventPool : impl::Interface<T>, public RegisterFinalizeable<CUPMEventPool…
24 PETSC_CUPM_INHERIT_INTERFACE_TYPEDEFS_USING(T);
35 template <DeviceType T, unsigned long flags>
36 inline PetscErrorCode CUPMEventPool<T, flags>::finalize_() noexcept in finalize_()
46 template <DeviceType T, unsigned long flags>
47 inline PetscErrorCode CUPMEventPool<T, flags>::allocate(cupmEvent_t *event) noexcept in allocate()
61 template <DeviceType T, unsigned long flags>
62 inline PetscErrorCode CUPMEventPool<T, flags>::deallocate(cupmEvent_t *in_event) noexcept in deallocate()
76 template <DeviceType T, unsigned long flags>
[all …]
H A Dcupmstream.hpp23 template <DeviceType T>
24 …GLE_LIBRARY_VISIBILITY_INTERNAL CUPMStream : public StreamBase<CUPMStream<T>>, impl::Interface<T> {
25 using crtp_base_type = StreamBase<CUPMStream<T>>;
29 PETSC_CUPM_INHERIT_INTERFACE_TYPEDEFS_USING(T);
33 using event_type = CUPMEvent<T>;
55 template <DeviceType T>
56 inline PetscErrorCode CUPMStream<T>::destroy() noexcept in destroy()
67 template <DeviceType T>
68 inline PetscErrorCode CUPMStream<T>::create(flag_type flags) noexcept in create()
85 template <DeviceType T>
[all …]
H A Dkernels.hpp20 template <typename SizeType, typename T>
21 PETSC_DEVICE_INLINE_DECL static void grid_stride_1D(const SizeType size, T &&func) noexcept in grid_stride_1D()
34 template <typename T>
37 using value_type = T;
47 template <typename T>
50 using value_type = T;
60 template <typename T>
63 using value_type = T;
76 template <typename T>
77 PETSC_HOSTDEVICE_INLINE_DECL constexpr plus_equals<T> make_plus_equals(const T &v) noexcept in make_plus_equals()
[all …]
H A Dcupmallocator.hpp26 template <DeviceType T, typename PetscType = char>
30 template <DeviceType T, typename PetscType>
31 …tAllocator : public memory::impl::SegmentedMemoryPoolAllocatorBase<PetscType>, impl::Interface<T> {
33 PETSC_CUPM_INHERIT_INTERFACE_TYPEDEFS_USING(T);
47 template <DeviceType T, typename P>
49 inline PetscErrorCode HostAllocator<T, P>::allocate(value_type **ptr, size_type n, const StreamBase… in allocate()
56 template <DeviceType T, typename P>
58 inline PetscErrorCode HostAllocator<T, P>::deallocate(value_type *ptr, const StreamBase<U> *) noexc… in deallocate()
65 template <DeviceType T, typename P>
67 inline PetscErrorCode HostAllocator<T, P>::uninitialized_copy(value_type *dest, const value_type *s… in uninitialized_copy()
[all …]
H A Dcupmdevice.hpp24 template <DeviceType T>
25 class Device : public ::Petsc::device::impl::DeviceBase<Device<T>>, impl::Interface<T> {
27 PETSC_DEVICE_IMPL_BASE_CLASS_HEADER(base_type, Device<T>);
28 PETSC_CUPM_INHERIT_INTERFACE_TYPEDEFS_USING(T);
58 template <DeviceType T>
59 typename Device<T>::devices_type Device<T>::devices_ = {};
61 template <DeviceType T>
62 int Device<T>::defaultDevice_ = PETSC_CUPM_DEVICE_NONE;
64 template <DeviceType T>
65 bool Device<T>::initialized_ = false;
H A Dcupmcontext.hpp26 template <DeviceType T>
27 class PETSC_SINGLE_LIBRARY_VISIBILITY_INTERNAL DeviceContext : SolverInterface<T> {
29 PETSC_CUPMSOLVER_INHERIT_INTERFACE_TYPEDEFS_USING(T);
41 using stream_type = CUPMStream<T>;
42 using event_type = CUPMEvent<T>;
83 …C_NODISCARD static constexpr CUPMEvent<T> *event_cast_(PetscEvent event) noexcept { return static_… in event_cast_()
85 …PETSC_NODISCARD static PetscLogEvent CUPMBLAS_HANDLE_CREATE() noexcept { return T == DeviceType::C… in CUPMBLAS_HANDLE_CREATE()
87 …PETSC_NODISCARD static PetscLogEvent CUPMSOLVER_HANDLE_CREATE() noexcept { return T == DeviceType:… in CUPMSOLVER_HANDLE_CREATE()
261 template <DeviceType T>
262 inline PetscErrorCode DeviceContext<T>::initialize(PetscDevice device) noexcept in initialize()
[all …]
/petsc/share/petsc/datafiles/meshes/
H A Dnozzle.stp38 #24=DEGENERATE_TOROIDAL_SURFACE('',#223,6.1341,6.1722,.T.);
39 #25=DEGENERATE_TOROIDAL_SURFACE('',#236,6.1341,6.1722,.T.);
72 #44=ORIENTED_EDGE('',*,*,#96,.T.);
73 #45=ORIENTED_EDGE('',*,*,#97,.T.);
77 #49=ORIENTED_EDGE('',*,*,#100,.T.);
78 #50=ORIENTED_EDGE('',*,*,#101,.T.);
81 #53=ORIENTED_EDGE('',*,*,#103,.T.);
82 #54=ORIENTED_EDGE('',*,*,#104,.T.);
85 #57=ORIENTED_EDGE('',*,*,#107,.T.);
86 #58=ORIENTED_EDGE('',*,*,#108,.T.);
[all …]
/petsc/include/petsc/private/
H A Dhashset.txt8 PetscHSet<T> - Hash set with a key of <KeyType>
12 …ealso: `PETSC_HASH_SET()`, `PetscHSet<T>Create()`, `PetscHSet<T>Destroy()`, `PetscHSet<T>QueryAdd(…
13 …`PetscHSet<T>Add()`, `PetscHSet<T>Reset()`, `PETSC_HASH_MAP()`, `PetscHMap<T>Create()`, `PetscHSe…
15 typedef struct _PetscHash<T> PetscHSet<T>;
18 PetscHSet<T>Create - Create a hash set
22 PetscErrorCode PetscHSet<T>Create(PetscHSet<T> *ht)
29 .seealso: `PetscHSet<T>Destroy()`
33 PetscHSet<T>Destroy - Destroy a hash set
37 PetscErrorCode PetscHSet<T>Destroy(PetscHSet<T> *ht)
44 .seealso: `PetscHSet<T>Create()`
[all …]
H A Dcupmobject.hpp41 template <DeviceType T>
42 class PETSC_SINGLE_LIBRARY_VISIBILITY_INTERNAL UseCUPMHostAllocGuard : Interface<T> {
44 PETSC_CUPM_INHERIT_INTERFACE_TYPEDEFS_USING(T);
72 template <DeviceType T>
73 inline UseCUPMHostAllocGuard<T>::UseCUPMHostAllocGuard(bool useit) noexcept : v_(useit) in UseCUPMHostAllocGuard()
97 template <DeviceType T>
98 inline UseCUPMHostAllocGuard<T>::~UseCUPMHostAllocGuard() noexcept in ~UseCUPMHostAllocGuard()
109 template <DeviceType T>
110 inline bool UseCUPMHostAllocGuard<T>::value() const noexcept in value()
117 template <DeviceType T, PetscMemType MemoryType, PetscMemoryAccessMode AccessMode>
[all …]
H A Dhashmap.txt8 PetscHMap<T> - Hash table map with a key of <KeyType>
11 typedef khash_t(HMap<T>) *PetscHMap<T>;
15 .seealso: `PETSC_HASH_MAP()`, `PetscHMap<T>Create()`, `PETSC_HASH_SET()`, `PetscHSet<T>Create()`
17 typedef struct _PetscHash<T> PetscHMap<T>;
20 PetscHMap<T>Create - Create a hash table
24 PetscErrorCode PetscHMap<T>Create(PetscHMap<T> *ht)
31 .seealso: `PetscHMap<T>CreateWithSize()`, `PetscHMap<T>Destroy()`
35 PetscHMap<T>CreateWithSize - Create a hash table with a given initial size
39 PetscErrorCode PetscHMap<T>CreateWithSize(PetscInt n, PetscHMap<T> *ht)
52 .seealso: `PetscHMap<T>Create()`, `PetscHMap<T>Destroy()`
[all …]
H A Dmatdensecupmimpl.h61 template <device::cupm::DeviceType T>
62 …NGLE_LIBRARY_VISIBILITY_INTERNAL MatDense_CUPM_Base : protected device::cupm::impl::CUPMObject<T> {
64 PETSC_CUPMOBJECT_HEADER(T);
69 …return T == device::cupm::DeviceType::CUDA ? PetscStringize(PetscConcat(MatDenseCUDA, OP_NAME)) : …
97 template <device::cupm::DeviceType T>
98 inline constexpr MatType MatDense_CUPM_Base<T>::MATSEQDENSECUPM() noexcept in MATSEQDENSECUPM()
100 return T == device::cupm::DeviceType::CUDA ? MATSEQDENSECUDA : MATSEQDENSEHIP; in MATSEQDENSECUPM()
103 template <device::cupm::DeviceType T>
104 inline constexpr MatType MatDense_CUPM_Base<T>::MATMPIDENSECUPM() noexcept in MATMPIDENSECUPM()
106 return T == device::cupm::DeviceType::CUDA ? MATMPIDENSECUDA : MATMPIDENSEHIP; in MATMPIDENSECUPM()
[all …]
H A Dcupmblasinterface.hpp206 template <typename T, std::size_t I>
210 …xpr cupmBlasHandleWrapper(T h) noexcept : handle_{std::move(h)} { static_assert(std::is_standard_l… in cupmBlasHandleWrapper()
218 operator T() const { return handle_; } in operator T()
220 const T *ptr_to() const { return &handle_; } in ptr_to()
221 T *ptr_to() { return &handle_; } in ptr_to()
224 T handle_{};
371 #define PETSC_CUPMBLAS_IMPL_CLASS_HEADER(T) \ argument
372 PETSC_CUPM_INHERIT_INTERFACE_TYPEDEFS_USING(T); \
374 using ::Petsc::device::cupm::impl::BlasInterfaceImpl<T>::cupmBlasGetErrorName; \
376 …using cupmBlasHandle_t = typename ::Petsc::device::cupm::impl::BlasInterfaceImpl<T>::cupmBlas…
[all …]
H A Dcupminterface.hpp103 template <DeviceType T>
105 static const DeviceType type = T;
111 return std::get<util::to_underlying(T)>(DeviceTypes); in cupmName()
114 …PETSC_NODISCARD static constexpr const char *cupmNAME() noexcept { return T == DeviceType::CUDA ? … in cupmNAME()
116 …PETSC_NODISCARD static constexpr PetscDeviceType PETSC_DEVICE_CUPM() noexcept { return T == Device… in PETSC_DEVICE_CUPM()
118 …PETSC_NODISCARD static constexpr PetscMemType PETSC_MEMTYPE_CUPM() noexcept { return T == DeviceTy… in PETSC_MEMTYPE_CUPM()
122 template <DeviceType T>
123 const DeviceType InterfaceBase<T>::type;
125 #define PETSC_CUPM_BASE_CLASS_HEADER(T) \ argument
126 using ::Petsc::device::cupm::impl::InterfaceBase<T>::type; \
[all …]
H A Dcupmsolverinterface.hpp224 #define PETSC_CUPMSOLVER_IMPL_CLASS_HEADER(T) \ argument
225 PETSC_CUPMBLAS_INHERIT_INTERFACE_TYPEDEFS_USING(T); \
227 using ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::cupmSolverGetErrorName; \
229 …using cupmSolverHandle_t = typename ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::cupmSo…
230 …using cupmSolverError_t = typename ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::cupmSo…
231 …using cupmSolverFillMode_t = typename ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::cupmSo…
232 …using cupmSolverOperation_t = typename ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::cupmSo…
234 using ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::CUPMSOLVER_STATUS_SUCCESS; \
235 using ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::CUPMSOLVER_STATUS_NOT_INITIALIZED; \
236 using ::Petsc::device::cupm::impl::SolverInterfaceImpl<T>::CUPMSOLVER_STATUS_ALLOC_FAILED; \
[all …]
/petsc/src/ksp/ksp/tests/raja/
H A DmemoryManager.hpp33 template <typename T>
34 T *allocate(RAJA::Index_type size) in allocate()
36 T *ptr; in allocate()
38 cudaErrchk(cudaMallocManaged((void **)&ptr, sizeof(T) * size, cudaMemAttachGlobal)); in allocate()
40 hipErrchk(hipMalloc((void **)&ptr, sizeof(T) * size)); in allocate()
42 ptr = sycl_res->allocate<T>(size); in allocate()
44 ptr = new T[size]; in allocate()
49 template <typename T>
50 void deallocate(T *&ptr) in deallocate()
67 template <typename T>
[all …]
/petsc/src/mat/impls/dense/mpi/cupm/
H A Dmatmpidensecupm.hpp21 template <device::cupm::DeviceType T>
22 …TSC_SINGLE_LIBRARY_VISIBILITY_INTERNAL MatDense_MPI_CUPM : MatDense_CUPM<T, MatDense_MPI_CUPM<T>> {
24 MATDENSECUPM_HEADER(T, MatDense_MPI_CUPM<T>);
85 template <device::cupm::DeviceType T>
89 …PetscCall(impl::MatDense_MPI_CUPM<T>::CreateIMPLDenseCUPM(comm, m, n, M, N, data, A, dctx, preallo… in MatCreateMPIDenseCUPM()
102 template <device::cupm::DeviceType T>
103 inline constexpr Mat_MPIDense *MatDense_MPI_CUPM<T>::MatIMPLCast_(Mat m) noexcept in MatIMPLCast_()
108 template <device::cupm::DeviceType T>
109 inline constexpr MatType MatDense_MPI_CUPM<T>::MATIMPLCUPM_() noexcept in MATIMPLCUPM_()
116 template <device::cupm::DeviceType T>
[all …]
/petsc/src/ts/tutorials/autodiff/adolc-utils/
H A Dinit.cxx22 template <class T>
23 PetscErrorCode AdolcMalloc2(PetscInt m, PetscInt n, T **A[]) in AdolcMalloc2()
38 template <class T>
39 PetscErrorCode AdolcFree2(T **A) in AdolcFree2()
59 template <class T>
60 PetscErrorCode GiveGhostPoints(DM da, T *cgs, void *array) in GiveGhostPoints()
67 PetscCall(GiveGhostPoints1d(da, (T **)array)); in GiveGhostPoints()
69 PetscCall(GiveGhostPoints2d(da, cgs, (T ***)array)); in GiveGhostPoints()
84 template <class T>
85 PetscErrorCode GiveGhostPoints1d(DM da, T *a1d[]) in GiveGhostPoints1d()
[all …]
/petsc/src/ts/tutorials/
H A Dex10.c46 PetscScalar T; /* material temperature */ member
115 …PetscScalar Em, alpha, alpha_t, T = n->T, T_t = 1., chi = rd->I_H / (rd->k * T), chi_t = -chi / T in RDMaterialEnergy_Saha() local
118 Em = rd->k * T / rd->m_p * (1.5 * (1. + alpha) + alpha * chi); /* Eq 6 */ in RDMaterialEnergy_Saha()
122 dEm->T = Em / T * T_t + rd->k * T / rd->m_p * (1.5 * alpha_t + alpha_t * chi + alpha * chi_t); in RDMaterialEnergy_Saha()
128 …PetscScalar alpha, alpha_t, T = n->T, T_t = 1., chi = -0.3 / T, chi_t = -chi / T * T_t, a = 1., a_… in RDMaterialEnergy_Reduced() local
130 if (Em) *Em = (1. + alpha) * T + 0.3 * alpha; in RDMaterialEnergy_Reduced()
133 dEm->T = alpha_t * T + (1. + alpha) * T_t + 0.3 * alpha_t; in RDMaterialEnergy_Reduced()
140 *sigma_R = rd->K_R * rd->rho * PetscPowScalar(n->T, -rd->gamma); in RDSigma_R()
142 dsigma_R->T = -rd->gamma * (*sigma_R) / n->T; in RDSigma_R()
154 ddenom.T = 3. * rd->rho * dsigma_R.T; in RDDiffusionCoefficient()
[all …]
/petsc/src/vec/vec/impls/mpi/cupm/
H A Dvecmpicupm_impl.hpp21 template <device::cupm::DeviceType T>
22 inline Vec_MPI *VecMPI_CUPM<T>::VecIMPLCast_(Vec v) noexcept in VecIMPLCast_()
27 template <device::cupm::DeviceType T>
28 inline constexpr VecType VecMPI_CUPM<T>::VECIMPLCUPM_() noexcept in VECIMPLCUPM_()
33 template <device::cupm::DeviceType T>
34 inline constexpr VecType VecMPI_CUPM<T>::VECIMPL_() noexcept in VECIMPL_()
39 template <device::cupm::DeviceType T>
40 inline PetscErrorCode VecMPI_CUPM<T>::VecDestroy_IMPL_(Vec v) noexcept in VecDestroy_IMPL_()
48 template <device::cupm::DeviceType T>
49 inline PetscErrorCode VecMPI_CUPM<T>::VecResetArray_IMPL_(Vec v) noexcept in VecResetArray_IMPL_()
[all …]
/petsc/src/sys/objects/device/impls/
H A Dimpldevicebase.hpp31 template <typename T = derived_type>
34 return T::PETSC_DEVICE_IMPL_(); in PETSC_DEVICE_IMPL()
64 template <typename... T, util::enable_if_t<sizeof...(T) >= 3, int> = 0>
65 static PetscErrorCode PetscOptionDeviceInitialize(PetscOptionItems, T &&...) noexcept;
68 template <typename... T, util::enable_if_t<sizeof...(T) >= 3, int> = 0>
69 static PetscErrorCode PetscOptionDeviceSelect(PetscOptionItems, T &&...) noexcept;
72 template <typename... T, util::enable_if_t<sizeof...(T) >= 3, int> = 0>
73 static PetscErrorCode PetscOptionDeviceView(PetscOptionItems, T &&...) noexcept;
78 template <typename... T, typename F = PetscErrorCode (*)(PetscOptionItems, const char *, T &&...)>
79 static PetscErrorCode PetscOptionDevice(F &&, PetscOptionItems, const char[], T &&...) noexcept;
[all …]

1234567891011