Skip to content

Commit

Permalink
Docs update: c549877
Browse files Browse the repository at this point in the history
[email protected]
[doc] Clarified output modification for expand operation (#815)
  • Loading branch information
ipl_ci committed Dec 12, 2023
1 parent 00cc774 commit 0f9fdf4
Show file tree
Hide file tree
Showing 52 changed files with 27 additions and 11 deletions.
Binary file modified .doctrees/documentation/bench_docs/guide.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/documentation/dev_ref_docs/c_ref/c_job_apis.doctree
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/documentation/dev_ref_docs/low_level_api.doctree
Binary file not shown.
Binary file modified .doctrees/documentation/get_started_docs/code_examples.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/documentation/get_started_docs/installation.doctree
Binary file not shown.
Binary file modified .doctrees/documentation/get_started_docs/quick_start.doctree
Binary file not shown.
Binary file modified .doctrees/documentation/get_started_docs/testing.doctree
Binary file not shown.
Binary file modified .doctrees/documentation/introduction_docs/introduction.doctree
Binary file not shown.
Binary file modified .doctrees/documentation/introduction_docs/legal.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ If you take the output of expand and perform a select operation on it
(with the same bit vector as ``source-2``),
then you get back the same data as the original ``source-1``.

.. note::

The output of expand may not be in a format readable by the select operation
(for example, in the case mentioned in :ref:`analytics_output_modifications_nominal_bit_vector_reference_link`)

In this operation, the bit-width of the output is the same as the bit
width of ``source-1``, but the number of output elements is equal to the
number of input elements on ``source-2``. So for this operation, the job
field :c:member:`qpl_job.num_input_elements` actually contains the number of elements in
``source-2`` rather than ``source-1``.
width of ``source-1`` (unless explicitly changed by :c:member:`qpl_job.out_bit_width`)
but the number of output elements is equal to the number of input elements on
``source-2``. So for this operation, the job field :c:member:`qpl_job.num_input_elements`
actually contains the number of elements in ``source-2`` rather than ``source-1``.

Each 0-bit from ``source-2`` writes a zero to the output. Each 1-bit writes
the next entry from ``source-1``.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ corresponds to no output modification. The other three values invoke
output modification.


.. _analytics_output_modifications_nominal_bit_vector_reference_link:

Output Modification for Nominal Bit Vector Output
*************************************************

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,16 @@ <h1>Expand</h1>
If you take the output of expand and perform a select operation on it
(with the same bit vector as <code class="docutils literal notranslate"><span class="pre">source-2</span></code>),
then you get back the same data as the original <code class="docutils literal notranslate"><span class="pre">source-1</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The output of expand may not be in a format readable by the select operation
(for example, in the case mentioned in <a class="reference internal" href="c_operations_output_modification.html#analytics-output-modifications-nominal-bit-vector-reference-link"><span class="std std-ref">Output Modification for Nominal Bit Vector Output</span></a>)</p>
</div>
<p>In this operation, the bit-width of the output is the same as the bit
width of <code class="docutils literal notranslate"><span class="pre">source-1</span></code>, but the number of output elements is equal to the
number of input elements on <code class="docutils literal notranslate"><span class="pre">source-2</span></code>. So for this operation, the job
field <a class="reference internal" href="../../../dev_ref_docs/c_ref/c_job_apis.html#c.qpl_job.num_input_elements" title="qpl_job.num_input_elements"><code class="xref c c-member docutils literal notranslate"><span class="pre">qpl_job.num_input_elements</span></code></a> actually contains the number of elements in
<code class="docutils literal notranslate"><span class="pre">source-2</span></code> rather than <code class="docutils literal notranslate"><span class="pre">source-1</span></code>.</p>
width of <code class="docutils literal notranslate"><span class="pre">source-1</span></code> (unless explicitly changed by <a class="reference internal" href="../../../dev_ref_docs/c_ref/c_job_apis.html#c.qpl_job.out_bit_width" title="qpl_job.out_bit_width"><code class="xref c c-member docutils literal notranslate"><span class="pre">qpl_job.out_bit_width</span></code></a>)
but the number of output elements is equal to the number of input elements on
<code class="docutils literal notranslate"><span class="pre">source-2</span></code>. So for this operation, the job field <a class="reference internal" href="../../../dev_ref_docs/c_ref/c_job_apis.html#c.qpl_job.num_input_elements" title="qpl_job.num_input_elements"><code class="xref c c-member docutils literal notranslate"><span class="pre">qpl_job.num_input_elements</span></code></a>
actually contains the number of elements in <code class="docutils literal notranslate"><span class="pre">source-2</span></code> rather than <code class="docutils literal notranslate"><span class="pre">source-1</span></code>.</p>
<p>Each 0-bit from <code class="docutils literal notranslate"><span class="pre">source-2</span></code> writes a zero to the output. Each 1-bit writes
the next entry from <code class="docutils literal notranslate"><span class="pre">source-1</span></code>.</p>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ <h2> Contents </h2>
corresponds to no output modification. The other three values invoke
output modification.</p>
<section id="output-modification-for-nominal-bit-vector-output">
<h2>Output Modification for Nominal Bit Vector Output<a class="headerlink" href="#output-modification-for-nominal-bit-vector-output" title="Permalink to this heading">#</a></h2>
<span id="analytics-output-modifications-nominal-bit-vector-reference-link"></span><h2>Output Modification for Nominal Bit Vector Output<a class="headerlink" href="#output-modification-for-nominal-bit-vector-output" title="Permalink to this heading">#</a></h2>
<p>In case of nominal bit vector output, when the bit vector is expected to
be sparse, it may be more efficient to represent the bit vector as a
list of indices of those bits that are 1 rather than as a dense bit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,8 @@ <h2><a class="toc-backref" href="#id6" role="doc-backlink">Compression with Dict
<span class="k">constexpr</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">uint32_t</span><span class="w"> </span><span class="n">source_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2048</span><span class="p">;</span>

<span class="k">auto</span><span class="w"> </span><span class="n">main</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="o">**</span><span class="w"> </span><span class="n">argv</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Intel(R) Query Processing Library version is &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">qpl_get_library_version</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;.</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// Default to Software Path</span>
<span class="w"> </span><span class="n">qpl_path_t</span><span class="w"> </span><span class="n">execution_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">qpl_path_software</span><span class="p">;</span>

Expand Down Expand Up @@ -1271,10 +1273,13 @@ <h2><a class="toc-backref" href="#id6" role="doc-backlink">Compression with Dict
<span class="w"> </span><span class="n">hw_compr_level</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hw_compression_level</span><span class="o">::</span><span class="n">HW_LEVEL_1</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>

<span class="w"> </span><span class="c1">// To build the dictionary, users must provide a raw dictionary.</span>
<span class="w"> </span><span class="c1">// To better improve the compression ratio with dictionary, users should</span>
<span class="w"> </span><span class="c1">// set raw_dict_size to the maximum size of the raw dictionary,</span>
<span class="w"> </span><span class="c1">// refer to Intel® Query Processing Library (Intel® QPL) documentation.</span>
<span class="w"> </span><span class="c1">// In this example, we use the source data as the raw dictionary</span>
<span class="w"> </span><span class="c1">// The raw dictionary should contain pieces of data that are most likely to occur in the real</span>
<span class="w"> </span><span class="c1">// datasets to be compressed.</span>
<span class="w"> </span><span class="c1">// In this example, to make things simple, we just use the source data as the raw dictionary.</span>
<span class="w"> </span><span class="n">raw_dict_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">uint8_t</span><span class="w"> </span><span class="o">*</span><span class="n">raw_dict_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">source</span><span class="p">.</span><span class="n">data</span><span class="p">();</span>
<span class="w"> </span><span class="n">dictionary_buffer_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">qpl_get_dictionary_size</span><span class="p">(</span><span class="n">sw_compr_level</span><span class="p">,</span>
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 0f9fdf4

Please sign in to comment.