Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • a3483c2
  • /
  • ntruhrss701
  • /
  • m4f
  • /
  • schoolbooks.i
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:249200219d4642c5a6eb177b532cd08b9cbcf81c
directory badge Iframe embedding
swh:1:dir:a6444f08b9a843ba17dc39e96e03d8d90295f559
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
schoolbooks.i

#ifndef SCHOOLBOOKS_I
#define SCHOOLBOOKS_I

#include "macros.i"

// compute hi(out) = a0 b1 + a1 b0 + zeta(a2 b3 + b3 b2)
.macro c1_4x4_16 out, a1a0, a3a2, b1b0, b3b2, twiddle, QQprime, tmp
    smuadx \out, \a3a2, \b3b2
    montgomery_16 \out, \QQprime, \tmp
    smultb \out, \out, \twiddle
    smladx \out, \a1a0, \b1b0, \out
    montgomery_16 \out, \QQprime, \tmp
.endm

// compute hi(out) = a0 b3 + a1 b2 + a2 b1 + a3 b0
.macro c3_4x4_16 out, a1a0, a3a2, b1b0, b3b2, twiddle, QQprime, tmp
    smuadx \out, \a1a0, \b3b2
    smladx \out, \a3a2, \b1b0, \out
    montgomery_16 \out, \QQprime, \tmp
.endm

// compute hi(out) = a0 b2 + a1 b1 + a2 b0 + zeta a3 b3
.macro c2_4x4_16 out, a2a0, a3a1, b2b0, b3b1, twiddle, QQprime, tmp
    smultt \out, \a3a1, \b3b1
    montgomery_16 \out, \QQprime, \tmp
    smultb \out, \out, \twiddle
    smlabb \out, \a3a1, \b3b1, \out
    smladx \out, \a2a0, \b2b0, \out
    montgomery_16 \out, \QQprime, \tmp
.endm

// compute hi(out) = a0 b0 + zeta(a1 b3 + a2 b2 + a3 b1)
.macro c0_4x4_16 out, a2a0, a3a1, b2b0, b3b1, twiddle, QQprime, tmp
    smultt \out, \a2a0, \b2b0
    smladx \out, \a3a1, \b3b1, \out
    montgomery_16 \out, \QQprime, \tmp
    smultb \out, \out, \twiddle
    smlabb \out, \a2a0, \b2b0, \out
    montgomery_16 \out, \QQprime, \tmp
.endm

.macro c3_4x4_32 out, a0, a1, a2, a3, b0, b1, b2, b3, twiddle, Qprime, Q, tmp, tmp2
    smull \tmp, \out, \a0, \b3
    smlal \tmp, \out, \a1, \b2
    smlal \tmp, \out, \a2, \b1
    smlal \tmp, \out, \a3, \b0
    mul \tmp2, \tmp, \Qprime
    smlal \tmp, \out, \tmp2, \Q
.endm

.macro c2_4x4_32 out, a0, a1, a2, a3, b0, b1, b2, b3, twiddle, Qprime, Q, tmp, tmp2
    smull \tmp, \out, \a3, \b3
    mul \tmp2, \tmp, \Qprime
    smlal \tmp, \out, \tmp2, \Q
    smull \tmp, \out, \out, \twiddle
    smlal \tmp, \out, \a0, \b2
    smlal \tmp, \out, \a1, \b1
    smlal \tmp, \out, \a2, \b0
    mul \tmp2, \tmp, \Qprime
    smlal \tmp, \out, \tmp2, \Q
.endm

.macro c1_4x4_32 out, a0, a1, a2, a3, b0, b1, b2, b3, twiddle, Qprime, Q, tmp, tmp2
    smull \tmp, \out, \a2, \b3
    smlal \tmp, \out, \a3, \b2
    mul \tmp2, \tmp, \Qprime
    smlal \tmp, \out, \tmp2, \Q
    smull \tmp, \out, \out, \twiddle
    smlal \tmp, \out, \a0, \b1
    smlal \tmp, \out, \a1, \b0
    mul \tmp2, \tmp, \Qprime
    smlal \tmp, \out, \tmp2, \Q
.endm

.macro c0_4x4_32 out, a0, a1, a2, a3, b0, b1, b2, b3, twiddle, Qprime, Q, tmp, tmp2
    smull \tmp, \out, \a1, \b3
    smlal \tmp, \out, \a2, \b2
    smlal \tmp, \out, \a3, \b1
    mul \tmp2, \tmp, \Qprime
    smlal \tmp, \out, \tmp2, \Q
    smull \tmp, \out, \out, \twiddle
    smlal \tmp, \out, \a0, \b0
    mul \tmp2, \tmp, \Qprime
    smlal \tmp, \out, \tmp2, \Q
.endm

#endif

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top