@Namespace(value="cv::cuda")
@NoOffset
public static class opencv_core.HostMem
extends org.bytedeco.javacpp.Pointer
Its interface is also Mat-like but with additional memory type parameters.
- **PAGE_LOCKED** sets a page locked memory type used commonly for fast and asynchronous uploading/downloading data from/to GPU. - **SHARED** specifies a zero copy memory allocation that enables mapping the host memory to GPU address space, if supported. - **WRITE_COMBINED** sets the write combined buffer that is not cached by CPU. Such buffers are used to supply GPU with data when GPU only reads it. The advantage is a better CPU cache utilization.
\note Allocation size of such memory types is usually limited. For more details, see *CUDA 2.2 Pinned Memory APIs* document or *CUDA C Programming Guide*.
| Modifier and Type | Field and Description |
|---|---|
static int |
PAGE_LOCKED
enum cv::cuda::HostMem::AllocType
|
static int |
SHARED
enum cv::cuda::HostMem::AllocType
|
static int |
WRITE_COMBINED
enum cv::cuda::HostMem::AllocType
|
| Constructor and Description |
|---|
HostMem() |
HostMem(int alloc_type) |
HostMem(int rows,
int cols,
int type) |
HostMem(int rows,
int cols,
int type,
int alloc_type) |
HostMem(long size)
Native array allocator.
|
HostMem(opencv_core.GpuMat arr) |
HostMem(opencv_core.GpuMat arr,
int alloc_type) |
HostMem(opencv_core.HostMem m) |
HostMem(opencv_core.Mat arr) |
HostMem(opencv_core.Mat arr,
int alloc_type)
creates from host memory with coping data
|
HostMem(opencv_core.Size size,
int type) |
HostMem(opencv_core.Size size,
int type,
int alloc_type) |
HostMem(opencv_core.UMat arr) |
HostMem(opencv_core.UMat arr,
int alloc_type) |
HostMem(org.bytedeco.javacpp.Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
alloc_type() |
opencv_core.HostMem |
alloc_type(int alloc_type) |
int |
channels() |
opencv_core.HostMem |
clone()
returns deep copy of the matrix, i.e.
|
int |
cols() |
opencv_core.HostMem |
cols(int cols) |
void |
create(int rows,
int cols,
int type)
allocates new matrix data unless the matrix already has specified size and type.
|
void |
create(opencv_core.Size size,
int type) |
opencv_core.GpuMat |
createGpuMatHeader()
\brief Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting
for it.
|
opencv_core.Mat |
createMatHeader()
returns matrix header with disabled reference counting for HostMem data.
|
org.bytedeco.javacpp.BytePointer |
data() |
opencv_core.HostMem |
data(org.bytedeco.javacpp.BytePointer data) |
org.bytedeco.javacpp.BytePointer |
dataend() |
org.bytedeco.javacpp.BytePointer |
datastart() |
opencv_core.HostMem |
datastart(org.bytedeco.javacpp.BytePointer datastart) |
int |
depth() |
long |
elemSize() |
long |
elemSize1() |
boolean |
empty() |
int |
flags() |
opencv_core.HostMem |
flags(int flags) |
static opencv_core.MatAllocator |
getAllocator() |
static opencv_core.MatAllocator |
getAllocator(int alloc_type) |
boolean |
isContinuous() |
opencv_core.HostMem |
position(long position) |
opencv_core.HostMem |
put(opencv_core.HostMem m) |
org.bytedeco.javacpp.IntPointer |
refcount() |
opencv_core.HostMem |
refcount(org.bytedeco.javacpp.IntPointer refcount) |
void |
release()
decrements reference counter and released memory if needed.
|
opencv_core.HostMem |
reshape(int cn) |
opencv_core.HostMem |
reshape(int cn,
int rows)
creates alternative HostMem header for the same data, with different
number of channels and/or different number of rows
|
int |
rows() |
opencv_core.HostMem |
rows(int rows) |
opencv_core.Size |
size() |
long |
step() |
opencv_core.HostMem |
step(long step) |
long |
step1() |
void |
swap(opencv_core.HostMem b)
swaps with other smart pointer
|
int |
type() |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic static final int PAGE_LOCKED
public static final int SHARED
public static final int WRITE_COMBINED
public HostMem(org.bytedeco.javacpp.Pointer p)
Pointer.Pointer(Pointer).public HostMem(long size)
Pointer.position(long).public HostMem(@Cast(value="cv::cuda::HostMem::AllocType")
int alloc_type)
public HostMem()
public HostMem(@Const @ByRef
opencv_core.HostMem m)
public HostMem(int rows,
int cols,
int type,
@Cast(value="cv::cuda::HostMem::AllocType")
int alloc_type)
public HostMem(int rows,
int cols,
int type)
public HostMem(@ByVal
opencv_core.Size size,
int type,
@Cast(value="cv::cuda::HostMem::AllocType")
int alloc_type)
public HostMem(@ByVal
opencv_core.Size size,
int type)
public HostMem(@ByVal
opencv_core.Mat arr,
@Cast(value="cv::cuda::HostMem::AllocType")
int alloc_type)
public HostMem(@ByVal
opencv_core.Mat arr)
public HostMem(@ByVal
opencv_core.UMat arr,
@Cast(value="cv::cuda::HostMem::AllocType")
int alloc_type)
public HostMem(@ByVal
opencv_core.UMat arr)
public HostMem(@ByVal
opencv_core.GpuMat arr,
@Cast(value="cv::cuda::HostMem::AllocType")
int alloc_type)
public HostMem(@ByVal
opencv_core.GpuMat arr)
public opencv_core.HostMem position(long position)
position in class org.bytedeco.javacpp.Pointerpublic static opencv_core.MatAllocator getAllocator(@Cast(value="cv::cuda::HostMem::AllocType") int alloc_type)
public static opencv_core.MatAllocator getAllocator()
@ByRef @Name(value="operator =") public opencv_core.HostMem put(@Const @ByRef opencv_core.HostMem m)
public void swap(@ByRef
opencv_core.HostMem b)
@ByVal public opencv_core.HostMem clone()
public void create(int rows,
int cols,
int type)
public void create(@ByVal
opencv_core.Size size,
int type)
@ByVal public opencv_core.HostMem reshape(int cn, int rows)
@ByVal public opencv_core.HostMem reshape(int cn)
public void release()
@ByVal public opencv_core.Mat createMatHeader()
@ByVal public opencv_core.GpuMat createGpuMatHeader()
This can be done only if memory was allocated with the SHARED flag and if it is supported by the hardware. Laptops often share video and CPU memory, so address spaces can be mapped, which eliminates an extra copy.
@Cast(value="bool") public boolean isContinuous()
@Cast(value="size_t") public long elemSize()
@Cast(value="size_t") public long elemSize1()
public int type()
public int depth()
public int channels()
@Cast(value="size_t") public long step1()
@ByVal public opencv_core.Size size()
@Cast(value="bool") public boolean empty()
public int flags()
public opencv_core.HostMem flags(int flags)
public int rows()
public opencv_core.HostMem rows(int rows)
public int cols()
public opencv_core.HostMem cols(int cols)
@Cast(value="size_t") public long step()
public opencv_core.HostMem step(long step)
@Cast(value="uchar*") public org.bytedeco.javacpp.BytePointer data()
public opencv_core.HostMem data(org.bytedeco.javacpp.BytePointer data)
public org.bytedeco.javacpp.IntPointer refcount()
public opencv_core.HostMem refcount(org.bytedeco.javacpp.IntPointer refcount)
@Cast(value="uchar*") public org.bytedeco.javacpp.BytePointer datastart()
public opencv_core.HostMem datastart(org.bytedeco.javacpp.BytePointer datastart)
@MemberGetter @Cast(value="const uchar*") public org.bytedeco.javacpp.BytePointer dataend()
@Cast(value="cv::cuda::HostMem::AllocType") public int alloc_type()
public opencv_core.HostMem alloc_type(int alloc_type)
Copyright © 2018. All rights reserved.