fragment_downloaded_cb({"url":"concepts.html#orc-concepts","fragment":"Orc Concepts\nOrc is a compiler for a simple assembly-like language. Unlike most compilers, Orc is primarily a library, which means that all its features can be controlled from any application that uses it. Also unlike most compilers, Orc creates code that can be immediately exectuted by the application.\nOrc is mainly useful for generating code that performs simple mathematical operations on continguous arrays. An example Orc function, translated to C, might look like:\nOrc is primarily targetted toward generating code for vector CPU extensions such as SSE, Altivec, and NEON.\nPossible usage patterns:\nThe application generates Orc code programmatically. Generate Orc programs programmatically at runtime, compile at runtime, and execute. This is what many of the Orc test programs do, and is the most flexible and well-developed method at this time. This requires depending on the Orc library at runtime.\nThe application developer uses Orc to produce assembly source code that is then compiled into the application. This requires the developer to have Orc installed at build time. The advantage of this method is no Orc dependency at runtime. Disadvantages are a more complex build process, potential for compiler incompatibilities with generated assembly source code, and any Orc improvements require the application to be recompiled.\nThe application developer writes Orc source files, and compiles them into Orc bytecode to be included in the application. At runtime, Orc compiles the bytecode into executable code. This has the advantage of being easily editable. This method is still somewhat experimental.\nA wide variety of additional workflows are possible, although tools are not yet available to make it convenient.\n"});