Files
triton/v1.1.2/.doctrees/python-api/generated/triton.language.where.doctree

18 lines
9.6 KiB
Plaintext
Raw Normal View History

2022-02-08 20:02:05 +00:00
<EFBFBD><05>y&<00>sphinx.addnodes<65><73>document<6E><74><EFBFBD>)<29><>}<7D>(<28> rawsource<63><65><00><>children<65>]<5D><>docutils.nodes<65><73>section<6F><6E><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09>title<6C><65><EFBFBD>)<29><>}<7D>(h<05>triton.language.where<72>h]<5D>h <09>Text<78><74><EFBFBD><EFBFBD>triton.language.where<72><65><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<13>parent<6E>hhh<03>source<63>N<EFBFBD>line<6E>Nuba<62>
2022-02-09 07:15:50 +00:00
attributes<EFBFBD>}<7D>(<28>ids<64>]<5D><>classes<65>]<5D><>names<65>]<5D><>dupnames<65>]<5D><>backrefs<66>]<5D>u<EFBFBD>tagname<6D>hhh hhh<1C>m/tmp/tmpv4nhk24r/2d6df9b518a8152f777eb79b6b0a84becb706353/docs/python-api/generated/triton.language.where.rst<73>hKubh<00>index<65><78><EFBFBD>)<29><>}<7D>(hhh]<5D>h}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><>entries<65>]<5D>(<28>single<6C><65>#where() (in module triton.language)<29><>triton.language.where<72>hNt<4E>auh*h,hh hhhNhNubh<00>desc<73><63><EFBFBD>)<29><>}<7D>(hhh]<5D>(h<00>desc_signature<72><65><EFBFBD>)<29><>}<7D>(h<05>where(condition, x, y, )<29>h]<5D>(h<00> desc_addname<6D><65><EFBFBD>)<29><>}<7D>(h<05>triton.language.<2E>h]<5D>h<16>triton.language.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhhJhhhNhNubah}<7D>(h ]<5D>h"]<5D>(<28> sig-prename<6D><65> descclassname<6D>eh$]<5D>h&]<5D>h(]<5D><> xml:space<63><65>preserve<76>uh*hHhhDhhh<1C><>/tmp/tmpv4nhk24r/2d6df9b518a8152f777eb79b6b0a84becb706353/python/triton/language/core.py:docstring of triton.language.core.where<72>hNubh<00> desc_name<6D><65><EFBFBD>)<29><>}<7D>(h<05>where<72>h]<5D>h<16>where<72><65><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhh_hhhNhNubah}<7D>(h ]<5D>h"]<5D>(<28>sig-name<6D><65>descname<6D>eh$]<5D>h&]<5D>h(]<5D>hZh[uh*h]hhDhhhh\hNubh<00>desc_parameterlist<73><74><EFBFBD>)<29><>}<7D>(h<05>condition, x, y, <20>h]<5D>(h<00>desc_parameter<65><72><EFBFBD>)<29><>}<7D>(h<05> condition<6F>h]<5D>h<00> desc_sig_name<6D><65><EFBFBD>)<29><>}<7D>(h<05> condition<6F>h]<5D>h<16> condition<6F><6E><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhh}ubah}<7D>(h ]<5D>h"]<5D><>n<>ah$]<5D>h&]<5D>h(]<5D>uh*h{hhwubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>hZh[uh*huhhqubhv)<29><>}<7D>(h<05>x<>h]<5D>h|)<29><>}<7D>(h<05>x<>h]<5D>h<16>x<><78><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhh<>ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h{hh<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>hZh[uh*huhhqubhv)<29><>}<7D>(h<05>y<>h]<5D>h|)<29><>}<7D>(h<05>y<>h]<5D>h<16>y<><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhh<>ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h{hh<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>hZh[uh*huhhqubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>hZh[uh*hohhDhhhh\hNubeh}<7D>(h ]<5D>h;ah"]<5D>(<28>sig<69><67>
sig-object<63>eh$]<5D>h&]<5D>h(]<5D><>module<6C><65>triton.language<67><65>class<73>h<06>fullname<6D>hauh*hBhh\hKhh?hhubh<00> desc_content<6E><74><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09> paragraph<70><68><EFBFBD>)<29><>}<7D>(h<05>_Returns a block of elements from either :code:`x` or :code:`y`, depending on :code:`condition`.<2E>h]<5D>(h<16>(Returns a block of elements from either <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>(Returns a block of elements from either <20>hh<>hhhNhNubh <09>literal<61><6C><EFBFBD>)<29><>}<7D>(h<05> :code:`x`<60>h]<5D>h<16>x<><78><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>x<>hh<>ubah}<7D>(h ]<5D>h"]<5D><>code<64>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hh<>ubh<16> or <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> or <20>hh<>hhhNhNubh<62>)<29><>}<7D>(h<05> :code:`y`<60>h]<5D>h<16>y<><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>y<>hh<>ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hh<>ubh<16>, depending on <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>, depending on <20>hh<>hhhNhNubh<62>)<29><>}<7D>(h<05>:code:`condition`<60>h]<5D>h<16> condition<6F><6E><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> condition<6F>hjubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hh<>ubh<16>.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>.<2E>hh<>hhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>h<1C><>/tmp/tmpv4nhk24r/2d6df9b518a8152f777eb79b6b0a84becb706353/python/triton/language/core.py:docstring of triton.language.core.where<72>hKhh<>hhubh<62>)<29><>}<7D>(h<05>dNote that :code:`x` and :code:`y` are always evaluated regardless of the value of :code:`condition`.<2E>h]<5D>(h<16>
2022-02-08 20:02:05 +00:00
Note that <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>
Note that <20>hj*hhhNhNubh<62>)<29><>}<7D>(h<05> :code:`x`<60>h]<5D>h<16>x<><78><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hj3ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj*ubh<16> and <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> and <20>hj*hhhNhNubh<62>)<29><>}<7D>(h<05> :code:`y`<60>h]<5D>h<16>y<><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjhjFubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj*ubh<16>1 are always evaluated regardless of the value of <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>1 are always evaluated regardless of the value of <20>hj*hhhNhNubh<62>)<29><>}<7D>(h<05>:code:`condition`<60>h]<5D>h<16> condition<6F><6E><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> condition<6F>hjYubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj*ubh<16>.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj"hj*hhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hj)hKhh<>hhubh<62>)<29><>}<7D>(h<05>~If you want to avoid unintented memory operations, use the :code:`mask` arguments in `triton.load` and `triton.store` instead.<2E>h]<5D>(h<16>;If you want to avoid unintented memory operations, use the <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>;If you want to avoid unintented memory operations, use the <20>hjrhhhNhNubh<62>)<29><>}<7D>(h<05> :code:`mask`<60>h]<5D>h<16>mask<73><6B><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>mask<73>hj{ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hjrubh<16> arguments in <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> arguments in <20>hjrhhhNhNubh <09>title_reference<63><65><EFBFBD>)<29><>}<7D>(h<05> `triton.load`<60>h]<5D>h<16> triton.load<61><64><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*j<>hjrubh<16> and <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> and <20>hjrhhhNhNubj<62>)<29><>}<7D>(h<05>`triton.store`<60>h]<5D>h<16> triton.store<72><65><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*j<>hjrubh<16> instead.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> instead.<2E>hjrhhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hj)hKhh<>hhubh<62>)<29><>}<7D>(h<05><>The shape of :code:`x` and :code:`y` are both broadcast to the shape of :code:`condition`.
:code:`x` and :code:`y` must have the data type.<2E>h]<5D>(h<16> The shape of <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> The shape of <20>hj<>hhhNhNubh<62>)<29><>}<7D>(h<05> :code:`x`<60>h]<5D>h<16>x<><78><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hj<>ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubh<16> and <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> and <20>hj<>hhhNhNubh<62>)<29><>}<7D>(h<05> :code:`y`<60>h]<5D>h<16>y<><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjhj<>ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubh<16>$ are both broadcast to the shape of <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>$ are both broadcast to the shape of <20>hj<>hhhNhNubh<62>)<29><>}<7D>(h<05>:code:`condition`<60>h]<5D>h<16> condition<6F><6E><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> condition<6F>hj<>ubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubh<16>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>.
<EFBFBD>hj<>hhhNhNubh<62>)<29><>}<7D>(h<05> :code:`x`<60>h]<5D>h<16>x<><78><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hjubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubh<16> and <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj<>hj<>ubh<62>)<29><>}<7D>(h<05> :code:`y`<60>h]<5D>h<16>y<><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjhjubah}<7D>(h ]<5D>h"]<5D>h<EFBFBD>ah$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubh<16> must have the data type.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05> must have the data type.<2E>hj<>hhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hj)hKhh<>hhubh <09>
field_list<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(hhh]<5D>h <09>field<6C><64><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09>
field_name<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(h<05>
Parameters<EFBFBD>h]<5D>h<16>
Parameters<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj7ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*j5hj2hh\hKubh <09>
field_body<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(hhh]<5D>h <09> bullet_list<73><74><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09> list_item<65><6D><EFBFBD>)<29><>}<7D>(hhh]<5D>h<EFBFBD>)<29><>}<7D>(h<05>Tcondition (Block of triton.bool) -- When True (nonzero), yield x, otherwise yield y.<2E>h]<5D>(h<00>literal_strong<6E><67><EFBFBD>)<29><>}<7D>(h<05> condition<6F>h]<5D>h<16> condition<6F><6E><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhjZubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><> refspecific<69><63><EFBFBD> py:module<6C>py:class<73>Nuh*jXhjTubh<16> (<28><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhjTubh<00> pending_xref<65><66><EFBFBD>)<29><>}<7D>(hhh]<5D>h<00>literal_emphasis<69><73><EFBFBD>)<29><>}<7D>(h<05>Block of triton.bool<6F>h]<5D>h<16>Block of triton.bool<6F><6C><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhjvubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*jthjqubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><> refdomain<69><6E>py<70><79> refexplicit<69><74><EFBFBD>reftype<70>hҌ reftarget<65>jxjh<00>jih<>jjNuh*johjTubh<16>)<29><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhjTubh<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhjTubh<16>0When True (nonzero), yield x, otherwise yield y.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>0When True (nonzero), yield x, otherwise yield y.<2E>hjThhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hjQubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*jOhjLubjP)<29><>}<7D>(hhh]<5D>h<EFBFBD>)<29><>}<7D>(h<05>8x -- values selected at indices where condition is True.<2E>h]<5D>(jY)<29><>}<7D>(hh<>h]<5D>h<16>x<><78><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>jh<00>jih<>jjNuh*jXhj<>ubh<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj<>ubh<16>3values selected at indices where condition is True.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>3values selected at indices where condition is True.<2E>hj<>hhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*jOhjLubjP)<29><>}<7D>(hhh]<5D>h<EFBFBD>)<29><>}<7D>(h<05>9y -- values selected at indices where condition is False.<2E>h]<5D>(jY)<29><>}<7D>(hjh]<5D>h<16>y<><79><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>jh<00>jih<>jjNuh*jXhj<>ubh<16> <20><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj<>ubh<16>4values selected at indices where condition is False.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(h<05>4values selected at indices where condition is False.<2E>hj<>hhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*jOhjLubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*jJhjGubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*jEhj2ubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*j0hj-ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*j+hh<>hhhNhNubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh?hhhh\hNubeh}<7D>(h ]<5D>h"]<5D>(j<><00>function<6F>eh$]<5D>h&]<5D>h(]<5D><>domain<69>j<EFBFBD><00>objtype<70>j<00>desctype<70>j<00>noindex<65><78>uh*h=hhhh hNhNubeh}<7D>(h ]<5D><>triton-language-where<72>ah"]<5D>h$]<5D><>triton.language.where<72>ah&]<5D>h(]<5D>uh*h
hhhhhh+hKubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><>source<63>h+uh*h<01>current_source<63>N<EFBFBD> current_line<6E>N<EFBFBD>settings<67><73>docutils.frontend<6E><64>Values<65><73><EFBFBD>)<29><>}<7D>(hN<> generator<6F>N<EFBFBD> datestamp<6D>N<EFBFBD> source_link<6E>N<EFBFBD>
source_url<EFBFBD>N<EFBFBD> toc_backlinks<6B><73>entry<72><79>footnote_backlinks<6B>K<01> sectnum_xform<72>K<01>strip_comments<74>N<EFBFBD>strip_elements_with_classes<65>N<EFBFBD> strip_classes<65>N<EFBFBD> report_level<65>K<02>
halt_level<EFBFBD>K<05>exit_status_level<65>K<05>debug<75>N<EFBFBD>warning_stream<61>N<EFBFBD> traceback<63><6B><EFBFBD>input_encoding<6E><67> utf-8-sig<69><67>input_encoding_error_handler<65><72>strict<63><74>output_encoding<6E><67>utf-8<><38>output_encoding_error_handler<65>jN<00>error_encoding<6E><67>utf-8<><38>error_encoding_error_handler<65><72>backslashreplace<63><65> language_code<64><65>en<65><6E>record_dependencies<65>N<EFBFBD>config<69>N<EFBFBD> id_prefix<69>h<06>auto_id_prefix<69><78>id<69><64> dump_settings<67>N<EFBFBD>dump_internals<6C>N<EFBFBD>dump_transforms<6D>N<EFBFBD>dump_pseudo_xml<6D>N<EFBFBD>expose_internals<6C>N<EFBFBD>strict_visitor<6F>N<EFBFBD>_disable_config<69>N<EFBFBD>_source<63>h+<2B> _destination<6F>N<EFBFBD> _config_files<65>]<5D><>pep_references<65>N<EFBFBD> pep_base_url<72><6C> https://www.python.org/dev/peps/<2F><>pep_file_url_template<74><65>pep-%04d<34><64>rfc_references<65>N<EFBFBD> rfc_base_url<72><6C>https://tools.ietf.org/html/<2F><> tab_width<74>K<08>trim_footnote_reference_space<63><65><EFBFBD>file_insertion_enabled<65><64><EFBFBD> raw_enabled<65>K<01>syntax_highlight<68><74>long<6E><67> smart_quotes<65><73><EFBFBD>smartquotes_locales<65>]<5D><>character_level_inline_markup<75><70><EFBFBD>doctitle_xform<72><6D><EFBFBD> docinfo_xform<72>K<01>sectsubtitle_xform<72><6D><EFBFBD>embed_stylesheet<65><74><EFBFBD>cloak_email_addresses<65><73><EFBFBD>env<6E>Nub<75>reporter<65>N<EFBFBD>indirect_targets<74>]<5D><>substitution_defs<66>}<7D><>substitution_names<65>}<7D><>refnames<65>}<7D><>refids<64>}<7D><>nameids<64>}<7D>j(j%s<> nametypes<65>}<7D>j(Nsh }<7D>(j%h h;hDu<44> footnote_refs<66>}<7D><> citation_refs<66>}<7D><> autofootnotes<65>]<5D><>autofootnote_refs<66>]<5D><>symbol_footnotes<65>]<5D><>symbol_footnote_refs<66>]<5D><> footnotes<65>]<5D><> citations<6E>]<5D><>autofootnote_start<72>K<01>symbol_footnote_start<72>K<00>
id_counter<EFBFBD><EFBFBD> collections<6E><73>Counter<65><72><EFBFBD>}<7D><><EFBFBD>R<EFBFBD><52>parse_messages<65>]<5D><>transform_messages<65>]<5D><> transformer<65>N<EFBFBD>
decoration<EFBFBD>Nhhub.