open3d.core.HashSet¶
-
class
open3d.core.
HashSet
¶ A HashSet is an unordered set of keys wrapped by Tensors.
-
__init__
(self, init_capacity, key_dtype, key_element_shape, device=CPU:0)¶ - Parameters
init_capacity (int) – Initial capacity of a hash container.
key_dtype (open3d.core.Dtype) – Data type for the input key tensor.
key_element_shape (open3d.core.SizeVector) – Element shape for the input key tensor. E.g. (3) for 3D coordinate keys.
(open3d.core.Device (device) – 0): Compute device to store and operate on the hash container.
optional – 0): Compute device to store and operate on the hash container.
default=CPU – 0): Compute device to store and operate on the hash container.
-
active_buf_indices
(self: open3d.cpu.pybind.core.HashSet) → open3d.cpu.pybind.core.Tensor¶ Get the buffer indices corresponding to active entries in the hash set.
-
capacity
(self: open3d.cpu.pybind.core.HashSet) → int¶ Get the capacity of the hash set.
-
clone
(self: open3d.cpu.pybind.core.HashSet) → open3d.cpu.pybind.core.HashSet¶ Clone the hash set, including the data structure and the data buffers.
-
cpu
(self: open3d.cpu.pybind.core.HashSet) → open3d.cpu.pybind.core.HashSet¶ Transfer the hash set to CPU. If the hash set is already on CPU, no copy will be performed.
-
cuda
(self, device_id=0)¶ Transfer the hash set to a CUDA device. If the hash set is already on the specified CUDA device, no copy will be performed.
- Parameters
device_id (int, optional, default=0) – Target CUDA device ID.
- Returns
open3d.core.HashSet
-
erase
(self, keys)¶ Erase an array of keys stored in Tensors.
- Parameters
keys (open3d.core.Tensor) – Input keys stored in a tensor of shape (N, key_element_shape).
- Returns
open3d.core.Tensor
-
find
(self, keys)¶ Find an array of keys stored in Tensors.
- Parameters
keys (open3d.core.Tensor) – Input keys stored in a tensor of shape (N, key_element_shape).
- Returns
tuple
-
insert
(self, keys)¶ Insert an array of keys stored in Tensors.
- Parameters
keys (open3d.core.Tensor) – Input keys stored in a tensor of shape (N, key_element_shape).
- Returns
tuple
-
key_tensor
(self: open3d.cpu.pybind.core.HashSet) → open3d.cpu.pybind.core.Tensor¶ Get the key tensor stored in the buffer.
-
static
load
(file_name)¶ Load a hash set from a .npz file.
- Parameters
file_name (str) – File name of the corresponding .npz file.
- Returns
open3d.core.HashSet
-
reserve
(self, capacity)¶ Reserve the hash set given the capacity.
- Parameters
capacity (int) – New capacity for rehashing.
- Returns
None
-
save
(self, file_name)¶ Save the hash set into a .npz file.
- Parameters
file_name (str) – File name of the corresponding .npz file.
- Returns
None
-
size
(self: open3d.cpu.pybind.core.HashSet) → int¶ Get the size of the hash set.
-
to
(self, device, copy=False)¶ Convert the hash set to a selected device.
- Parameters
device (open3d.core.Device) – Compute device to store and operate on the hash container.
copy (bool, optional, default=False) – If true, a new tensor is always created; if false, the copy is avoided when the original tensor already has the targeted dtype.
- Returns
open3d.core.HashSet
-
property
device
¶
-
property
is_cpu
¶
-
property
is_cuda
¶
-