GPGPU Programming for Games and Science 1st Edition Eberly pdf download
GPGPU Programming for Games and Science 1st Edition Eberly pdf download
https://ebookmeta.com/product/gpgpu-programming-for-games-and-
science-1st-edition-eberly/
and Science
processing unit (CPU). It discusses many concepts of general purpose GPU
(GPGPU) programming and presents several practical examples in game program-
ming and scientific programming.
The author first describes numerical issues that arise when computing with
floating-point arithmetic, including making trade-offs among robustness, accuracy,
and speed. He then shows how single instruction multiple data (SIMD) extensions
work on CPUs. The core of the book focuses on the GPU from the perspective of
Direct3D 11 (D3D11) and the High Level Shading Language (HLSL). The book goes
on to explore practical matters of programming a GPU and discusses vector and
matrix algebra, rotations and quaternions, and coordinate systems. The final
chapter gives several sample GPGPU applications on relatively advanced topics.
Features
K20720
ISBN: 978-1-4665-9535-4
90000
9 781466 595354
David H. Eberly
GPGPU
Programming
for Games
and Science
GPGPU
Programming
for Games
and Science
David H. Eberly
G e o m e t r i c To o l s L L C , R e d m o n d , Wa s h i n g t o n , U S A
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but
the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to
trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained.
If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical,
or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without
written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright
Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a
variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to
infringe.
List of Tables xv
Listings xvii
Preface xxv
Trademarks xxvii
1 Introduction 1
2 CPU Computing 5
2.1 Numerical Computing . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1 The Curse: An Example from Games . . . . . . . . . . 5
2.1.2 The Curse: An Example from Science . . . . . . . . . 10
2.1.3 The Need to Understand Floating-Point Systems . . . 11
2.2 Balancing Robustness, Accuracy, and Speed . . . . . . . . . 14
2.2.1 Robustness . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.1.1 Formal Definitions . . . . . . . . . . . . . . . 14
2.2.1.2 Algorithms and Implementations . . . . . . . 16
2.2.1.3 Practical Definitions . . . . . . . . . . . . . . 17
2.2.2 Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2.3 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.4 Computer Science Is a Study of Trade-offs . . . . . . . 20
2.3 IEEE Floating Point Standard . . . . . . . . . . . . . . . . . 22
2.4 Binary Scientific Notation . . . . . . . . . . . . . . . . . . . . 23
2.4.1 Conversion from Rational to Binary Scientific Numbers 24
2.4.2 Arithmetic Properties of Binary Scientific Numbers . . 27
2.4.2.1 Addition of Binary Scientific Numbers . . . . 28
2.4.2.2 Subtraction of Binary Scientific Numbers . . 28
2.4.2.3 Multiplication of Binary Scientific Numbers . 28
2.4.2.4 Division of Binary Scientific Numbers . . . . 29
2.4.3 Algebraic Properties of Binary Scientific Numbers . . 30
2.5 Floating-Point Arithmetic . . . . . . . . . . . . . . . . . . . . 31
2.5.1 Binary Encodings . . . . . . . . . . . . . . . . . . . . 32
2.5.1.1 8-bit Floating-Point Numbers . . . . . . . . . 33
v
vi Contents
3 SIMD Computing 93
3.1 Intel Streaming SIMD Extensions . . . . . . . . . . . . . . . 93
3.1.1 Shuffling Components . . . . . . . . . . . . . . . . . . 94
3.1.2 Single-Component versus All-Component Access . . . 95
3.1.3 Load and Store Instructions . . . . . . . . . . . . . . . 95
3.1.4 Logical Instructions . . . . . . . . . . . . . . . . . . . 98
3.1.5 Comparison Instructions . . . . . . . . . . . . . . . . . 99
3.1.6 Arithmetic Instructions . . . . . . . . . . . . . . . . . 100
3.1.7 Matrix Multiplication and Transpose . . . . . . . . . . 100
3.1.8 IEEE Floating-Point Support . . . . . . . . . . . . . . 103
3.1.9 Keep the Pipeline Running . . . . . . . . . . . . . . . 103
3.1.10 Flattening of Branches . . . . . . . . . . . . . . . . . . 104
3.2 SIMD Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . 106
3.3 Function Approximations . . . . . . . . . . . . . . . . . . . . 107
3.3.1 Minimax Approximations . . . . . . . . . . . . . . . . 107
3.3.2 Inverse Square Root Function Using Root Finding . . 110
3.3.3 Square Root Function . . . . . . . . . . . . . . . . . . 111
3.3.4 Inverse Square Root Using a Minimax Algorithm . . . 114
Contents vii
Bibliography 429
Index 435
List of Figures
xiii
xiv List of Figures
"Sir Colvin wouldn't have suspected me," she added. "He knows no
more about a woman than ... than you do.
"I suppose that leaves him without much knowledge to boast of?" he
reflected.
She tilted her head sideways to see, beyond her knee, on what his eyes
were fixed. She tossed her foot clear of the muslin flounces, and then with a
curious twist of the ankle brought it round into her view.
"How should I know?" he said thoughtfully. "It wasn't made for me."
"Really," she said, "for a man who says so little, you do say the strangest
things."
His eyes had wandered again to the square of open air, the picture in
azure and ochre and emerald which the window made in the wall. The
brown woman still sat swinging her bead in the shade of the chenar.
Terrington could see its glassy blueness as it dipped to and fro across a
splinter of sunlight.
Rose Chantry, with her eyes on his profile, asked him at what he was
looking.
He told her.
"I know!" she exclaimed. "Why is she always doing that?"
"Another then."
His eyes came round to her, and she felt a coldness in them like the
green gleam of ice.
"Out here, you see," he said quietly, "women are still as fond of making
men as of making fools of them."
The blaze of anger seemed to fill her eyes with a floating sparkle of fresh
colours, and her lips closed tightly, as though to repress a desire to bite him.
Then she met his glance and laughed.
"Oh, well!" she sighed, "why don't you dislike me, then; since you seem
too? You wish I wasn't here!"
"No!" she cried. "You weren't thinking of that; you know you weren't.
You believe that would have happened anyhow. It was what you meant
about making fools of men."
"Ah!" she sighed, "but you don't think so. I daresay you think something
much more horrid of me than you care to say. And it ought to have been
rather nice for you all, having me up here."
She looked at him doubtfully, crumpling her lips together in her fingers.
She regarded him for a moment in the light of the remark, before adding:
"You told me, the first time you saw me, I must give up riding."
"Yes," he admitted, smiling; "that was one of them. But I found that your
riding could be of use to us."
She was sitting upright now; her hands set upon the chair-arms; her face
changing stormily between anger and astonishment.
"You were sure I was in danger, yet you did nothing to prevent it!" she
cried. "Do you mean that?"
"I don't know. I can't say. That's got nothing to do with it. Or you could
have given me an escort."
"That would have made you no safer, and would have spoilt you as an
advertisement."
"As an advertisement!" she protested hotly. "Do soldiers let a woman run
the risk of being murdered to make things safe far them? I think it's
contemptible!"
"Yes," he said quietly; "so I see: but you don't think enough."
He sat looking at her in a way she detested; as no other man seemed able
to look at her; as though she were a piece in a game he played.
"Did any one else know it wasn't safe for me?" she demanded.
"I think so too," he said. "Nothing in Sar would have been weighed
beside it."
"Except by me," he said. "You see I'm here to weigh things. I'm here to
look after you all. You think I should have told you of your danger, and shut
you up in the safety of Sar. But there is no safety in Sar. That's the mistake.
Your riding was a risk, but it helped our chance to make Sar safer; safer for
every one, safer for you."
"Well," he said, "you can fancy what I should have paid for it. But the
safety would have been there, though it was only there for others. And it
was to make that that I am here."
She met his musing observation of her with hard clear eyes.
He took the deep breath of a man whose heart is sick for sleep, and
threw back his shoulders.
The entire force was under arms; the Residency guard was trebled;
sappers were stationed in every room to break open the loopholes; others
waited with discs of guncotton to blow away the trees which masked the
polo ground; and the final connexions were made with the mine which was
to overthrow the courtyard wall.
Terrington, who had changed for polo, also made a peacefully indifferent
figure as he strolled across to the mess-room and round the Residency
garden, with a loose coat drawn over his riding-shirt, whose blue and silver
showed in the scarf about his throat.
Hussain Shah was holding Langford, mortally hurt, in the saddle, his
huge figure swinging limply to and fro, and more than half that remnant of
the escort reeled as they drew rein before the Residency door.
Terrington was not the first to hear of the disaster, but he heard it in the
most dramatic fashion; from Mrs. Chantry's lips.
She had torn across the compound as the Lancers came to a blundering
halt before the mess-room entrance, and dashed breathless into the orderly
room, waiting no confirmation of the story that was told by their plight.
She caught at her side, clutching with the other hand at the table, and for
an instant panted, speechless, her face white as jasmine, above a big bow of
creamy lace.
"Lewis and Sir Colvin," she panted, "and ... and most of the others. All
but six or seven of them. Mr. Langford's there, but he's simply hacked; and
all the men are streaming."
A long thin wail broke from her with the horror of what she had seen,
and she covered her eyes with both her hands.
"What are you going to do?" she demanded. "You let them go like that,
you made them go like that! That's what's done it all! You wouldn't let them
take the men! Aren't you going to try to save them? They mayn't be dead!
Don't you think they mayn't be dead? If only you'll go at once; this moment!
Take every one and smash them. Don't you think it's possible; just possible?
And it wasn't I who did it, was it? was it really?"
"Sir Colvin and Chantry have been murdered at the Durbar, and all the
men they took in with them."
Walcot nodded.
"Tell Subadar Afzul Singh," he said slowly, "to post the Fort guard,
break out the loopholes and put the place at once in a state of defence. You
will parade every other available man in the courtyard within half an hour,
in marching order a hundred and fifty rounds a man. Dore will take over
Langford's Sikhs and Dogras; the Bakót levies will reinforce the Fort guard.
Send Risaldar Hussain Shah to me here."
Walcot felt it too. He was the elder of the two men, and but a few months
junior in the service; they had lived together for some time on terms of
perfect equality, yet now, though Terrington had made no reference to a
change in their relations, Walcot's heels came together while the other was
speaking, and his hand went to his cap with a "Very good, sir" as Nevile
ended.
"Are you going to take over the command?" she said to Terrington, who
had seated himself at his desk and was writing rapidly.
He turned his head and looked at her, his mind evidently occupied with
an interrupted thought.
"I have taken it over," he said quietly, turning again to his pen.
She watched him for a moment. His silence, his unconcern, his power,
were all alike beyond her.
"You will save them, won't you, if you can?" she went on imploringly, to
force the subject into his mind.
"Yes," he said slowly, "I'm going to the Palace." Then after a pause, but
with his eyes still upon her, "Mr. Clones would probably be very glad of
some help with the wounded."
Something scornful had come into his voice, though ever so faintly, and
something compelling as well. She took the note when he held it out to her,
unable, despite her will, to do anything else. As she passed the doorway
Hussain Shah appeared on the landing beyond it, the folds of the turban
above his temple stiff with blood. She paused an instant to hear Terrington's
greeting, but the greeting was in Pukhtu, which she did not understand. Had
she understood, her opinion of Terrington's hardness would have been
confirmed, for no reference was made to the wounded man's condition until
he had received his orders.
Half an hour later every available man in the force was paraded in the
courtyard of the Fort. Walcot with his Lancers in front; then, behind
Terrington, the Sikhs and Dogras that could be spared from the Fort, the
Guides bringing up the rear. The Maxim had been hoisted on to the roof of
the Eastern Tower, whence it covered for a certain distance an advance on
the Palace. In the silence the blow of a pick could be heard, and the falling
stones from the last loopholes in the walls.
Terrington sat his horse immovably, waiting for the signal from Afzul
Singh which should open the gates. He was burning with a dull anger
against the circumstance in which he had been placed, and against the folly
of the men who had created it. He knew that in marching on the Palace to
demand the men who had entered it that morning he was imperilling the
safety of his entire force; yet he knew, too, that sentimental England would
never forgive his sanity in declining the risk should any of Sir Colvin's
party happen to be still alive. He had no hope of their safety. He was too
well acquainted with the temper in which they had been attacked. That he
viewed with no resentment whatever. It had been a piece of the foulest
treachery, but treachery was a virtue in Sar, and he was quite able to accept,
and even to respect, alien standards of conduct.
What did anger him was the stolid British arrogance which declined to
make allowance for any prejudices but its own, and thought beneath its
dignity all considerations which were not in the terms of its own
intelligence. Rose Chantry watched him from the orderly-room window
which overlooked the courtyard. She had been in the surgery helping
Clones to make up first-aid bandages, but the tramp of laden men down the
long passages, and the roll, like a soft volley, of grounded butts in the dust
as the men fell in, so wrought on her excitement that she left her work and
ran up the narrow twisted stairs to the room from which half an hour earlier
Terrington had sent her.
She watched him now, with her shoulder pressed against the yellow
chunam wall and her head drawn back in order not to be seen, wondering
how a man of his dominant authority could wait impassively at such a
moment the arrangements of a subordinate.
Her eyes, dry and hot, seemed almost to repudiate resentfully the tears
which she had shed; a pulse throbbed like the flutter of a moth at her throat;
her uneasy fingers seemed to crave to be closed, and yet when she clenched
her fist they ached to be opened. She longed to tear about, to give orders, to
rouse enthusiasm. She would have liked to ride beside Terrington to the
Palace and carry a flag: and the thought of how he would regard such a
proposal moved her not to a sense of its humour but to renewed irritation
with the man who could ride as indifferently to death as he would to a
dinner.
It was death in the shadow which had stabbed and was gone which made
her shiver. A thing so swift, so sudden, so unforeseen mocked the
comfortable security of life.
But with the fitting out of the expedition and speculation on the possible
safety of those in the Palace, her emotions became dreadfully perplexed.
She had perforce to cease mourning a husband who might be still alive, and
with the disappearance of a reason for her sorrow she began to wonder what
had caused it.
Had she cried because she loved him or because he was killed? She had
not a doubt while she thought him dead, but the chance of his being alive
seemed to have altered everything. Last night she would have disowned
indignantly the idea that she did not love him. She had accepted him as
naturally in the order of needful things as food and clothing. He was her
husband and so had everything that husbands have, did everything that
husbands do. She had never thought about it as a personal matter. One had a
husband as one had a cold in the head; one didn't always quite know why;
but having him one accepted him for the sort of thing he was.
Lewis had taken her from a life already wearily dull, and with every
prospect of becoming duller. He had come suddenly into her existence—a
quite unlooked-for excitement; and had transplanted her into surroundings
more exciting still; full of men, and dangers, and pageants and great affairs.
It was so full indeed, that in the press of things to do he was a good deal
crowded out. His work, his fresh appointments—for he had been
tremendously in demand—gave him rather the air of continually arranging
new scenes and effects in which she played the leading lady.
She didn't in the least so consciously regard him; she had not even
noticed how much his work kept him out of the occasions which she most
enjoyed; he seemed just a part of the delightful movement, a sort of dashing
high-spirited hot-tempered ambitious concentration of it all. He was the
man who had made it all possible for her, being her husband. That was how,
gratefully, she most often thought of him.
His death wrenched her by its treacherous horror; but it had put no
awkward questions. The questions came with the doubt if he were dead.
How much did she care for him? Did she care for him at all? Had she ever
cared for him as a husband? Right on the heels of that, answering it to her
astounded perception, came a shrinking of disgust that she had lived three
years with a man as his wife without loving him; without even discovering
that she did not love him. It was that which seared the tears in her eyes, and
left her with a sense of shame and self-disdain and loneliness indescribable.
It was that too in a curious reflected fashion which increased her anger at
Terrington's quiet indifference to the ways of Fate. She could picture Lewis
Chantry's raging vehemence under a like provocation.
As she watched the silent mass of men in the courtyard—the dull yellow
of the field-service kit lightened by the gay alkalaks of the Lancers, the
orange and white of their pennons, the glistening of the sun upon lance-
head and bayonet, the silence broken only by the clink of a bridoon as some
impatient horse flung up its head—there was a burst of blue and red above
the eastern tower and the Union Jack flew out above the Fort.
It was the signal that Afzul Singh had completed his defences. Walcot
rode back to Terrington and saluted. Terrington nodded. With a sparkle of
light on their lances, the horsemen were in the saddle, the rifles leapt to the
'carry,' and were swung on to the shoulder, cresting the infantry with the
shimmer of steel; the gates were thrown open, the Lancers passed through
and extended, the Sikhs and Dogras wheeled outwards after them in column
of fours, followed by the Guides.
As the gates closed behind the last section a sharp explosion rang out,
followed by others in quick succession.
Afzul Singh was converting the screen of chenar into an abattis with
discs of gun cotton, but to Rose the trees seemed to be falling before the
enemy's shells, and she ran hurriedly to the eastern tower to get a view of
the besiegers, and found there Afzul Singh himself, who explained her
mistake.
A sand-bag revetment crowned the top of the tower, and the loopholes on
either side of the Maxim were manned by picked shots. All were intently
watching the occasional glimpse of colour or gleam of steel which marked
the progress of Terrington's force through the Bazaar.
Now that the din of the detonations had ceased not a sound broke the
silence; the city lay listless and without a sign of life in the haze of its
noontide heat. The dust rose on the heels of the column as it emerged from
the Bazaar and filtered through the collection of low mud buildings beyond
it. Clear of these, Terrington swung his right at once on to the river, and the
whole of his little force could be seen for the first time as it extended and
moved forward across the space of open ground to the east of the Palace. It
looked painfully small for its job, like an ant attacking a mouse, even
though Terrington made it as imposing as he could without sacrificing its
compactness. The ground, flat as a floor from the river to the foot-hills,
gave no command for rifle fire over the centre of the town, and Terrington
had no choice but to march straight at the wall which surrounded the Khan's
buildings, and chance their being defended. It was a dangerous piece of
work, and Afzul Singh never lowered his glasses till the doubtful part of it
was done.
But Terrington showed at once the temper in which he had undertaken it.
His cavalry wheeled to the left, leaving the front open, and, advancing,
formed a screen which covered the skirts of the town. The river protected
the other flank, and, with the Guides in the centre as reserve, the Sikhs went
straight for the eastern gate, while the Dogra detachment advanced half
right upon the Palace stables where the wall ran down to the river. The
guards on the gate allowed themselves to be taken, the stables were
occupied without resistance, and a command was thus obtained of the
Palace compound which was seen to be invitingly empty. But Terrington
was the last man to be tempted by such an invitation. He had obtained a
foothold from which to enforce his demands, and did not intend to go a step
further.
He could not hope to carry the Palace, filled as it doubtless was with the
Khan's guards; he had no guns to batter it; but he could now, if his hand was
forced, make life very uncomfortable for those within its walls. So he began
to parley.
What passed was hidden by the Palace wall from the watchers on the
tower, but after three hours of apprehension they could see that the force
was preparing to retire, and presently some of the Khan's bearers appeared
through the gateway carrying charpoys. Afzul Singh guessed what was on
them, and his grave consideration made no disguise with Mrs. Chantry. He
had no hope that any of those who had been trapped in the Palace would
return alive, and he held out none to her.
"None come," he said, lowering his glasses; "they are all carried."
Terrington had requested the return of Sir Colvin and his escort, and, on
the reply that they were killed, had demanded their bodies.
Mir Khan, informed by his spies that the Fort had been loop-holed,
provisions stored, the trees levelled and every preparation made for a
prolonged siege, foresaw with a chuckle the very imminent destruction of
the British force in Sar, and was far too astute to hurry a game which was
going his own way.
So he tendered the bodies with every mark of respect and the most
profound apologies for the passions of his subjects which he had been
unable to keep under control.
The old man, when the message was read to him, rubbed his foot and
smiled with child-like craftiness. He admired the daring which had flung
that handful of the Sirkar's men without an hour's hesitation against his
Palace; admired it the more since it seemed to prove that Terrington was
after all but a swine-headed fighter like the rest of his kind.
VI
When the men were dismissed Terrington called Walcot and Dore into
the women's durbar hall and sent for Hussain Shah and Afzul Singh, who
were the two senior native officers.
"I should like to break the news to Mrs. Chantry if I may," said Walcot in
the doorway.
The room was a long gloomy one on the ground floor, used by Langford
partly as an office, partly as a store. Bales and boxes still filled two of its
corners, and the space in front of them was littered with Sir Colvin's and the
Chantrys' belongings, which were being removed from the Residency with
ostentation. One dark window in the further wall lent what dim light the
room had, and the table at which Terrington seated himself was drawn
somewhat towards it.
He was writing when the two native officers entered, and he assigned to
them the two seats on his right, with the grave silent courtesy with which
the East had coloured so curiously his English manner. Dore, nervously
tired by the excitement of the morning, had dropped limply on to a bale of
clothing, and lit a cigarette, but the two Sikhs sat erect and impassive beside
the table. Clones came in to requisition some stores, and reported Langford
to be insensible and sinking.
"If you can spare a few moments you might spend them here," said
Terrington.
The doctor nodded, and sat down on a packing-case beside Dore, rising
again at once as Mrs. Chantry, followed by Walcot, entered the room.
She was wearing still the frock of creamy lace in which she was to have
watched the polo that afternoon. Her face looked listless and white and
faded above it like a broken flower. Her eyes sought Terrington's in the dim
room with a sort of frightened submissiveness.
"Of course," he answered, getting out of his chair to hand it to her; but
Walcot had already drawn forward a seat of Sari rush from the relics of the
Residency, and she dropped into it limply, with a nod of acknowledgment to
Terrington, amid all the crushed and huddled fragments of her own lost
little home. Walcot sat down on a box beside her. A tiny jade god slid down
the pile of rugs and bowls and cushions, and lay at her feet with a severed
arm. He had been for years the very dearest of her household treasures, and
now to find him maimed and friendless moved in her a despondent misery
which she had not felt at her husband's death. She hid the little broken body
in the hollow of her hand, and sat there, her head bent over it, shaking with
sobs. It was the very smallness of the grief that brought her tears.
Terrington blotted the notes he had written and laid down his pen. He
made no sort of preamble: for anything in his manner the occasion might
have been the most ordinary in the world.
"I wish," he said, "to explain my plans. Some of us may not come
through the next few weeks, and I don't want those who do to be saddled
with my mistakes. So I'll enter any protest, to cover you in case I'm not with
you at the finish. We leave Sar to-night."
Even the two dark impassive faces on his right reflected the
unexpectedness of his announcement, and Walcot half rose to his feet.
"Abandon the Fort, and everything we cannot carry, and retire by the
Palári upon Rashát," said Terrington quietly.
"Have you changed your mind then?" asked the other sharply.
"No," said Terrington slowly, "but I've changed my position. I've only so
far had to decide how to make the Fort defensible if it had to be defended."
"Yes, but!" Walcot objected, "the clearing of the Residency, the blowing
down of these trees; all that has taken place since! What's been the object of
that if you didn't mean to stay?"
"In war," said Terrington quietly, "it's sometimes as well to keep your
intentions from the enemy."
"Don't you think we could hold Sar, sir?" he asked with boyish eagerness
for a stand-up fight.
"I shouldn't think our retirement will be very popular at home," Clones
suggested.
"I don't suppose it will," said Terrington; "at home they're rather fond of
a siege; it makes the paper more interesting."
"No doubt," said Terrington with his grave smile, "but without being told
what its intentions were. Consequently one rather seems to be here to make
intentions for the Government, and I'm very possibly making them all
wrong. But that's their fault for not having sent a better man."
Rose Chantry, with her hand still closed about the little broken god in
her lap, looked up at him through the tears that hung across her eyes.
Beyond the cool darkness of the entrance door, against the far wall of the
blazing courtyard she could see the row of charpoys with their burden of
dead men, mere rolls of sallow dungari cloth, waiting till the grave being
dug beside the Residency gate should be wide enough to hold them. It was
the most dreadful moment of her life, when she needed above all to be
petted and comforted into a sense of her importance, but the man who
should have done it was indifferent even to her safety. She had already
begun to cheer herself with the thought of a siege; the delicacy of her
position; the solicitous homage of all the men; her cheerful and inspiring
effect upon them; the excitement in England so intensified by the presence
of a woman among the besieged; the accounts of her in the papers, made
more touching by her loss; and then the thrill of the relief—she took the
relief for granted—the sound of the guns, the fight through the streets of
Sar, the cheers of the British troops, the ardent congratulations, the soft
abandonment of that moment at the end of the suspense, and herself the one
woman in a British army. And the coming home after such an experience;
the woman of the moment, every one wanting to meet her; perhaps a
command from the Queen.
And that very morning, only a few hours back, as the party started for
the Durbar, she had exulted in her triumph over him, she whose folly had
given everything into his hand!
What ages it seemed since Lewis had swung buoyantly into his saddle,
and Sir Colvin, ruddy and cheery, had waved her an "au revoir." Now they
were rolls of yellow dungari lying out there in the sun.
"The Palári!" cried Walcot derisively. "Why, it's the worst pass on this
side of the Pamir. May I ask why you've chosen it?"
"Have you been through the Palári or Darai?" Terrington enquired.
"No."
"Then you can hardly appreciate why I've chosen it," said Terrington
quietly. "The Palári is the only one which we've a chance of reaching
without being cut off; it's the only one not commanded from above at this
time of year, and Freddy Gale, holding this end of it at Rashát, is absolutely
done for unless we dig him out."
Terrington turned to the two men beside him, who had sat, immovably
attentive, throughout the discussion.
"We are as the print of thy footsteps," said Afzul Shah, and Hussain
nodded.
Terrington wrote for some moments, then read aloud his own
dispositions and the objections which had been urged against retirement.
His own plans and reasons were very bluntly outlined, but he gave the case
for the occupation of Sar with a fulness and cogency that astonished its
advocates, who did not suspect how dear the scheme had been to his
ambition, nor what its abandonment had cost him.
The best that was in the other man responded instinctively to such
treatment:
"You've put it a long way stronger than I could myself," he said, taking
up the pen.
VII
He shut his eyes with that inconsolable sigh, and it was his unconscious
soul that whispered, "Give my love to Helen," with the last beats of his
heart.