@Namespace(value="dnnl") @Properties(inherit=dnnl.class) public class primitive extends dnnl_primitive_handle
dev_guide_basic_concepts
\{
\addtogroup dnnl_api_primitives_common Common
Common operations to create, destroy and inspect primitives
\{
Base class for all computational primitives.
| Modifier and Type | Class and Description |
|---|---|
static class |
primitive.kind
Kinds of primitives supported by the library.
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
primitive() |
primitive(dnnl_primitive_desc c_pd)
Constructs a primitive from a C API primitive descriptor.
|
primitive(dnnl_primitive_desc c_pd,
byte[] cache_blob) |
primitive(dnnl_primitive_desc c_pd,
ByteBuffer cache_blob) |
primitive(dnnl_primitive_desc c_pd,
BytePointer cache_blob)
Constructs a primitive from a C API primitive descriptor and a cache blob.
|
primitive(dnnl_primitive t) |
primitive(dnnl_primitive t,
boolean weak) |
primitive(long size)
Native array allocator.
|
primitive(Pointer p)
Pointer cast constructor.
|
primitive(primitive_desc pd)
Constructs a primitive from a primitive descriptor.
|
primitive(primitive_desc pd,
byte[] cache_blob) |
primitive(primitive_desc pd,
ByteBuffer cache_blob) |
primitive(primitive_desc pd,
BytePointer cache_blob)
Constructs a primitive from a primitive descriptor and a cache blob.
|
primitive(primitive arg0) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(stream astream,
IntMemoryMap args)
Executes computations specified by the primitive in a specified stream.
|
BytePointer |
get_cache_blob()
Returns a cache blob for the primitive.
|
dnnl_primitive_desc |
get_dnnl_primitive_desc()
Returns the C API primitive descriptor of the underlying C API
primitive.
|
primitive.kind |
get_kind()
Returns the kind of the primitive.
|
primitive |
getPointer(long i) |
primitive |
position(long position) |
asBoolean, asDnnl_primitive, equals, get, get, notEquals, put, reset, resetaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic primitive()
public primitive(dnnl_primitive t, @Cast(value="bool") boolean weak)
public primitive(dnnl_primitive t)
public primitive(Pointer p)
Pointer(Pointer).public primitive(long size)
Pointer.position(long).public primitive(@Const dnnl_primitive_desc c_pd)
c_pd - C API primitive descriptor.public primitive(@Const dnnl_primitive_desc c_pd, @Cast(value="uint8_t*") @StdVector BytePointer cache_blob)
c_pd - C API primitive descriptor.cache_blob - Cache blob.public primitive(@Const dnnl_primitive_desc c_pd, @Cast(value="uint8_t*") @StdVector ByteBuffer cache_blob)
public primitive(@Const dnnl_primitive_desc c_pd, @Cast(value="uint8_t*") @StdVector byte[] cache_blob)
public primitive(@Const @ByRef primitive_desc pd)
pd - Primitive descriptor.public primitive(@Const @ByRef primitive_desc pd, @Cast(value="uint8_t*") @StdVector BytePointer cache_blob)
pd - Primitive descriptor.cache_blob - Cache blob.public primitive(@Const @ByRef primitive_desc pd, @Cast(value="uint8_t*") @StdVector ByteBuffer cache_blob)
public primitive(@Const @ByRef primitive_desc pd, @Cast(value="uint8_t*") @StdVector byte[] cache_blob)
public primitive position(long position)
position in class dnnl_primitive_handlepublic primitive getPointer(long i)
getPointer in class dnnl_primitive_handle@Name(value="get_primitive_desc") @Const public dnnl_primitive_desc get_dnnl_primitive_desc()
public primitive.kind get_kind()
@Cast(value="uint8_t*") @StdVector public BytePointer get_cache_blob()
public void execute(@Const @ByRef stream astream, @Const @ByRef IntMemoryMap args)
DNNL_ARG_* values
such as DNNL_ARG_SRC, and the memory must have a memory descriptor
matching the one returned by
primitive_desc::query_md(#query::exec_arg_md, index) unless using
dynamic shapes (see #DNNL_RUNTIME_DIM_VAL).astream - Stream object. The stream must belong to the same engine
as the primitive.args - Arguments map.Copyright © 2025. All rights reserved.