48 const Dtype& dtype_key,
49 const Dtype& dtype_value,
62 void Rehash(int64_t buckets);
69 void Insert(
const Tensor& input_keys,
70 const Tensor& input_values,
81 void Activate(
const Tensor& input_keys,
90 void Find(
const Tensor& input_keys,
98 void Erase(
const Tensor& input_keys,
Tensor& output_masks);
103 void GetActiveIndices(
Tensor& output_indices)
const;
111 Hashmap CUDA(
int device_id = 0)
const;
113 int64_t Size()
const;
115 int64_t GetCapacity()
const;
116 int64_t GetBucketCount()
const;
118 int64_t GetKeyBytesize()
const;
119 int64_t GetValueBytesize()
const;
121 Tensor& GetKeyBuffer()
const;
122 Tensor& GetValueBuffer()
const;
124 Tensor GetKeyTensor()
const;
125 Tensor GetValueTensor()
const;
129 std::vector<int64_t> BucketSizes()
const;
132 float LoadFactor()
const;
135 return device_hashmap_;
139 void AssertKeyDtype(
const Dtype& dtype_key,
141 void AssertValueDtype(
const Dtype& dtype_val,
148 std::shared_ptr<DeviceHashmap> device_hashmap_;
HashmapBackend
Definition: Hashmap.h:38
Definition: SizeVector.h:102
~Hashmap()
Definition: Hashmap.h:55
Dtype GetKeyDtype() const
Definition: Hashmap.h:144
Definition: PinholeCameraIntrinsic.cpp:35
void To(const core::Tensor &src_im, core::Tensor &dst_im, double scale, double offset)
Definition: IPPImage.cpp:46
Dtype GetValueDtype() const
Definition: Hashmap.h:145
std::shared_ptr< DeviceHashmap > GetDeviceHashmap() const
Definition: Hashmap.h:134