1#ifndef HSOLVER_LOBPCG_INTERNAL_H_
2#define HSOLVER_LOBPCG_INTERNAL_H_
24 std::fill_n(tensor.data<
T>(), count, value);
29template <
typename T,
typename U>
33 if (std::is_same<T, U>::value)
39 std::copy_n(
input, count, tensor.data<
T>());
46template <
typename T,
typename Device>
47template <
typename Value>
A multi-dimensional reference array of elements of a single data type.
Definition tensor_map.h:19
A multi-dimensional array of elements of a single data type.
Definition tensor.h:32
void broadcast(Value *data, const int count) const
Share root-owned coefficients or status within the eigensolve communicator.
Definition lobpcg_internal.h:48
const diag_comm_info comm_
Communicator/rank for distributed rows of one eigensolve.
Definition diago_lobpcg.h:114
#define T
Definition exp.cpp:237
void bcast_data(std::complex< double > *object, const int &n, const MPI_Comm &comm, int root)
Definition parallel_device.cpp:305
DataType
Definition tensor_enums.h:15
@ CpuDevice
Definition tensor_enums.h:30
Definition lobpcg_internal.h:17
ct::Tensor host_tensor(const int64_t count, const T value)
Allocate and fill a host Tensor for small projected matrices or scalar work arrays.
Definition lobpcg_internal.h:20
ct::Tensor host_tensor_cast_or_view(U *input, const int64_t count)
Borrow host storage when types match; otherwise own a converted copy. The view must not outlive input...
Definition lobpcg_internal.h:30
Definition dense_eigensolver.cpp:23
static constexpr DataType value
Definition tensor_enums.h:61
Input_para input
Definition test_io_sys_var.cpp:58