Data Parallel C++: Programming Accelerated Systems Using C++ and SYCL 2nd Edition James Reinders - Quickly download the ebook in PDF format for unlimited reading
Data Parallel C++: Programming Accelerated Systems Using C++ and SYCL 2nd Edition James Reinders - Quickly download the ebook in PDF format for unlimited reading
com
https://ebookmeta.com/product/data-parallel-c-programming-
accelerated-systems-using-c-and-sycl-2nd-edition-james-
reinders/
OR CLICK HERE
DOWLOAD EBOOK
https://ebookmeta.com/product/modern-parallel-programming-with-c-and-
assembly-language-daniel-kusswurm/
ebookmeta.com
https://ebookmeta.com/product/problem-solving-in-data-structures-
algorithms-using-c-2nd-edition-hemant-jain/
ebookmeta.com
https://ebookmeta.com/product/bane-high-heat-bbw-mountain-man-
instalove-1st-edition-kelsie-calloway-calloway-kelsie/
ebookmeta.com
Test-Driven Development with React: Apply Test-Driven
Development in Your Applications 1st Edition Qiu
https://ebookmeta.com/product/test-driven-development-with-react-
apply-test-driven-development-in-your-applications-1st-edition-qiu/
ebookmeta.com
https://ebookmeta.com/product/principles-of-general-organic-and-
biological-chemistry-11th-edition-janice-gorzynski-smith/
ebookmeta.com
https://ebookmeta.com/product/seemings-and-the-foundations-of-
justification-1st-edition-blake-mcallister/
ebookmeta.com
https://ebookmeta.com/product/designing-and-conducting-gender-sex-and-
health-research-1st-edition-john-l-oliffe-lorraine-greaves/
ebookmeta.com
Burning the Big House 4th Edition Terence Dooley
https://ebookmeta.com/product/burning-the-big-house-4th-edition-
terence-dooley/
ebookmeta.com
Data Parallel C++
Programming Accelerated Systems Using
C++ and SYCL
—
Second Edition
—
James Reinders
Ben Ashbaugh
James Brodman
Michael Kinsner
John Pennycook
Xinmin Tian
Foreword by Erik Lindahl, GROMACS and
Stockholm University
Data Parallel C++
Programming Accelerated
Systems Using C++ and SYCL
Second Edition
James Reinders
Ben Ashbaugh
James Brodman
Michael Kinsner
John Pennycook
Xinmin Tian
Foreword by Erik Lindahl, GROMACS and
Stockholm University
Data Parallel C++: Programming Accelerated Systems Using C++ and SYCL, Second Edition
James Reinders Michael Kinsner
Beaverton, OR, USA Halifax, NS, Canada
Ben Ashbaugh John Pennycook
Folsom, CA, USA San Jose, CA, USA
James Brodman Xinmin Tian
Marlborough, MA, USA Fremont, CA, USA
Preface����������������������������������������������������������������������������������������������xxi
Foreword������������������������������������������������������������������������������������������ xxv
Acknowledgments��������������������������������������������������������������������������� xxix
Chapter 1: Introduction������������������������������������������������������������������������1
Read the Book, Not the Spec��������������������������������������������������������������������������������2
SYCL 2020 and DPC++�����������������������������������������������������������������������������������������3
Why Not CUDA?�����������������������������������������������������������������������������������������������������4
Why Standard C++ with SYCL?����������������������������������������������������������������������������5
Getting a C++ Compiler with SYCL Support���������������������������������������������������������5
Hello, World! and a SYCL Program Dissection�������������������������������������������������������6
Queues and Actions����������������������������������������������������������������������������������������������7
It Is All About Parallelism��������������������������������������������������������������������������������������8
Throughput������������������������������������������������������������������������������������������������������8
Latency������������������������������������������������������������������������������������������������������������9
Think Parallel���������������������������������������������������������������������������������������������������9
Amdahl and Gustafson����������������������������������������������������������������������������������10
Scaling�����������������������������������������������������������������������������������������������������������11
Heterogeneous Systems��������������������������������������������������������������������������������11
Data-Parallel Programming���������������������������������������������������������������������������13
iii
Table of Contents
iv
Table of Contents
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
Data Management���������������������������������������������������������������������������������������������165
Initialization�������������������������������������������������������������������������������������������������165
Data Movement�������������������������������������������������������������������������������������������166
Queries��������������������������������������������������������������������������������������������������������������174
One More Thing�������������������������������������������������������������������������������������������������177
Summary����������������������������������������������������������������������������������������������������������178
Chapter 7: Buffers����������������������������������������������������������������������������179
Buffers��������������������������������������������������������������������������������������������������������������180
Buffer Creation��������������������������������������������������������������������������������������������181
What Can We Do with a Buffer?������������������������������������������������������������������188
Accessors����������������������������������������������������������������������������������������������������������189
Accessor Creation���������������������������������������������������������������������������������������192
What Can We Do with an Accessor?������������������������������������������������������������198
Summary����������������������������������������������������������������������������������������������������������199
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
xi
Table of Contents
xii
Table of Contents
GPU Hardware���������������������������������������������������������������������������������������������402
Beware the Cost of Offloading!��������������������������������������������������������������������403
GPU Kernel Best Practices��������������������������������������������������������������������������������405
Accessing Global Memory���������������������������������������������������������������������������405
Accessing Work-Group Local Memory���������������������������������������������������������409
Avoiding Local Memory Entirely with Sub-Groups��������������������������������������412
Optimizing Computation Using Small Data Types����������������������������������������412
Optimizing Math Functions��������������������������������������������������������������������������413
Specialized Functions and Extensions��������������������������������������������������������414
Summary����������������������������������������������������������������������������������������������������������414
For More Information�����������������������������������������������������������������������������������415
xiii
Table of Contents
xiv
Table of Contents
xv
Table of Contents
Summary����������������������������������������������������������������������������������������������������������556
For More Information�����������������������������������������������������������������������������������557
xvi
Table of Contents
Index�������������������������������������������������������������������������������������������������615
xvii
About the Authors
James Reinders is an Engineer at Intel Corporation with more than four
decades of experience in parallel computing and is an author/coauthor/
editor of more than ten technical books related to parallel programming.
James has a passion for system optimization and teaching. He has had the
great fortune to help make contributions to several of the world’s fastest
computers (#1 on the TOP500 list) as well as many other supercomputers
and software developer tools.
xix
About the Authors
xx
Preface
If you are new to parallel programming that is okay. If you have never
heard of SYCL or the DPC++ compilerthat is also okay
Compared with programming in CUDA, C++ with SYCL offers
portability beyond NVIDIA, and portability beyond GPUs, plus a tight
alignment to enhance modern C++ as it evolves too. C++ with SYCL offers
these advantages without sacrificing performance.
C++ with SYCL allows us to accelerate our applications by harnessing
the combined capabilities of CPUs, GPUs, FPGAs, and processing devices
of the future without being tied to any one vendor.
SYCL is an industry-driven Khronos Group standard adding
advanced support for data parallelism with C++ to exploit accelerated
(heterogeneous) systems. SYCL provides mechanisms for C++ compilers
that are highly synergistic with C++ and C++ build systems. DPC++ is an
open source compiler project based on LLVM that adds SYCL support.
All examples in this book should work with any C++ compiler supporting
SYCL 2020 including the DPC++ compiler.
If you are a C programmer who is not well versed in C++, you are in
good company. Several of the authors of this book happily share that
they picked up much of C++ by reading books that utilized C++ like this
one. With a little patience, this book should also be approachable by C
programmers with a desire to write modern C++ programs.
Second Edition
With the benefit of feedback from a growing community of SYCL users, we
have been able to add content to help learn SYCL better than ever.
xxi
Preface
This edition teaches C++ with SYCL 2020. The first edition preceded
the SYCL 2020 specification, which differed only slightly from what the
first edition taught (the most obvious changes for SYCL 2020 in this edition
are the header file location, the device selector syntax, and dropping an
explicit host device).
xxii
Preface
xxiii
Preface
xxiv
Foreword
SYCL 2020 is a milestone in parallel computing. For the first time we have
a modern, stable, feature-complete, and portable open standard that can
target all types of hardware, and the book you hold in your hand is the
premier resource to learn SYCL 2020.
Computer hardware development is driven by our needs to solve
larger and more complex problems, but those hardware advances are
largely useless unless programmers like you and me have languages that
allow us to implement our ideas and exploit the power available with
reasonable effort. There are numerous examples of amazing hardware,
and the first solutions to use them have often been proprietary since it
saves time not having to bother with committees agreeing on standards.
However, in the history of computing, they have eventually always ended
up as vendor lock-in—unable to compete with open standards that allow
developers to target any hardware and share code—because ultimately the
resources of the worldwide community and ecosystem are far greater than
any individual vendor, not to mention how open software standards drive
hardware competition.
Over the last few years, my team has had the tremendous privilege
of contributing to shaping the emerging SYCL ecosystem through our
development of GROMACS, one of the world’s most widely used scientific
HPC codes. We need our code to run on every supercomputer in the
world as well as our laptops. While we cannot afford to lose performance,
we also depend on being part of a larger community where other teams
invest effort in libraries we depend on, where there are open compilers
available, and where we can recruit talent. Since the first edition of this
book, SYCL has matured into such a community; in addition to several
xxv
Foreword
1
Community-driven implementation from Heidelberg University: tinyurl.com/
HeidelbergSYCL
2
DPC++ compiler project: github.com/intel/llvm
3
GROMACS: gitlab.com/gromacs/gromacs/
xxvi
Foreword
xxvii
Foreword
Erik Lindahl
Professor of Biophysics
Dept. Biophysics & Biochemistry
Science for Life Laboratory
Stockholm University
xxviii
Acknowledgments
We have been blessed with an outpouring of community input for this
second edition of our book. Much inspiration came from interactions with
developers as they use SYCL in production, classes, tutorials, workshops,
conferences, and hackathons. SYCL deployments that include NVIDIA
hardware, in particular, have helped us enhance the inclusiveness and
practical tips in our teaching of SYCL in this second edition.
The SYCL community has grown a great deal—and consists of
engineers implementing compilers and tools, and a much larger group of
users that adopt SYCL to target hardware of many types and vendors. We
are grateful for their hard work, and shared insights.
We thank the Khronos SYCL Working Group that has worked diligently
to produce a highly functional specification. In particular, Ronan Keryell
has been the SYCL specification editor and a longtime vocal advocate
for SYCL.
We are in debt to the numerous people who gave us feedback from
the SYCL community in all these ways. We are also deeply grateful for
those who helped with the first edition a few years ago, many of whom we
named in the acknowledgement of that edition.
The first edition received feedback via GitHub,1 which we did review
but we were not always prompt in acknowledging (imagine six coauthors
all thinking “you did that, right?”). We did benefit a great deal from that
feedback, and we believe we have addressed all the feedback in the
samples and text for this edition. Jay Norwood was the most prolific at
commenting and helping us—a big thank you to Jay from all the authors!
1
github.com/apress/data-parallel-CPP
xxix
Acknowledgments
xxx
CHAPTER 1
Introduction
We have undeniably entered the age of accelerated computing. In order to
satisfy the world’s insatiable appetite for more computation, accelerated
computing drives complex simulations, AI, and much more by providing
greater performance and improved power efficiency when compared with
earlier solutions.
Heralded as a “New Golden Age for Computer Architecture,”1 we are
faced with enormous opportunity through a rich diversity in compute
devices. We need portable software development capabilities that are
not tied to any single vendor or architecture in order to realize the full
potential for accelerated computing.
SYCL (pronounced sickle) is an industry-driven Khronos Group
standard adding advanced support for data parallelism with C++ to
support accelerated (heterogeneous) systems. SYCL provides mechanisms
for C++ compilers to exploit accelerated (heterogeneous) systems in a way
that is highly synergistic with modern C++ and C++ build systems. SYCL is
not an acronym; SYCL is simply a name.
1
A New Golden Age for Computer Architecture by John L. Hennessy, David
A. Patterson; Communications of the ACM, February 2019, Vol. 62 No. 2,
Pages 48-60.
Data parallelism in C++ with SYCL provides access to all the compute
devices in a modern accelerated (heterogeneous) system. A single C++
application can use any combination of devices—including GPUs, CPUs,
FPGAs, and application-specific integrated circuits (ASICs)—that are
suitable to the problems at hand. No proprietary, single-vendor, solution
can offer us the same level of flexibility.
This book teaches us how to harness accelerated computing using
data-parallel programming using C++ with SYCL and provides practical
advice for balancing application performance, portability across compute
devices, and our own productivity as programmers. This chapter lays
the foundation by covering core concepts, including terminology, which
are critical to have fresh in our minds as we learn how to accelerate C++
programs using data parallelism.
2
Chapter 1 Introduction
3
Chapter 1 Introduction
4
Chapter 1 Introduction
5
Chapter 1 Introduction
debuggers, and other tools, known as the oneAPI project. The oneAPI
tools, including the DPC++ compiler, are freely available (www.oneapi.io/
implementations).
1. #include <iostream>
2. #include <sycl/sycl.hpp>
3. using namespace sycl;
4.
5. const std::string secret{
6. "Ifmmp-!xpsme\"\012J(n!tpssz-!Ebwf/!"
7. "J(n!bgsbje!J!dbo(u!ep!uibu/!.!IBM\01"};
8.
9. const auto sz = secret.size();
10.
11. int main() {
12. queue q;
13.
14. char* result = malloc_shared<char>(sz, q);
15. std::memcpy(result, secret.data(), sz);
16.
17. q.parallel_for(sz, [=](auto& i) {
18. result[i] -= 1;
19. }).wait();
20.
21. std::cout << result << "\n";
22. free(result, q);
23. return 0;
24. }
6
Chapter 1 Introduction
Line 18 is the kernel code that we want to run on devices. That kernel
code decrements a single character. With the power of parallel_for(),
that kernel is run on each character in our secret string in order to decode
it into the result string. There is no ordering of the work required, and it is
run asynchronously relative to the main program once the parallel_for
queues the work. It is critical that there is a wait (line 19) before looking at
the result to be sure that the kernel has completed, since in this example
we are using a convenient feature (Unified Shared Memory, Chapter 6).
Without the wait, the output may occur before all the characters have been
decrypted. There is more to discuss, but that is the job of later chapters.
7
Chapter 1 Introduction
Throughput
Increasing throughput of a program comes when we get more work done
in a set amount of time. Techniques like pipelining may stretch out the
time necessary to get a single work-item done, to allow overlapping of
8
Chapter 1 Introduction
Latency
What if we want to get one thing done faster—for instance, analyzing
a voice command and formulating a response? If we only cared about
throughput, the response time might grow to be unbearable. The concept
of latency reduction requires that we break up an item of work into
pieces that can be tackled in parallel. For throughput, image processing
might assign whole images to different processing units—in this case,
our goal may be optimizing for images per second. For latency, image
processing might assign each pixel within an image to different processing
cores—in this case, our goal may be maximizing pixels per second from a
single image.
Think Parallel
Successful parallel programmers use both techniques in their
programming. This is the beginning of our quest to Think Parallel.
We want to adjust our minds to think first about where parallelism
can be found in our algorithms and applications. We also think about how
different ways of expressing the parallelism affect the performance we
ultimately achieve. That is a lot to take in all at once. The quest to Think
Parallel becomes a lifelong journey for parallel programmers. We can learn
a few tips here.
9
Chapter 1 Introduction
10
Exploring the Variety of Random
Documents with Different Content
Christian. Body and soul he is given over to reprobation; and we
have no need to go out of our way to shelter him in any degree from
the laws of his own heretic land: a land which for centuries has
given the true faith up to persecution and injustice of every kind. Let
him take his chance. I ask you to do nothing more. The evidence is
very strong against him. No other person was seen near this
unfortunate young man. But a very short time could have elapsed
after they were remarked together, apparently in high dispute,
before this fatal occurrence took place. Other evidence may appear,
and he may be proved guilty or innocent; but, at all events, he must
be tried, and the time of that trial may be yet remote. The first cases
that will be taken will certainly be those connected with these riots,
and the only direct witness against you will be then in jail."
"Perhaps he may not return at all," said Sir Arthur. "It is more
than probable that, on foot and unarmed, he has been apprehended
as one of the rioters, but we can send, at all events." And ringing
the bell sharply, he gave the necessary orders.
"We will find a way," replied Filmer; "but that can be discussed to-
morrow. I must now go out to console some of my little flock who
are suffering from affliction. In the mean time you must manage this
examination. The witnesses are the old man at the lodge, your
butler, the head footman, Brown, and the fishermen who are now
waiting in the servants' hall."
CHAPTER XVIII.
The next moment the latch was lifted, the door opened, and Mr.
Filmer walked in. The labourer instantly rose and placed a wooden
chair for his pastor by the side of the fire, saying, "Good night, your
reverence! It's mighty cold this afternoon."
"I don't find it so," answered Filmer; "but I dare say you do,
sitting all alone here, with but a little spark like that. I was afraid you
would get tired of waiting, and go to bed. I am much obliged to you
for sitting up as I told you."
"No, Dan," answered the priest; "but I'll tell you what you must
do, you must say a word or two to serve him." And Filmer fixed his
eyes keenly upon the man's face, which brightened up in a moment
with a very shrewd and merry smile, as he replied, "That I'll do with
all my heart, your reverence. It's but the telling me what to say and
I'll say it."
"Ay! I suppose so," said Connor; "but they shan't get anything out
of me there, I can answer for it. I can be as blind as a mole when I
like, and as deaf too."
"But you must be somewhat more, Dan," was the priest's reply.
"You see, if suspicion fixes to no one, and the jury bring in a verdict
of wilful murder against some person or persons unknown, the
magistrates will never leave inquiring into the matter till they fix it
upon your poor master. What we must do must be to turn the first
suspicions upon some one else, so as to keep Mr. Clive free of them
altogether, and then he will be safe enough."
"Oh, no! the blessed saints forbid!" exclaimed Connor, eagerly. "I
don't doubt a word of it; I am quite sure your reverence is right; I
was only just asking you, like!"
"Oh! if that's all," answered Mr. Filmer, "and you are not beginning
to feel scandalous doubts from living so long amongst a number of
heretics all about, I will answer your question plainly. It is not at all
like murder, nor will there be any sin in it. The person who is likely to
be suspected will be able easily to clear himself in the end; so that
he runs no risk of anything but a short imprisonment, which may
perhaps turn to the good of his soul, for I shall not fail to visit him,
and show him the way to the true light. But in the mean time, Mr.
Clive will be saved from all danger; and if you look at the matter as
a true son of the church, you will see that there is no choice
between a believer like Mr. Clive and an obstinate heretic and
unbeliever like this other man."
"So you can state," continued the priest; "but take care not to
enter too much into detail. Say you saw him but indistinctly."
"Oh, no! that shall never be," answered Connor, "if my word can
stop it; and so, father," he continued, with a shrewd look, "I suppose
that the best thing I can do is, if I am asked any questions, to say
that I didn't rightly see the gentleman that did it; but that he looked
like a real gentleman, and may be about the height of this Mr.
Dudley. I saw him twice at the farmhouse, and if he is in the room, I
can point him out as being about the tallness of the man I saw; and
that's not a lie either, for they are much alike, in length at least.
Neither one. nor the other stands much under six feet. I'd better not
swear to him, however, for that would be bad work."
"Oh! but I'll do that, certainly," replied Connor, eagerly; and yet a
shade of doubt seemed to hang upon him, for he added, the
moment after, "But you know, your reverence, that when they swear
me they will make me swear to tell the whole truth, and if I do not
say that I know it was Mr. Clive, it will be false swearing."
"Heed not that," answered Filmer, with a frown. "Have I not told
you that I will absolve you, and do absolve you? Besides, how can
you swear to that which you only believe, but do not exactly know.
You told me this evening, up at the hall, that you did not see your
master's face when he struck the blow."
"Ah! but I saw his face well enough when he was going up,"
replied the labourer.
"That does not prove that he was the same who did the deed,"
said Filmer. "Another might have suddenly come there, without your
perceiving how."
"He was mighty like the master, any how," said the man, in a low
tone; "but I'll say just what your reverence bids me."
"Do so," answered Filmer, turning to leave the cottage; "the
church speaks by my voice, and accursed be all who disobey her!"
CHAPTER XIX.
Father Peter turned away to the right, and walked on; for he had
yet work to do, and a somewhat different part to play before the
night was done. The versatility of the genius of the Roman church is
one of its most dangerous qualities. The principle that the end
justifies the means, makes it seem right to those who hold such a
doctrine, to 'be all things to all men,' in a very different sense from
that of the apostle. Five minutes brought Mr. Filmer to the door of
the Grange, and he looked over that side of the house for a light,
but in vain. One of the large dogs came and fawned upon him, and
all the rest were silent; for it is wonderful how soon and easily he
accustomed all creatures to his influence. His slow, quiet, yet firm
footfall was known amongst those animals as well as their master's
or Edgar Adelon's, and at two or three hundred yards they had
recognised it.
"I am glad to hear it, my son," replied Filmer, "for I want to speak
a few words with you both." Thus saying, he walked on before Mr.
Clive into the room where Helen Clive usually sat. He found her with
her eyes no longer tearful, but red with weeping; and seating
himself with a kindly manner beside her, he said, "Grieve not, my
dear child, whatever has happened. There is consolation for all who
believe."
"But you know not yet, father, what has happened," answered
Helen, with a glance at her father: "you will know soon, however."
"I do know what has happened, Helen," said the priest; "though
not all the particulars; and I have come down at once to give you
comfort and advice. Tell me, my son, how did this sad event occur?"
The priest turned his eyes to Helen, who immediately took up the
tale which her father was unwilling to tell. "I believe I am myself to
blame," she said, in a low, sweet tone; "though God knows I
thought not of what would follow when I went out. But I must tell
you why I did so. My father and I had been talking all the evening of
the wild and troubled state of the country, and of what was likely to
take place at Barhampton tonight."
"It has taken place," replied Father Filmer; "the magistrates were
prepared for the rioters; the troops have been in amongst the
people, and many a precious life has been lost."
"It was what we feared," continued Helen, sadly. "Alas! that men
will do such wild and lawless things. But about that very tumult my
father was anxious and uneasy, and towards half-past six he went
out to see if he could meet my uncle Norries as he went, and at all
events to look out from the top of the downs towards Barhampton.
He promised me that he would on no account go farther than the
old wall, and that he would be back in half an hour. But more than
an hour passed, and I grew frightened, till at last I sent up Daniel
Conner to see if he could find my father. He seemed long, though
perhaps he was not, and I then resolved to go myself. I had no fear
at all; for I had never heard of Lord Hadley being out at night, and I
thought he would be at the dinner-table, and I quite safe--safer,
indeed, than in the day. I was only anxious for my father, and for
him I was very anxious. However, I walked on fast, and soon came
to the downs, but I could see no one, and taking the slanting path
up the slope, I came just to the edge of the cliff, and looked out
over the sea to Barhampton Head. There was nothing to be seen
there, and only a light in a ship at sea. That made me more
frightened than ever, for I had felt sure that I should find my father
there; and thinking that he might have sat down somewhere to wait,
I called him aloud, to beg he would come home. There was no
answer, but I heard a step coming up the path which runs between
the two slopes, and then goes down over the lower broken part of
the cliff to the sea-shore; and feeling sure that it was either my
father, or Connor, or one of the boatmen, who would not have hurt
me for the world, I was just turning to go down that way when Lord
Hadley sprang up the bank, and caught hold of me by the hand. I
besought him to let me go, and then I was very frightened indeed,
so that I hardly knew, or know, what I said or did. All I am sure of is
that he tried to persuade me to go away with him to France; and he
told me there was a ship for that country out there at sea, and its
boat with the boatmen down upon the shore, for he had spoken to
them in the morning. He said a great deal that I forget, telling me
that he would marry me as soon as we arrived in France; but I was
very angry--too angry, indeed--and what I said in reply seemed to
make him quite furious, for he swore that I should go, with a terrible
oath. I tried to get away, but he kept hold of my hand, and threw his
other arm round me, and was dragging me away down the path
towards the sea-shore, when suddenly my father came up and
struck him. I had not been able to resist much, on account of my
broken arm, but the moment my father came up he let me go, and
returned the blow he had received. We were then close upon the
edge of the cliff, and there is, if you recollect, a low railing, where
the path begins to descend. My father struck him again and again,
and at last he fell back against the railing, which broke, I think,
under his weight, and oh! father, I saw him fall headlong over the
cliff. I thought I should have died at that moment, and before I
recovered myself my father had taken me by the hand and was
leading me away. When we had got a hundred yards or two, I
stopped, and asked if it would not be better to go or send down to
the sea-shore, to see if some help could not be rendered to him. My
father said he had heard the boatmen come to assist him, and that
was enough."
Clive had covered his eyes with his hand while Helen spoke; but
at her last words he looked up, saying, in a stern tone, "Quite
enough! He well deserved what he has met with. I did not intend it,
it is true; but whether he be dead or living, he has only had the
chastisement he merited. I had heard but an hour or two before all
his base conduct to this dear child--I had heard that he had
outraged, insulted, persecuted her; and although I had promised
Norries not to kill him, yet I had resolved, the first time I met with
him, to flay him alive with my horsewhip. I found him again insulting
her; and can any man say I did wrong to punish the base villain on
the spot? I regret it not; I would do it again, be the consequences
what they may; and so I will tell judge and jury whenever I am
called upon to speak."
"I trust that may never be, my son," replied the priest, looking at
him with an expression of melancholy interest; "and I doubt not at
all that, if you follow the advice which I will give you, suspicion will
never even attach to you."
"None in the eye of the law," replied Mr. Filmer, gravely; "but it
may make much in the ear of a jury. I know these things well, Clive;
and depend upon it, that if this matter should come before a court
of justice at the present time, especially when such wild acts have
been committed by the people, you are lost. In the first place, you
cannot prove the very defence you make----"
"Why, my child was there, and saw it all!" cried Clive, interrupting
him.
"Her evidence would go for very little," answered the priest; "and
as I know you would not deny having done it, your own candour
would ruin you. The best view that a jury would take of your case,
even supposing them not to be worked upon by the rank of the dead
man, could only produce a verdict of manslaughter, which would
send you for life to a penal colony, to labour like a slave, perhaps in
chains."
"Assuredly," replied Mr. Filmer. "But why should you run the risk of
either? I tell you, if you will follow my advice, you shall pass without
suspicion." But Clive waved his hand almost impatiently, saying,
"Impossible, father, impossible! I am not a man who can set a guard
upon his lips; and I should say things from time to time which would
soon lead men to see and know who it was that did it. I could not
converse with any of my neighbours here without betraying myself."
"Then you must go away for a time," answered Filmer. "That was
the very advice I was going to give you. If you act with decision, and
leave the country for a short time, I will be answerable for your
remaining free from even a doubt."
"The very way to bring doubt upon myself," answered Clive, with
a short, bitter laugh. "Would not every one ask why Clive ran away?"
"The answer would then be simple," said the priest, "namely, that
he went, probably, because he had engaged with his brother-in-law,
Norries, in these rash schemes against the government which have
been so signally frustrated this night at Barhampton."
"With this difference," continued Mr. Filmer, "that the one will be
soon and easily pardoned, the other never; that for the one you
cannot be pursued into another land, that for the other you would
be pursued and taken; that the one brings no disgrace upon your
name, that the other blasts you as a felon, leaves a stain upon your
child, deprives her of a parent, ruins her happiness for ever."
"Oh fly, father, fly!" cried Helen. "Save yourself from such a
horrible fate!"
"Of course," said the priest. "You cannot, and you must not go
alone. Take Helen with you, and be sure that her devotion towards
you will but increase and strengthen that strong affection which she
has inspired in one worthy of her, and of whom she is worthy. I have
promised you, Clive, or rather I should say, I have assured you, that
your daughter shall be the wife of him she loves, ay, with his father's
full consent. If you follow my advice, it shall be so; but do not
suppose that Sir Arthur would ever suffer his son to marry the
daughter of a convict. As it is, he knows that your blood is as good
as his own, and that the only real difference is in fortune; but with a
tainted name the case would be very different. There would be an
insurmountable bar against their union, and you would make her
whole life wretched, as well as cast away your own happiness for
ever."
"But how can I fly?" asked Clive. "The whole thing will be known
to-morrow, and ere I reached London I should be pursued and
taken."
"Even so," rejoined the priest; "she will sail in a few hours. You
have nothing to do but send down what things you need as fast as
possible, get one of the boats to row you out, embark, and you are
safe. I will give you letters to a friend in Brittany, who will show you
all kindness, and you can remain there at peace till I tell you that
you may safely return."
"Undoubtedly they will," rejoined Mr. Filmer; "and I will take care
to give suspicion that direction. Be quick, Helen: but do you not
need some one to aid you."
"I will get the girl Margaret," said Helen Clive, "for I am very
helpless." And closing the door, she departed.
"Not so, not so," answered Mr. Filmer, cheerfully. "I will see that it
is well attended to; and though, perhaps, something may go wrong,
against which nothing but the owner's eye can secure, yet nothing
like ruin shall take place. And now, hasten away, Clive, and make
your own preparations. No time is to be lost; for if the people on
board the ship learn that the attack upon Barhampton has failed,
they may perhaps put to sea sooner than the hour they had
appointed. I will write the letter while you are getting ready, and I
will go down with you to the beach, and see you off."
"That is Edgar's foot," said Helen, hanging back. "Oh, let me wait,
and bid him adieu! I know it is Edgar's foot!"
"The ear of love is quick," said Mr. Filmer. "I did not recognise it;"
and in another moment Edgar Adelon stood beside them.
"I have been to the house," he said, "and they told me where to
seek you."
"We are forced to go away for a time by some unpleasant
circumstances, Mr. Adelon," said Clive, gravely.
"I know--I know it all," answered Edgar, quickly. "I watched the
whole attack from the hill. It was a strange, ghastly sight, and I will
not stop you, Mr. Clive, for it would be ruin to stay; but let me speak
one word to dear Helen--but one word, and I will not keep you."
"I must go back to the Grange for my horse," said Edgar, as the
priest was turning along the high road towards Brandon.
"Better send for it," said Mr. Filmer. "Your father has returned, and
may inquire for you."
"It is strange," said Edgar, following him. "I could have sworn I
saw his tall bay hunter among the people at Barhampton."
CHAPTER XX.
"Come, come, master, that won't do," said the dull brute into
whose hands he had fallen. "You know all about it, I dare say. You
must march into that 'ere room till to-morrow morning, for there's no
use in taking you twenty miles to the jail, to bring you back again
tomorrow to the crowner's 'quest."
It was with great difficulty that Dudley restrained his temper. The
charge at first sight seemed to him ridiculous, and he would have
scoffed at it, if horror at the fate of his unhappy pupil had not
occupied his mind so completely that no light thought could find
place.
"I ask you civilly, sir," he said, moving into the room pointed out,
closely followed by the constables, "to give me some information in
regard to facts which I must know to-morrow morning, and in which
I am deeply interested. If you are so discourteous as to refuse me
an answer, I cannot force you; but at the same time I suppose there
is nobody on earth but yourself who would think of denying me
some information respecting a friend who, I gather from your
warrant, has been killed."
"Very like a friend to pitch him over the cliff!" answered the
constable. "Howsumdever, the magistrates know all about it, and
you had better wait and talk to them, for if you talk more to me I
shall send down for the handcuffs: a fool I was for not bringing them
with me. We shall sit up with ye by turns, for I am not going to let
ye get off, master, you may depend upon it."
The body and the mind are alternately slaves to each other. When
stimulated to strong exertion, the mind conquers the body; when
oppressed with fatigue or sickness, the body conquers the mind; but
the powers of both seem sometimes worn out together, and then
sleep is the only resource: that heavy, overpowering sleep, the
temporary death of all the faculties; when no memory of the past,
no knowledge of the present, no expectation of the future, comes in
dreams to rouse even fancy from the benumbing influence that
overshadows us. Such was the case with Dudley at the end of those
two hours. He had gone out early in the morning in the pursuit of
healthful exercise; but in the course of his ramble with Edgar
Adelon, subjects had arisen which moved him deeply. His young
companion, with all the warm enthusiasm and confidence of his
nature, had poured forth to him all the stores of grief, anxiety, and
indignation, which had been accumulating in silence and in secret
since first he had become aware of Lord Hadley's pursuit of Helen;
and Dudley, entering warmly into his feelings, had chosen his course
at once. He had determined to speak decidedly to his pupil; to place
before his eyes the scandal and the wickedness of that which he was
engaged in; to demand that it should either cease at once, or he
quit Brandon; and in case he refused, to resign all farther control
over him, and instantly to make the young peer's relations in London
aware of the fact and the cause. Then had come the fierce and
angry discussion with Lord Hadley, followed by an agitating
conversation with Eda; another dispute with his pupil, perhaps more
painful than the first; the hurried and anxious walk to Barhampton,
and the troubled scene which had taken place there. He was
exhausted, mentally and corporeally; and at the end of two hours he
slept, leaning his head upon his folded arms, and remaining so still
and silent, that it seemed as if death rather than slumber possessed
him. His sleep lasted long, too, and he was aroused only by some
one shaking him roughly by the shoulder on the following morning.
Dudley started up, and wondered where he was; but gradually a
recollection of all the facts returned; and the man's words: "Come,
master, the crowner is sitting," required no explanation.
"I thank you for your caution, sir," replied Dudley; "although,
having been bred to the bar, it was not so necessary in my case as it
might be in some. I have no knowledge of the circumstances which
have caused any suspicion to fall upon me, and shall hear with
interest the evidence which may be given regarding facts that I am
utterly unacquainted with."
"Ahem!" said the coroner. "We will now hear the witnesses in the
natural order, gentlemen of the jury. By the natural order, I mean the
order in which the facts connected with the discovery happened. Our
first question will be, where and how the body was found; next,
whose the body is--for you will remark, gentlemen of the jury, that
at the present moment all we know is, that the body of a dead man
has been found under exceedingly suspicious circumstances, and we
must have it identified; then we must inquire how he came by his
death. If the person who first found the corpse is in court, let him
stand forward."
"Lord bless you, no, sir!" replied the boatman; "but the night was
not very dark, for that matter. However, as I turned, I heard a bit of
a row at the top of the cliff, and I could see two men standing up
there close together, one a tall man, t'other a little shorter; and the
tall one hit the other twice or three times, and then down he came. I
could see him fall back, but after that I lost him, for you see, sir, as
he tumbled down the cliff, it was darker there. When they were a-
top, they had got the sky behind them; but when he fell, he got into
the gloom, and I saw no more of him, till hearing a cry almost like
that of a gull, only louder, I ran up as hard as I could. As I came
over the shingle near the cliff, I heard a groan or two, and just