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

  • d3c1510
  • /
  • ladel_copy.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:48a39317c3463f60685dc9f151ba1741887585ab
directory badge Iframe embedding
swh:1:dir:d3c1510be47586da317303bf0d52a9da0f013bf2
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 ...
ladel_copy.h
/**
 * @file ladel_copy.h
 * @author Ben Hermans
 * @brief Routines to copy matrices and vectors.
 */

#ifndef LADEL_COPY_H
#define LADEL_COPY_H

#include "ladel_types.h"

/**
 * Copies a matrix into a newly allocated one.
 * 
 * Note that even if there is superfluous space in M (i.e. M->nz indicates the number of nonzeros per column), 
 * the returned matrix will fit the required size exactly, and not make use of the nz array.
 * 
 * @param M     Matrix to be copied
 * @return      Copy of the matrix
 */
ladel_sparse_matrix *ladel_sparse_allocate_and_copy(ladel_sparse_matrix *M);

/** 
 * Copies a matrix (preallocated)
 * 
 * @param M         Matrix to be copied
 * @param M_copy    Resulting copy
 */
void ladel_sparse_copy( ladel_sparse_matrix *M, 
                        ladel_sparse_matrix *M_copy);

/**
 * Copies an integer vector (preallocated)
 * 
 * @param x     Vector to be copied
 * @param size  Size of the vector
 * @param y     Resulting copy
 */
void ladel_int_vector_copy( ladel_int *x, 
                            ladel_int size, 
                            ladel_int *y);

/**
 * Copies a double vector (preallocated)
 * 
 * @param x     Vector to be copied
 * @param size  Size of the vector
 * @param y     Resulting copy
 */
void ladel_double_vector_copy(  ladel_double    *x, 
                                ladel_int       size, 
                                ladel_double    *y);

#endif /*LADEL_COPY_H*/

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