dax_and - compute logical AND of two vectors
cc [ flag... ] file... -ldax [ library...] #include <dax.h> dax_result_t dax_and(dax_context_t *ctx, uint64_t flags, dax_vec_t *src1, dax_vec_t *src2, dax_vec_t *dst);
This function computes the logical AND of src1 with src2 and stores the result in dst.
The parameters of this function must meet the following conditions:
In dst offset must be 0.
In src1, src2, and dst, elem_width must be 1 bit.
In src1, src2, and dst, format must be DAX_BITS.
In src1 and src2, the count of elements must match.
The number of elements in dst must at least be equal to the number of elements in src1.
The dst->data field must start on a 64 byte boundary.
Round up the size of the dst->data field in bytes as described in the dax_vec_t(3DAX) man page.
The following address ranges must not overlap:
Address range of the src1->data vector and the dst->data vector.
Address range of the src2->data vector and the dst->data vector.
The libdax library checks the overlap in the address ranges only if the DAX_DEBUG_EXTRA debug option is set. If violation of the conditions occur and are not checked, you will get undefined results.
Inverts the result
Inverts src2 before performing the operation
Writes results to cache. If not specified, invalidates the address range for dst in the cache, and writes the result to the main memory. For more information, see the dax_scan_value(3DAX) man page.
If the DAX command queue is full, returns without submitting the command, instead of waiting to submit.
Returns the number of one bits in dst in the dax_result_t count field and sets the dax_result_t status field to one of the following values:
Operation completed successfully
Invalid argument, detected by libdax
Invalid argument, detected by DAX
The true value of an aux_data element is 0, or the width of a zip symbol is less than 1 or greater than 8, detected by DAX.
Output buffer overflow
ADI mismatch error for an input or output buffer
The calling thread did not create ctx
DAX is busy and nowait was requested
Unknown internal error. Caller must stop using ctx.
See attributes(5) for descriptions of the following attributes:
|
libdax(3LIB), dax_vec_t(3DAX), dax_adi(3DAX), dax_scan_value(3DAX), dax_dtrace(3DAX)
In libdax versions 1 and 2, this function is available in software, but in a future version, the DAX hardware could implement this function.
In libdax versions 1 and 2, the DAX_CACHE_DST flag is silently ignored in this function.