Showing content from http://reference.wolfram.com/language/ref/compiledtype/PackedArray.html below:
PackedArray—Wolfram Language Documentation
WOLFRAM Consulting & Solutions
We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
- Data & Computational Intelligence
- Model-Based Design
- Algorithm Development
- Wolfram|Alpha for Business
- Blockchain Technology
- Education Technology
- Quantum Computation
WolframConsulting.com
COMPILED TYPE
"PackedArray" (Compiled Type)
"PackedArray"::[type,rank]
represents a packed array composite type with elements of specified type and rank.
Details
- "PackedArray" can be used in Typed and related constructs to specify a type.
- "PackedArray" objects are automatically memory managed.
- Only elements that have a type of "MachineInteger", "Real64" or "ComplexReal64" can be stored in a "PackedArray".
Constructors
- Packed arrays can be created with List in compiled code. »
- CreateTypeInstance["PackedArray"::[type,rank],array] constructs a copy of array.
- CreateTypeInstance["PackedArray"::[type,1],carr,len] constructs a packed array from a "CArray" carr with length len. carr can optionally be wrapped in "Managed".
Properties
- Information[array,"ElementType"] for array of type "PackedArray"::[type,rank] gives type .
Conversions
Expressions
- "PackedArray" objects can be converted to and from List objects of the appropriate form. For a List object to be converted to an object of type "PackedArray"::[type,rank], it must represent a rectangular array with the specified rank and element type.
"ListVector"
- "PackedArray" objects can be converted to and from "ListVector" objects.
Runtime Errors
ArrayPartError
- Elements with types constructed from "PackedArray" can give a runtime error if used in an operation that extracts or sets parts.
Examplesopen allclose all Basic Examples (2)
"PackedArray" can be used as an input and output from a CompiledCodeFunction:
Create a packed array in compiled code:
Scope (1)
"MachineInteger" is useful for working with "PackedArray", since this takes integers of the native size for the architecture:
Possible Issues (1)
Part access can cause an error while running the function. The computation is terminated, a message is issued and the Wolfram Engine is used to compute the result:
History
Introduced in 2019 (12.0) | Updated in 2022 (13.1)
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4