ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
tensor_map.h
Go to the documentation of this file.
1#ifndef ATEN_CORE_TENSOR_MAP_H_
2#define ATEN_CORE_TENSOR_MAP_H_
3
4#include <complex>
5
6#include <ATen/core/tensor.h>
7
8namespace container {
9
19 class TensorMap : public Tensor {
20 public:
21
34
46 TensorMap(void *data, const Tensor& other, const TensorShape& shape);
47
59 TensorMap(void *data, const Tensor& other);
60
61};
62
63} // namespace container
64
65#endif // ATEN_CORE_TENSOR_MAP_H_
TensorMap(void *data, DataType data_type, DeviceType device, const TensorShape &shape)
Constructor that map the given data pointer to a tensor object with the given data type,...
Definition tensor_map.cpp:5
A class for representing the shape of a tensor.
Definition tensor_shape.h:13
Tensor()
Creates a 1-dimentional, 0-element float tensor.
Definition tensor.cpp:10
void * data() const
Get a pointer to the data buffer of the tensor.
Definition tensor.cpp:73
DataType data_type() const
Get the data type of the tensor.
Definition tensor.cpp:61
const TensorShape & shape() const
Get the shape of the tensor.
Definition tensor.cpp:67
Definition tensor.cpp:8
DataType
Definition tensor_enums.h:15
DeviceType
Definition tensor_enums.h:28