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
  • /
  • bikel3
  • /
  • m4f
  • /
  • bmul2.h
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:4a555687843712bb698845cdec4b3a5e489cde7b
directory badge Iframe embedding
swh:1:dir:03923b55962c2e735997636bb556c266f41a3493
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 ...
bmul2.h
// Implemented by Ming-Shing Chen, Tung Chou and Markus Krausz.
// public domain

#ifndef _BMUL_2_H_
#define _BMUL_2_H_

#include "stdint.h"


//
// ffft based mulitplication for bit-polynomials
// Use Froebinus FFT
//


// input transform for the multiplication.
// sizeof( a_out ) = 2*sizeof( a_in ) = 4096 bytes
void bmul2_2048_to_4096_prepare( uint32_t * a_out, const uint8_t * a_in );

// 4 KB external buffer
void bmul2_2048_to_4096_prepare_ebuff( uint32_t * a_out, const uint8_t * a_in , uint32_t *ebuff);

// multiplication with input operands after input transform.
// sizeof( c ) = sizeof( a ) = sizeof( b ) = 4096 bytes
void bmul2_2048_to_4096_mul( uint8_t * c, const uint32_t * a, const uint32_t * b );

// 4 KB external buffer
void bmul2_2048_to_4096_mul_ebuff( uint8_t * c, const uint32_t * a, const uint32_t * b , uint32_t * ebuff);


// multiplication for bit polynomials
// sizeof( c ) = 2*sizeof( a ) = 2*sizeof(b) = 4096 bytes
void bmul2_2048_to_4096( uint8_t * c, const uint8_t * a, const uint8_t * b );

/////////////////////

// input transform for the multiplication.
// sizeof( a_out ) = 2*sizeof( a_in ) = 8192 bytes
void bmul2_4096_to_8192_prepare( uint32_t * a_out, const uint8_t * a_in );

// 8 KB external buffer
void bmul2_4096_to_8192_prepare_ebuff( uint32_t * a_out, const uint8_t * a_in , uint32_t *ebuff);

// multiplication with input operands after input transform.
// sizeof( c ) = sizeof( a ) = sizeof( b ) = 8192 bytes
void bmul2_4096_to_8192_mul( uint8_t * c, const uint32_t * a, const uint32_t * b );

// 8 KB external buffer
void bmul2_4096_to_8192_mul_ebuff( uint8_t * c, const uint32_t * a, const uint32_t * b , uint32_t *ebuff );

// multiplication for bit polynomials
// sizeof( c ) = 2*sizeof( a ) = 2*sizeof(b) = 8192 bytes
void bmul2_4096_to_8192( uint8_t * c, const uint8_t * a, const uint8_t * b );


#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