<trclass="memdesc:a1b6ef55a1a122063d3af38e47c340963"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Supplies COO format specific indices and marks the contained sparse tensor as being a COO format tensor. Values are supplied with a <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API. The supplied indices are not copied and the user allocated buffers lifespan must eclipse that of the OrtValue. The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. <ahref="struct_ort_1_1_value.html#a1b6ef55a1a122063d3af38e47c340963">More...</a><br/></td></tr>
<trclass="memdesc:a475c1d0e4610b9ace64a71c938fd64d2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Supplies CSR format specific indices and marks the contained sparse tensor as being a CSR format tensor. Values are supplied with a <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API. The supplied indices are not copied and the user allocated buffers lifespan must eclipse that of the OrtValue. The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. <ahref="struct_ort_1_1_value.html#a475c1d0e4610b9ace64a71c938fd64d2">More...</a><br/></td></tr>
<trclass="memdesc:a8f8b5207913f0c484bc14ee7518ff17e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Supplies BlockSparse format specific indices and marks the contained sparse tensor as being a BlockSparse format tensor. Values are supplied with a <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API. The supplied indices are not copied and the user allocated buffers lifespan must eclipse that of the OrtValue. The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. <ahref="struct_ort_1_1_value.html#a8f8b5207913f0c484bc14ee7518ff17e">More...</a><br/></td></tr>
<trclass="memdesc:aa938f89369a0754d673d57c30ca15a07"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API will allocate memory using the allocator instance supplied to the <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API and copy the values and COO indices into it. If data_mem_info specifies that the data is located at difference device than the allocator, a X-device copy will be performed if possible. <ahref="struct_ort_1_1_value.html#aa938f89369a0754d673d57c30ca15a07">More...</a><br/></td></tr>
<trclass="memdesc:adb67431539beec2b8229be2924ff0cc6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API will allocate memory using the allocator instance supplied to the <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API and copy the values and CSR indices into it. If data_mem_info specifies that the data is located at difference device than the allocator, a X-device copy will be performed if possible. <ahref="struct_ort_1_1_value.html#adb67431539beec2b8229be2924ff0cc6">More...</a><br/></td></tr>
<trclass="memdesc:a969cce2f5429f038ffe9662538e484b5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API will allocate memory using the allocator instance supplied to the <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API and copy the values and BlockSparse indices into it. If data_mem_info specifies that the data is located at difference device than the allocator, a X-device copy will be performed if possible. <ahref="struct_ort_1_1_value.html#a969cce2f5429f038ffe9662538e484b5">More...</a><br/></td></tr>
<trclass="memdesc:afb0f62eb042c6bf25f023331fbf821f1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API returns the sparse data format this OrtValue holds in a sparse tensor. If the sparse tensor was not fully constructed, i.e. Use*() or Fill*() API were not used the value returned is ORT_SPARSE_UNDEFINED. <ahref="struct_ort_1_1_value.html#afb0f62eb042c6bf25f023331fbf821f1">More...</a><br/></td></tr>
<trclass="memdesc:a8c671843b4a34071311d7d5ce7af38d9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API returns type and shape information for stored non-zero values of the sparse tensor. Use <aclass="el"href="struct_ort_1_1_value.html#af6f22b4c04a4b8182bf0b3c1da334c84"title="The API returns a pointer to an internal buffer of the sparse tensor containing non-zero values....">GetSparseTensorValues()</a> to obtain values buffer pointer. <ahref="struct_ort_1_1_value.html#a8c671843b4a34071311d7d5ce7af38d9">More...</a><br/></td></tr>
<trclass="memdesc:a6fafbe9098011d60978cfe9f7c9b7083"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API returns type and shape information for the specified indices. Each supported indices have their own enum values even if a give format has more than one kind of indices. Use <aclass="el"href="struct_ort_1_1_value.html#a0eaf1f9f96f18194ead77ee855698503"title="The API retrieves a pointer to the internal indices buffer. The API merely performs a convenience dat...">GetSparseTensorIndicesData()</a> to obtain pointer to indices buffer. <ahref="struct_ort_1_1_value.html#a6fafbe9098011d60978cfe9f7c9b7083">More...</a><br/></td></tr>
<trclass="memitem:a0eaf1f9f96f18194ead77ee855698503"><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<trclass="memitem:a0eaf1f9f96f18194ead77ee855698503"><tdclass="memTemplItemLeft"align="right"valign="top">const T * </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="struct_ort_1_1_value.html#a0eaf1f9f96f18194ead77ee855698503">GetSparseTensorIndicesData</a> (<aclass="el"href="group___global.html#ga497c04502f658b896b265233fc890787">OrtSparseIndicesFormat</a> indices_format, size_t &num_indices) const</td></tr>
<trclass="memdesc:a0eaf1f9f96f18194ead77ee855698503"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API retrieves a pointer to the internal indices buffer. The API merely performs a convenience data type casting on the return type pointer. Make sure you are requesting the right type, use <aclass="el"href="struct_ort_1_1_value.html#a6fafbe9098011d60978cfe9f7c9b7083"title="The API returns type and shape information for the specified indices. Each supported indices have the...">GetSparseTensorIndicesTypeShapeInfo()</a>; <ahref="struct_ort_1_1_value.html#a0eaf1f9f96f18194ead77ee855698503">More...</a><br/></td></tr>
<trclass="memitem:af8813a399df6e6576923c1c40d39c67e"><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<trclass="memitem:af8813a399df6e6576923c1c40d39c67e"><tdclass="memTemplItemLeft"align="right"valign="top">void </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="struct_ort_1_1_value.html#af8813a399df6e6576923c1c40d39c67e">GetOpaqueData</a> (const char *domain, const char *type_name, T &) const</td></tr>
<trclass="memdesc:af8813a399df6e6576923c1c40d39c67e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="struct_ort_api.html#aab40422beeb98330f90cf758eaba36a7"title="Get internal data from an opaque (custom user defined type) OrtValue.">OrtApi::GetOpaqueValue</a>. <ahref="struct_ort_1_1_value.html#af8813a399df6e6576923c1c40d39c67e">More...</a><br/></td></tr>
<trclass="memdesc:a233d9a9878a69295ad504ea2b22b4d1f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Create an empty <aclass="el"href="struct_ort_1_1_value.html">Value</a> object, must be assigned a valid one to be used. <ahref="struct_ort_1_1_value.html#a233d9a9878a69295ad504ea2b22b4d1f">More...</a><br/></td></tr>
<trclass="memdesc:a4e744a54c1fe6c477cccbe33b580fe3b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Used for interop with the C API. <ahref="struct_ort_1_1_value.html#a4e744a54c1fe6c477cccbe33b580fe3b">More...</a><br/></td></tr>
<trclass="memdesc:a2df13bf81010090da46eee36c4a9b5a4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns true if <aclass="el"href="struct_ort_1_1_value.html">Value</a> is a tensor, false for other types like map/sequence/etc. <ahref="struct_ort_1_1_value.html#a2df13bf81010090da46eee36c4a9b5a4">More...</a><br/></td></tr>
<trclass="memdesc:a6db197c9c78aafe5b1a6f4e1e5d743dc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">< Return true if OrtValue contains data and returns false if the OrtValue is a None <ahref="struct_ort_1_1_value.html#a6db197c9c78aafe5b1a6f4e1e5d743dc">More...</a><br/></td></tr>
<trclass="memdesc:afd9c45362170384c33eccdbf1ab1fa87"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This API returns a full length of string data contained within either a tensor or a sparse Tensor. For sparse tensor it returns a full length of stored non-empty strings (values). The API is useful for allocating necessary memory and calling <aclass="el"href="struct_ort_1_1_value.html#a50a029dee567f88be916994cc14da4b3"title="The API copies all of the UTF-8 encoded string data contained within a tensor or a sparse tensor into...">GetStringTensorContent()</a>. <ahref="struct_ort_1_1_value.html#afd9c45362170384c33eccdbf1ab1fa87">More...</a><br/></td></tr>
<trclass="memdesc:a50a029dee567f88be916994cc14da4b3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API copies all of the UTF-8 encoded string data contained within a tensor or a sparse tensor into a supplied buffer. Use <aclass="el"href="struct_ort_1_1_value.html#afd9c45362170384c33eccdbf1ab1fa87"title="This API returns a full length of string data contained within either a tensor or a sparse Tensor....">GetStringTensorDataLength()</a> to find out the length of the buffer to allocate. The user must also allocate offsets buffer with the number of entries equal to that of the contained strings. <ahref="struct_ort_1_1_value.html#a50a029dee567f88be916994cc14da4b3">More...</a><br/></td></tr>
<trclass="memdesc:a008fc5074d15a9af5a971de7dd8834ac"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="struct_ort_api.html#a24486475cc05b9228a57b814b2024d77"title="Get a pointer to the raw data inside a tensor.">OrtApi::GetTensorMutableData</a>. <ahref="struct_ort_1_1_value.html#a008fc5074d15a9af5a971de7dd8834ac">More...</a><br/></td></tr>
<trclass="memitem:a35c4cc546773ba410659bb67ea5a6c10"><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<trclass="memitem:a35c4cc546773ba410659bb67ea5a6c10"><tdclass="memTemplItemLeft"align="right"valign="top">const T * </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="struct_ort_1_1_value.html#a35c4cc546773ba410659bb67ea5a6c10">GetTensorData</a> () const</td></tr>
<trclass="memdesc:a35c4cc546773ba410659bb67ea5a6c10"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="struct_ort_api.html#a24486475cc05b9228a57b814b2024d77"title="Get a pointer to the raw data inside a tensor.">OrtApi::GetTensorMutableData</a>. <ahref="struct_ort_1_1_value.html#a35c4cc546773ba410659bb67ea5a6c10">More...</a><br/></td></tr>
<trclass="memitem:af6f22b4c04a4b8182bf0b3c1da334c84"><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<trclass="memitem:af6f22b4c04a4b8182bf0b3c1da334c84"><tdclass="memTemplItemLeft"align="right"valign="top">const T * </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="struct_ort_1_1_value.html#af6f22b4c04a4b8182bf0b3c1da334c84">GetSparseTensorValues</a> () const</td></tr>
<trclass="memdesc:af6f22b4c04a4b8182bf0b3c1da334c84"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API returns a pointer to an internal buffer of the sparse tensor containing non-zero values. The API merely does casting. Make sure you are requesting the right data type by calling <aclass="el"href="struct_ort_1_1_value.html#a8c671843b4a34071311d7d5ce7af38d9"title="The API returns type and shape information for stored non-zero values of the sparse tensor....">GetSparseTensorValuesTypeAndShapeInfo()</a> first. <ahref="struct_ort_1_1_value.html#af6f22b4c04a4b8182bf0b3c1da334c84">More...</a><br/></td></tr>
<trclass="memdesc:a9a568ff40447e756b3a62ec7c903b45e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API returns type information for data contained in a tensor. For sparse tensors it returns type information for contained non-zero values. It returns dense shape for sparse tensors. <ahref="struct_ort_1_1_value.html#a9a568ff40447e756b3a62ec7c903b45e">More...</a><br/></td></tr>
<trclass="memdesc:a3fe6e43ecc5679d3e547183f36248c9d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API returns type information for data contained in a tensor. For sparse tensors it returns type information for contained non-zero values. It returns dense shape for sparse tensors. <ahref="struct_ort_1_1_value.html#a3fe6e43ecc5679d3e547183f36248c9d">More...</a><br/></td></tr>
<trclass="memdesc:a759a2a4e0c3c37dd0d164e60ce3ae301"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API returns a byte length of UTF-8 encoded string element contained in either a tensor or a spare tensor values. <ahref="struct_ort_1_1_value.html#a759a2a4e0c3c37dd0d164e60ce3ae301">More...</a><br/></td></tr>
<trclass="memdesc:ad50d9f9c09d7305d37b51b9dc71001c3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The API copies UTF-8 encoded bytes for the requested string element contained within a tensor or a sparse tensor into a provided buffer. Use <aclass="el"href="struct_ort_1_1_value.html#a759a2a4e0c3c37dd0d164e60ce3ae301"title="The API returns a byte length of UTF-8 encoded string element contained in either a tensor or a spare...">GetStringTensorElementLength()</a> to obtain the length of the buffer to allocate. <ahref="struct_ort_1_1_value.html#ad50d9f9c09d7305d37b51b9dc71001c3">More...</a><br/></td></tr>
<trclass="inherit_header pub_methods_struct_ort_1_1_base"><tdcolspan="2"onclick="javascript:toggleInherit('pub_methods_struct_ort_1_1_base')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="struct_ort_1_1_base.html">Ort::Base< OrtValue ></a></td></tr>
<trclass="memdesc:a2f4ae170cb8adebc982cb2dea39325c9 inherit pub_methods_struct_ort_1_1_base"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Releases ownership of the contained pointer. <ahref="struct_ort_1_1_base.html#a2f4ae170cb8adebc982cb2dea39325c9">More...</a><br/></td></tr>
<trclass="memdesc:a3898146b5fc35b838bd48db807dd6c8e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a tensor with a user supplied buffer. Wraps <aclass="el"href="struct_ort_api.html#a2aad3ccd68c66d0b38bdb966467d9324"title="Create a tensor backed by a user supplied buffer.">OrtApi::CreateTensorWithDataAsOrtValue</a>. <ahref="struct_ort_1_1_value.html#a3898146b5fc35b838bd48db807dd6c8e">More...</a><br/></td></tr>
<trclass="memdesc:ab19ff01babfb77660ed022c4057046ef"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a tensor with a user supplied buffer. Wraps <aclass="el"href="struct_ort_api.html#a2aad3ccd68c66d0b38bdb966467d9324"title="Create a tensor backed by a user supplied buffer.">OrtApi::CreateTensorWithDataAsOrtValue</a>. <ahref="struct_ort_1_1_value.html#ab19ff01babfb77660ed022c4057046ef">More...</a><br/></td></tr>
<trclass="memdesc:a07bd3c4da603a8fc23ea6e1f86482f6b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This is a simple forwarding method to the other overload that helps deducing data type enum value from the type of the buffer. <ahref="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b">More...</a><br/></td></tr>
<trclass="memdesc:a059315bd22476066e30a2d6034bfb9d3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an OrtValue instance containing SparseTensor. This constructs a sparse tensor that makes use of user allocated buffers. It does not make copies of the user provided data and does not modify it. The lifespan of user provided buffers should eclipse the life span of the resulting OrtValue. This call constructs an instance that only contain a pointer to non-zero values. To fully populate the sparse tensor call Use<Format>Indices() API below to supply a sparse format specific indices. This API is not suitable for string data. Use <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> with allocator specified so strings can be properly copied into the allocated buffer. <ahref="struct_ort_1_1_value.html#a059315bd22476066e30a2d6034bfb9d3">More...</a><br/></td></tr>
<trclass="memdesc:acacfe668acf9b55ffcd9d375c7f32053"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a tensor using a supplied <aclass="el"href="struct_ort_allocator.html"title="Memory allocation interface.">OrtAllocator</a>. Wraps <aclass="el"href="struct_ort_api.html#afa229d9d92820cc59298ed38d3f4f73f"title="Create a tensor.">OrtApi::CreateTensorAsOrtValue</a>. <ahref="struct_ort_1_1_value.html#acacfe668acf9b55ffcd9d375c7f32053">More...</a><br/></td></tr>
<trclass="memdesc:a5d35080239ae47cdbc9e505666dc32ec"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a tensor using a supplied <aclass="el"href="struct_ort_allocator.html"title="Memory allocation interface.">OrtAllocator</a>. Wraps <aclass="el"href="struct_ort_api.html#afa229d9d92820cc59298ed38d3f4f73f"title="Create a tensor.">OrtApi::CreateTensorAsOrtValue</a>. <ahref="struct_ort_1_1_value.html#a5d35080239ae47cdbc9e505666dc32ec">More...</a><br/></td></tr>
<trclass="memdesc:a560452c9940a9756089e42d767932e46"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This is a simple forwarding method the below CreateSparseTensor. This helps to specify data type enum in terms of C++ data type. Use CreateSparseTensor<T><ahref="struct_ort_1_1_value.html#a560452c9940a9756089e42d767932e46">More...</a><br/></td></tr>
<trclass="memdesc:a15ae05c786194af9ba2e541a91233b2f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an instance of OrtValue containing sparse tensor. The created instance has no data. The data must be supplied by on of the FillSparseTensor<Format>() methods that take both non-zero values and indices. The data will be copied into a buffer that would be allocated using the supplied allocator. Use this API to create OrtValues that contain sparse tensors with all supported data types including strings. <ahref="struct_ort_1_1_value.html#a15ae05c786194af9ba2e541a91233b2f">More...</a><br/></td></tr>
<trclass="memdesc:a028498f12d19f373b7479abe8a4a8b75"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="struct_ort_api.html#ac0a58d7d43a98ebe44a2d2f7f8406415"title="Create a map or sequence OrtValue.">OrtApi::CreateValue</a>. <ahref="struct_ort_1_1_value.html#a028498f12d19f373b7479abe8a4a8b75">More...</a><br/></td></tr>
<trclass="memdesc:ad4ca9c86f4996e9490e7e9de960f7afc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="struct_ort_api.html#ac0a58d7d43a98ebe44a2d2f7f8406415"title="Create a map or sequence OrtValue.">OrtApi::CreateValue</a>. <ahref="struct_ort_1_1_value.html#ad4ca9c86f4996e9490e7e9de960f7afc">More...</a><br/></td></tr>
<trclass="memdesc:aba8bad055b8cdaa1fb57f9aba9e6773e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="struct_ort_api.html#ae12e59921f2c3480bb4bc0fcf7ddd6ec"title="Create an opaque (custom user defined type) OrtValue.">OrtApi::CreateOpaqueValue</a>. <ahref="struct_ort_1_1_value.html#aba8bad055b8cdaa1fb57f9aba9e6773e">More...</a><br/></td></tr>
<trclass="inherit_header pro_methods_struct_ort_1_1_base"><tdcolspan="2"onclick="javascript:toggleInherit('pro_methods_struct_ort_1_1_base')"><imgsrc="closed.png"alt="-"/> Protected Member Functions inherited from <aclass="el"href="struct_ort_1_1_base.html">Ort::Base< OrtValue ></a></td></tr>
<p>Wraps <aclass="el"href="struct_ort_api.html#ac0a58d7d43a98ebe44a2d2f7f8406415"title="Create a map or sequence OrtValue.">OrtApi::CreateValue</a>. </p>
<p>Wraps <aclass="el"href="struct_ort_api.html#ae12e59921f2c3480bb4bc0fcf7ddd6ec"title="Create an opaque (custom user defined type) OrtValue.">OrtApi::CreateOpaqueValue</a>. </p>
<p>Wraps <aclass="el"href="struct_ort_api.html#ac0a58d7d43a98ebe44a2d2f7f8406415"title="Create a map or sequence OrtValue.">OrtApi::CreateValue</a>. </p>
<p>Creates an OrtValue instance containing SparseTensor. This constructs a sparse tensor that makes use of user allocated buffers. It does not make copies of the user provided data and does not modify it. The lifespan of user provided buffers should eclipse the life span of the resulting OrtValue. This call constructs an instance that only contain a pointer to non-zero values. To fully populate the sparse tensor call Use<Format>Indices() API below to supply a sparse format specific indices. This API is not suitable for string data. Use <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> with allocator specified so strings can be properly copied into the allocated buffer. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">info</td><td>Memory description where the user buffers reside (CPU vs GPU etc)</td></tr>
<tr><tdclass="paramname">p_data</td><td>pointer to the user supplied buffer, use nullptr for fully sparse tensors</td></tr>
<tr><tdclass="paramname">dense_shape</td><td>a would be dense shape of the tensor</td></tr>
<tr><tdclass="paramname">values_shape</td><td>non zero values shape. Use a single 0 shape for fully sparse tensors.</td></tr>
<p>This is a simple forwarding method the below CreateSparseTensor. This helps to specify data type enum in terms of C++ data type. Use CreateSparseTensor<T></p>
<p>Creates an instance of OrtValue containing sparse tensor. The created instance has no data. The data must be supplied by on of the FillSparseTensor<Format>() methods that take both non-zero values and indices. The data will be copied into a buffer that would be allocated using the supplied allocator. Use this API to create OrtValues that contain sparse tensors with all supported data types including strings. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">allocator</td><td>allocator to use. The allocator lifespan must eclipse that of the resulting OrtValue</td></tr>
<tr><tdclass="paramname">dense_shape</td><td>a would be dense shape of the tensor</td></tr>
<p>Creates a tensor with a user supplied buffer. Wraps <aclass="el"href="struct_ort_api.html#a2aad3ccd68c66d0b38bdb966467d9324"title="Create a tensor backed by a user supplied buffer.">OrtApi::CreateTensorWithDataAsOrtValue</a>. </p>
<p>Creates a tensor with a user supplied buffer. Wraps <aclass="el"href="struct_ort_api.html#a2aad3ccd68c66d0b38bdb966467d9324"title="Create a tensor backed by a user supplied buffer.">OrtApi::CreateTensorWithDataAsOrtValue</a>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">info</td><td>Memory description of where the p_data buffer resides (CPU vs GPU etc). </td></tr>
<tr><tdclass="paramname">p_data</td><td>Pointer to the data buffer. </td></tr>
<tr><tdclass="paramname">p_data_byte_count</td><td>The number of bytes in the data buffer. </td></tr>
<tr><tdclass="paramname">shape</td><td>Pointer to the tensor shape dimensions. </td></tr>
<tr><tdclass="paramname">shape_len</td><td>The number of tensor shape dimensions. </td></tr>
<tr><tdclass="paramname">type</td><td>The data type. </td></tr>
<p>Creates a tensor using a supplied <aclass="el"href="struct_ort_allocator.html"title="Memory allocation interface.">OrtAllocator</a>. Wraps <aclass="el"href="struct_ort_api.html#afa229d9d92820cc59298ed38d3f4f73f"title="Create a tensor.">OrtApi::CreateTensorAsOrtValue</a>. </p>
<p>Creates a tensor using a supplied <aclass="el"href="struct_ort_allocator.html"title="Memory allocation interface.">OrtAllocator</a>. Wraps <aclass="el"href="struct_ort_api.html#afa229d9d92820cc59298ed38d3f4f73f"title="Create a tensor.">OrtApi::CreateTensorAsOrtValue</a>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">allocator</td><td>The allocator to use. </td></tr>
<tr><tdclass="paramname">shape</td><td>Pointer to the tensor shape dimensions. </td></tr>
<tr><tdclass="paramname">shape_len</td><td>The number of tensor shape dimensions. </td></tr>
<tr><tdclass="paramname">type</td><td>The data type. </td></tr>
<p>The API will allocate memory using the allocator instance supplied to the <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API and copy the values and BlockSparse indices into it. If data_mem_info specifies that the data is located at difference device than the allocator, a X-device copy will be performed if possible. </p>
<p>The API will allocate memory using the allocator instance supplied to the <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API and copy the values and COO indices into it. If data_mem_info specifies that the data is located at difference device than the allocator, a X-device copy will be performed if possible. </p>
<p>The API will allocate memory using the allocator instance supplied to the <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API and copy the values and CSR indices into it. If data_mem_info specifies that the data is located at difference device than the allocator, a X-device copy will be performed if possible. </p>
<p>Wraps <aclass="el"href="struct_ort_api.html#aab40422beeb98330f90cf758eaba36a7"title="Get internal data from an opaque (custom user defined type) OrtValue.">OrtApi::GetOpaqueValue</a>. </p>
<p>The API returns the sparse data format this OrtValue holds in a sparse tensor. If the sparse tensor was not fully constructed, i.e. Use*() or Fill*() API were not used the value returned is ORT_SPARSE_UNDEFINED. </p>
<p>The API retrieves a pointer to the internal indices buffer. The API merely performs a convenience data type casting on the return type pointer. Make sure you are requesting the right type, use <aclass="el"href="struct_ort_1_1_value.html#a6fafbe9098011d60978cfe9f7c9b7083"title="The API returns type and shape information for the specified indices. Each supported indices have the...">GetSparseTensorIndicesTypeShapeInfo()</a>; </p>
<p>The API returns type and shape information for the specified indices. Each supported indices have their own enum values even if a give format has more than one kind of indices. Use <aclass="el"href="struct_ort_1_1_value.html#a0eaf1f9f96f18194ead77ee855698503"title="The API retrieves a pointer to the internal indices buffer. The API merely performs a convenience dat...">GetSparseTensorIndicesData()</a> to obtain pointer to indices buffer. </p>
<tdclass="memname">const T * Ort::Value::GetSparseTensorValues </td>
<td>(</td>
<tdclass="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><divclass="memdoc">
<p>The API returns a pointer to an internal buffer of the sparse tensor containing non-zero values. The API merely does casting. Make sure you are requesting the right data type by calling <aclass="el"href="struct_ort_1_1_value.html#a8c671843b4a34071311d7d5ce7af38d9"title="The API returns type and shape information for stored non-zero values of the sparse tensor....">GetSparseTensorValuesTypeAndShapeInfo()</a> first. </p>
<p>The API returns type and shape information for stored non-zero values of the sparse tensor. Use <aclass="el"href="struct_ort_1_1_value.html#af6f22b4c04a4b8182bf0b3c1da334c84"title="The API returns a pointer to an internal buffer of the sparse tensor containing non-zero values....">GetSparseTensorValues()</a> to obtain values buffer pointer. </p>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="struct_ort_1_1_tensor_type_and_shape_info.html"title="Wrapper around OrtTensorTypeAndShapeInfo.">TensorTypeAndShapeInfo</a> values information</dd></dl>
<p>The API copies all of the UTF-8 encoded string data contained within a tensor or a sparse tensor into a supplied buffer. Use <aclass="el"href="struct_ort_1_1_value.html#afd9c45362170384c33eccdbf1ab1fa87"title="This API returns a full length of string data contained within either a tensor or a sparse Tensor....">GetStringTensorDataLength()</a> to find out the length of the buffer to allocate. The user must also allocate offsets buffer with the number of entries equal to that of the contained strings. </p>
<p>Strings are always assumed to be on CPU, no X-device copy. </p>
<tr><tdclass="paramname">buffer_length</td><td>length in bytes of the allocated buffer</td></tr>
<tr><tdclass="paramname">offsets</td><td>a pointer to the offsets user allocated buffer</td></tr>
<tr><tdclass="paramname">offsets_count</td><td>count of offsets, must be equal to the number of strings contained. that can be obtained from the shape of the tensor or from <aclass="el"href="struct_ort_1_1_value.html#a8c671843b4a34071311d7d5ce7af38d9"title="The API returns type and shape information for stored non-zero values of the sparse tensor....">GetSparseTensorValuesTypeAndShapeInfo()</a> for sparse tensors</td></tr>
<p>This API returns a full length of string data contained within either a tensor or a sparse Tensor. For sparse tensor it returns a full length of stored non-empty strings (values). The API is useful for allocating necessary memory and calling <aclass="el"href="struct_ort_1_1_value.html#a50a029dee567f88be916994cc14da4b3"title="The API copies all of the UTF-8 encoded string data contained within a tensor or a sparse tensor into...">GetStringTensorContent()</a>. </p>
<dlclass="section return"><dt>Returns</dt><dd>total length of UTF-8 encoded bytes contained. No zero terminators counted.</dd></dl>
<p>The API copies UTF-8 encoded bytes for the requested string element contained within a tensor or a sparse tensor into a provided buffer. Use <aclass="el"href="struct_ort_1_1_value.html#a759a2a4e0c3c37dd0d164e60ce3ae301"title="The API returns a byte length of UTF-8 encoded string element contained in either a tensor or a spare...">GetStringTensorElementLength()</a> to obtain the length of the buffer to allocate. </p>
<tdclass="memname">const T * Ort::Value::GetTensorData </td>
<td>(</td>
<tdclass="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><divclass="memdoc">
<p>Wraps <aclass="el"href="struct_ort_api.html#a24486475cc05b9228a57b814b2024d77"title="Get a pointer to the raw data inside a tensor.">OrtApi::GetTensorMutableData</a>. </p>
<p>Wraps <aclass="el"href="struct_ort_api.html#a24486475cc05b9228a57b814b2024d77"title="Get a pointer to the raw data inside a tensor.">OrtApi::GetTensorMutableData</a>. </p>
<p>The API returns type information for data contained in a tensor. For sparse tensors it returns type information for contained non-zero values. It returns dense shape for sparse tensors. </p>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="struct_ort_1_1_tensor_type_and_shape_info.html"title="Wrapper around OrtTensorTypeAndShapeInfo.">TensorTypeAndShapeInfo</a></dd></dl>
<p>The API returns type information for data contained in a tensor. For sparse tensors it returns type information for contained non-zero values. It returns dense shape for sparse tensors. </p>
<p>Supplies BlockSparse format specific indices and marks the contained sparse tensor as being a BlockSparse format tensor. Values are supplied with a <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API. The supplied indices are not copied and the user allocated buffers lifespan must eclipse that of the OrtValue. The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">indices_shape</td><td>indices shape or a {0} for fully sparse</td></tr>
<tr><tdclass="paramname">indices_data</td><td>user allocated buffer with indices or nullptr for fully spare tensors</td></tr>
<p>Supplies COO format specific indices and marks the contained sparse tensor as being a COO format tensor. Values are supplied with a <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API. The supplied indices are not copied and the user allocated buffers lifespan must eclipse that of the OrtValue. The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">indices_data</td><td>pointer to the user allocated buffer with indices. Use nullptr for fully sparse tensors.</td></tr>
<tr><tdclass="paramname">indices_num</td><td>number of indices entries. Use 0 for fully sparse tensors</td></tr>
<p>Supplies CSR format specific indices and marks the contained sparse tensor as being a CSR format tensor. Values are supplied with a <aclass="el"href="struct_ort_1_1_value.html#a07bd3c4da603a8fc23ea6e1f86482f6b"title="This is a simple forwarding method to the other overload that helps deducing data type enum value fro...">CreateSparseTensor()</a> API. The supplied indices are not copied and the user allocated buffers lifespan must eclipse that of the OrtValue. The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">inner_data</td><td>pointer to the user allocated buffer with inner indices or nullptr for fully sparse tensors</td></tr>
<tr><tdclass="paramname">inner_num</td><td>number of csr inner indices or 0 for fully sparse tensors</td></tr>
<tr><tdclass="paramname">outer_data</td><td>pointer to the user allocated buffer with outer indices or nullptr for fully sparse tensors</td></tr>
<tr><tdclass="paramname">outer_num</td><td>number of csr outer indices or 0 for fully sparse tensors</td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.2 </li>