Go to main content

man pages section 3: DAX Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

dax_get_props (3DAX)

Name

dax_get_props - get properties

Synopsis

cc [ flag... ] file... -ldax [ library...]

#include <dax.h>

dax_status_t dax_get_props(dax_context_t *ctx, dax_props_t *props);

Description

This function returns in props the properties of DAX for the API version used to create the ctx.

The members of props are:

max_elem_bits

Maximum number of bits in a bit-sized element. DAX supports any number of bits from 1 to max_elem_bits.

max_elem_bytes

Maximum number of bytes in a fixed-width byte-sized element such that DAX supports any number of bytes from 1 to max_elem_bytes.

max_log_elem_bytes

Maximum number of bytes in a fixed-width byte-sized element for power-of-2 sizes. DAX supports sizes of 2i where i can have any value from 0 to max_log_elem_bytes, inclusive. In some versions of the libdax library, 2max_log_elem_bytes may be larger than max_elem_bytes.

max_var_elem_bytes

Maximum number of bytes in a variable-width byte-sized element. DAX supports any number of bytes from 1 to max_var_elem_bytes.

max_rle_elem_bits

Maximum number of bits in the length element of a run-length vector. DAX supports any number of bits from 1 to max_rle_elem_bits by powers of 2.

max_width_elem_bits

Maximum number of bits in the width element of a widths vector. DAX supports any number of bits from 1 to max_width_elem_bits by powers of 2.

max_scan_value_bytes

Maximum number of significant bytes in dax_int_t, used as the scan value and scan range comparison value(s).

dst_align

Required alignment in bytes for the destination buffer in all DAX operations.

dst_pad

Required length in bytes for rounding and additional padding in all DAX operations. For more information, see the dax_vec_t(3DAX) man page.

zip_align

Required alignment for a dax_zip_create_contig() codec.

zip_align_best

The optimal alignment for a codec in the dax_zip_create_contig() function. This may be larger than zip_align.

trans_bitmap_align

Required alignment for a dax_translate() bitmap.

trans_bitmap_align_best

The optimal alignment for a bitmap in the dax_translate() function. This may be larger than trans_bitmap_align.

large_elem_align

Required alignment in bytes of byte-sized input elements whose width is greater than max_elem_bytes.

max_native_bitmap

Maximum number of bits in a dax_translate() bitmap that DAX supports natively. DAX can support more bits but with lower efficiency.

max_zip_symbols

Maximum number of symbols in a zip codec.

max_zip_contig

The maximum buffer size for the dax_zip_get_contig() function.

zip_constrained

If the sum of zip symbol lengths is constrained to 14 bytes as described in dax_zip_create(), this is 1, else 0.

zip_native

If the codec in dax_zip_create_contig() is passed directly to DAX without conversion, this is 1, else 0.

ones_saturates

When an index written to the destination buffer for the ONES_INDEX flag is too large and the written value saturates at the maximum value, this is 1. If DAX generates an error for indices that are too large, this is 0.

pipe

If the dax_post() functions support the DAX_PIPE_SRC, DAX_PIPE_AUX, and DAX_PIPE_MASK flags, this is 1, else 0.

max_src_len

Maximum number of src elements in a single DAX hardware command. For larger vectors, libdax breaks the vector into multiple DAX commands.

max_dst_len

Maximum number of dst vector bytes in a single DAX hardware command. For larger vectors, libdax breaks the vector into multiple DAX commands.

debug_options

A mask of the dax_set_debug() options supported by this version.

log_options

A mask of the dax_set_log() options supported by this version.

The values of the properties for each version of the libdax API are as follows.

Property
libdax Version 1
libdax Version 2
max_elem_bits
16
24
max_elem_bytes
16
16
max_log_elem_bytes
4
4
max_var_elem_bytes
16
16
max_rle_elem_bits
8
8
max_width_elem_bits
8
8
max_scan_value_bytes
16
16
max_native_bitmap
32K
64K
max_zip_symbols
1024
1024
max_zip_contig
4098
8192
zip_constrained
1
0
zip_native
0
1
ones_saturates
1
1
dst_align
64
64
dst_pad
64
64
zip_align
16
16
zip_align_best
16
8192
trans_bitmap_align
64
16
trans_bitmap_align_best
4096
8192
large_elem_align
1
1
max_src_len
16M
16M
max_dst_len
64M
64M
debug_options
DAX_DEBUG_ARG
DAX_DEBUG_EXTRA
DAX_DEBUG_SYNC
DAX_DEBUG_PERF
DAX_DEBUG_ARG
DAX_DEBUG_EXTRA
DAX_DEBUG_SYNC
DAX_DEBUG_PERF
log_options
DAX_LOG_ERROR
DAX_LOG_ENTRY
DAX_LOG_PERF
DAX_LOG_RETURN
DAX_LOG_VERBOSE
DAX_LOG_WARNING
DAX_LOG_ERROR
DAX_LOG_ENTRY
DAX_LOG_PERF
DAX_LOG_RETURN
DAX_LOG_VERBOSE
DAX_LOG_WARNING

Note -  If the function returns an error, props is not modified.

Return Values

DAX_SUCCESS

Operation completed successfully

DAX_ETHREAD

The calling thread did not create ctx

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/library
Interface Stability
Committed

See Also

dax_scan_value(3DAX), dax_zip_create(3DAX), dax_copy(3DAX), dax_vec_t(3DAX), dax_set_debug(3DAX), dax_set_log(3DAX)