Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2380
Closed
Open
Created Feb 13, 2024 by Thomas Koopman@thomasDeveloper

check tc false positive

The following program gives Type pattern error in application of averageOuter: feature d:shp' in return value does not match feature shp' in arrayCompilation failed while Running SAC optimizations. I think the program is correct however. It should average batchsize many copies of k1.

use Array: all;

inline
float[d:shp] averageOuter(float[n,d:shp] array)
{
  return {iv -> sum({[i] -> array[[i]++iv] | [i] < [n]}) | iv < shp};
}

int main()
{
  batchsize = 100;

  k1 = with {}: genarray([6, 5, 5], 1f / 25f);

  /* [batchsize, 6, 5, 5] */
  bd_k1 = {iv -> k1 | iv < [batchsize]};

  k1 = averageOuter(bd_k1);

  return _toi_S_(_sel_VxA_([0, 0, 0], k1));
}

Compiled with arguments -check tc

sac2c 1.3.3-MijasCosta-1153-g14eb
build-type: DEBUG
built-by: "thomas" at 2024-02-12T12:49:22
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking