Professional Documents
Culture Documents
Architecture of Advanced Numerical Analysis Systems: Designing a Scientific Computing System using OCaml 1st Edition Liang Wang full chapter instant download
Architecture of Advanced Numerical Analysis Systems: Designing a Scientific Computing System using OCaml 1st Edition Liang Wang full chapter instant download
Architecture of Advanced Numerical Analysis Systems: Designing a Scientific Computing System using OCaml 1st Edition Liang Wang full chapter instant download
https://ebookmass.com/product/architecture-of-advanced-numerical-
analysis-systems-designing-a-scientific-computing-system-using-
ocaml-1st-edition-liang-wang-2/
https://ebookmass.com/product/concise-guide-to-numerical-
algorithmics-the-foundations-and-spirit-of-scientific-computing-
john-lawrence-nazareth/
https://ebookmass.com/product/system-architecture-and-complexity-
vol-2-contribution-of-systems-of-systems-to-systems-thinking-
printz/
https://ebookmass.com/product/numerical-methods-using-kotlin-for-
data-science-analysis-and-engineering-1st-edition-haksun-li-2/
Numerical Methods Using Kotlin: For Data Science,
Analysis, and Engineering 1st Edition Haksun Li
https://ebookmass.com/product/numerical-methods-using-kotlin-for-
data-science-analysis-and-engineering-1st-edition-haksun-li/
https://ebookmass.com/product/graph-database-and-graph-computing-
for-power-system-analysis-renchang-dai/
https://ebookmass.com/product/battery-system-modeling-shunli-
wang/
https://ebookmass.com/product/cloud-computing-concepts-
technology-security-architecture-thomas-erl-eric-barcelo-monroy/
https://ebookmass.com/product/ascend-ai-processor-architecture-
and-programming-principles-and-applications-of-cann-xiaoyao-
liang/
Liang Wang and Jianxin Zhao
Jianxin Zhao
Bejing, China
Open Access This book is licensed under the terms of the Creative
Commons Attribution 4.0 International License (http://
creativecommons.org/licenses/by/4.0/), which permits use, sharing,
adaptation, distribution and reproduction in any medium or format, as
long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if
changes were made.
The images or other third party material in this book are included
in the book's Creative Commons license, unless indicated otherwise in a
credit line to the material. If material is not included in the book's
Creative Commons license and your intended use is not permitted by
statutory regulation or exceeds the permitted use, you will need to
obtain permission directly from the copyright holder.
The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
Jianxin Zhao
is a PhD graduate from the University of
Cambridge. His research interests
include numerical computation, artificial
intelligence, decentralized systems, and
their application in the real world.
Footnotes
1 http://ocaml-sf.org/
2 https://ahrefs.com/
© The Author(s) 2023
L. Wang, J. Zhao, Architecture of Advanced Numerical Analysis Systems
https://doi.org/10.1007/978-1-4842-8853-5_1
1. Introduction
Liang Wang1 and Jianxin Zhao2
(1) Helsinki, Finland
(2) Bejing, China
1.2 Architecture
Designing and developing a full-fledged numerical library is a nontrivial
task, despite that OCaml has been widely used in system programming
such as MirageOS. The key difference between the two is fundamental
and interesting: system libraries provide a lean set of APIs to abstract
complex and heterogeneous physical hardware, while numerical
libraries offer a fat set of functions over a small set of abstract number
types.
When the Owl project started in 2016, we were immediately
confronted by a series of fundamental questions like: “what should be
the basic data types”, “what should be the core data structures”, “what
modules should be designed”, etc. In the following development and
performance optimization, we also tackled many research and
engineering challenges on a wide range of different topics such as
software engineering, language design, system and network
programming, etc. As a result, Owl is a rather complex library, arguably
one of the most complicated numerical software system developed in
OCaml. It contains about 269K lines of OCaml code, 142K lines of C
code, and more than 6500 functions. We have strived for a modular
design to make sure that the system is flexible and extendable.
We present the architecture of Owl briefly as in Figure 1-1. It
contains two subsystems. The subsystem on the left part is Owl’s
numerical subsystem. The modules contained in this subsystem fall
into four categories:
Core modules contain basic data structures, namely, the n-
dimensional array, including C-based and OCaml-based
implementation, and symbolic representation.
Classic analytics contains basic mathematical and statistical
functions, linear algebra, signal processing, ordinary differential
equation, etc., and foreign function interface to other libraries (e.g.,
CBLAS and LAPACKE).
Advanced analytics, such as algorithmic differentiation, optimization,
regression, neural network, natural language processing, etc.
Service composition and deployment to multiple backends such as to
the browser, container, virtual machine, and other accelerators via a
computation graph.
Figure 1-1 The whole system can be divided into two subsystems. The subsystem
on the left deals with numerical computation, while the one on the right handles the
related tasks in a distributed and parallel computing context including
synchronization, scheduling, etc
In the rest of this chapter, we give a brief introduction about these
various components in Owl and set a road map for this book.
The larvae are remarkable for their colours and form. The anterior
segments are attenuated, but are capable of great retraction, so that in
repose (Fig. 190, A) this shape is concealed by the curious attitudes
that are assumed. There is in nearly all cases a conspicuous horn on
the eleventh segment, and the body at the extremity behind the horn is
so much modified that the terminal two segments look like little more
than a pair of large claspers. In the Choerocampini, the thoracic
segments are retractile, and can be withdrawn into the more or less
inflated fourth segment, and give the creature somewhat the
appearance of a miniature hooded snake. The larvae of Sphingidae do
not bear any conspicuous hairs—except during the first instar. They do
not spin cocoons, but bury themselves in the earth. The pupa is
remarkable from the deep cleft that exists to admit air to the first
spiracle, and for a deep depression on each side of the anterior part of
abdominal segments 5-7; in some cases the proboscis projects on the
breast somewhat like the handle of a pitcher.
A great deal has been written on the colours, markings, and attitudes of
Sphingid larvae, and many interesting facts have been brought to light.
We may refer the reader to the writings of Weismann[258] and Poulton,
[259] without, however, recommending him to place an implicit
confidence in their somewhat metaphysical disquisitions; for the views
there shadowed will necessarily became much modified with the
advance of exact knowledge. It is certain that the position assumed by
the same individual varies much according to age, and to the interval
since the last moult; sometimes the attitude is much more remarkable
than that shown in Figure 190, A, for the anterior segments are held
erect, as well as contracted, the front part of the body being curled, and
the Insect supported by the claspers and two pairs only of the
abdominal feet. There is, too, a considerable difference in colour before
and after an ecdysis. Piepers, who has had a long experience among
Sphingid larvae in Java, considers that much of what has been written
as to the protective value of their colours and attitudes, is mere fancy,
and wild generalisation.[260]
Fam. 10. Cocytiidae.—A single genus constitutes this family, and there
are only three or four species known; they come from the region of New
Guinea, whence the first was brought by D'Urville nearly a hundred
years ago. They are still amongst the rarest of Insects. Nothing is
known as to their life-histories. In appearance they somewhat remind
us of the Bee-hawk moths and Zygaenidae. Butler says[261] the family
is characterised by the palpi, which differ much in the two sexes, and by
the antennae resembling those of Castniidae or Hesperiidae. The form,
transparency, and coloration of the wings reminds one vividly of the
Sphingid genus Hemaris; the nervuration is somewhat like that of
Hemaris, but has certain features of Zygaenidae. Butler places the
family between Agaristidae and Zygaenidae.
The larvae are called basket-worms, and their baskets or cases are
well worthy of attention. Their variety is remarkable; the most
extraordinary are some of the genus Apterona Fig. 197, B, which
perfectly resemble the shells of Molluscs such as snails; indeed, the
specimens in the collection at the British Museum were sent there as
shells. This case is not, like those of other Psychidae, constructed of
earth or vegetable matter, but is of silk and is in texture and
appearance exactly like the surface of a shell. Psyche helix is,
according to Ingenitzky,[278] found in great numbers near Lake Issyk-
kul in Central Asia, where the larvae feed, in their snail-shell-like
cases, on a grass, just like snails. Only females could be reared from
these larvae. The case of Chalia hockingi (Fig. 197, C) consists of
little pieces of wood cut to the proper lengths, and spirally arranged,
so as to form a construction that would be quite a credit to our own
species. In some of the Canephorinae we meet with long cylindrical
cases, like those of Caddis-worms, or of Tineid larvae.