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

Revision 4c2259d583e242ad4881ec98298d7787b5264c6a authored by Ben Hermans on 04 May 2020, 14:31:01 UTC, committed by Ben Hermans on 04 May 2020, 14:31:01 UTC
Fix ladel_setup for compiling AMD
1 parent effd840
  • Files
  • Changes
  • 999f49f
  • /
  • src
  • /
  • pattern.c
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.

  • revision
  • directory
  • content
revision badge
swh:1:rev:4c2259d583e242ad4881ec98298d7787b5264c6a
directory badge Iframe embedding
swh:1:dir:735dea6af23f13e2dcfa7241e96b081219e2b87d
content badge Iframe embedding
swh:1:cnt:227d765f9d8f034a88f48189244cb2ef805c2518
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.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
pattern.c
#include "types.h"
#include "constants.h"

ladel_int ladel_nonzero_pattern_of_row_in_L(ladel_sparse_matrix *M, 
                                                ladel_symbolics *sym,
                                                ladel_int row)
{
    ladel_int start = M->ncol, index, next_node, nb_marked_nodes;
    ladel_int *etree = sym->etree, *pattern = sym->pattern, *nodes = sym->nodes;
    MARK(nodes,row);
    for (index = M->p[row]; index < M->p[row+1]; index++)
    {
        next_node = M->i[index];
        nb_marked_nodes = 0;
        /* mark all the nodes found by traversing the etree */
        while (!IS_MARKED(nodes, next_node))
        {
            MARK(nodes, next_node);
            pattern[nb_marked_nodes] = next_node;
            nb_marked_nodes++;
            next_node = etree[next_node];
        }
        /*append the newly marked nodes to pattern (which goes from ncol-1 to 0)*/
        while (nb_marked_nodes > 0)
        {
            start--;
            nb_marked_nodes--;
            pattern[start] = pattern[nb_marked_nodes];
        }
    }
    /* unmark all the nodes to prepare for finding the pattern of the next row */
    for (index = start; index < M->ncol; index++) UNMARK(nodes, pattern[index]);
    UNMARK(nodes, row);

    return start;
}


ladel_int ladel_etree_dfs(ladel_sparse_matrix *W, 
                            ladel_symbolics *sym,
                            ladel_int row,
                            ladel_int maximum_row)
{
    ladel_int start = sym->ncol, index, next_node, nb_marked_nodes;
    ladel_int *etree = sym->etree, *pattern = sym->pattern, *nodes = sym->nodes;

    for (index = W->p[row]; index < W->p[row+1]; index++)
    {
        next_node = W->i[index];
        if (next_node >= maximum_row) break;
        nb_marked_nodes = 0;
        /* mark all the nodes found by traversing the etree */
        while (next_node != NONE && !IS_MARKED(nodes, next_node) && next_node < maximum_row)
        {
            MARK(nodes, next_node);
            pattern[nb_marked_nodes] = next_node;
            nb_marked_nodes++;
            next_node = etree[next_node];
        }
        /*append the newly marked nodes to pattern (which goes from ncol-1 to 0)*/
        while (nb_marked_nodes > 0)
        {
            start--;
            nb_marked_nodes--;
            pattern[start] = pattern[nb_marked_nodes];
        }
    }
    /* unmark all the nodes to prepare for finding the pattern of the next row */
    for (index = start; index < sym->ncol; index++) UNMARK(nodes, pattern[index]);
    UNMARK(nodes, row);

    return start;
}

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

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