OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr29250.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* We used to ICE because EXPAND_SUM was being used for all recursive calls
2
   to expand_expr.  */
3
struct TSparseEntry
4
{
5
  int feat_index;
6
  double entry;
7
};
8
 
9
struct TSparse
10
{
11
  int vec_index;
12
  int num_feat_entries;
13
  struct TSparseEntry *features;
14
};
15
 
16
void
17
get_full_feature_matrix (struct TSparse* sparse_feature_matrix, int num_vec)
18
{
19
  double *fm;
20
  int v, f;
21
 
22
  for (v=0; v < num_vec; v++)
23
  {
24
    for (f=0; f < sparse_feature_matrix[v].num_feat_entries; f++)
25
    {
26
      long long offs = sparse_feature_matrix[v].vec_index
27
        + sparse_feature_matrix[v].features[f].feat_index;
28
      fm[offs] = sparse_feature_matrix[v].features[f].entry;
29
    }
30
  }
31
}
32
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.