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 24
    • Merge requests 24
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1904
Closed
Open
Created Jan 24, 2014 by Robert Bernecky@rbeDeveloper

WLPG doesn't leave partitions in obviously contiguous order

Bugzilla Link 1111
Created on Jan 24, 2014 19:21
Resolution INVALID
Resolved on Jan 24, 2014 20:18
Version svn
OS Linux
Architecture PC

Extended Description

I would expect that WLPG would leave partition elements in some
sort of continuous chain, such as:
  
  p0:   k1 <= iv < k2
  p1    0  <= iv < k1
  p2    k2 <= iv < n
   genarray( [n])...
However, this does not seem to be the case. Consider this code:
use Array: {<,<=};
int id( int x)
{
 return( x);
}
int main()
{
 n = id( 20);
 shp = _add_SxS_( n, 2);
 AAA = with {
 ( [0] <= iv < [n]) : 1;
 ( [n] <= iv <= [n]) : 2;
 ( [ _add_SxS_( n, 1)] <= iv < [shp]) : 3;
 } : genarray( [ shp]);
 StdIO::print( AAA);
 return( 0);
}
After -b9:wlpg, we have this:
_flat_2 = 20;
  n = _MAIN::id( _flat_2) ;
  _flat_3 = 2;
  shp = _add_SxS_( n, _flat_3);
  _flat_7 = [ n ];
  _flat_6 = 0;
  _flat_5 = [ _flat_6 ];
  _flat_4 = [ shp ];
  _wldp_72 = 0;
  _wlpg_91_zeros = [ 0 ];
  _wlpg_92_axis = 0;
  _wlpg_93_lmax, _wlpg_94_umin, _wlpg_95_nmin, _wlpg_96_nmax = wrapper:sacprelude::partitionSlicer( _wlpg_91_zeros, _flat_4, _wlpg_92_axis, _flat_5, _flat_7) ;
  _hwlg_0 = with {
/* Partn */
        (_wlpg_94_umin <= iv=[_eat_22] < _flat_4)
        {
        } : _flat_6 ; ,
/* Partn */
        (_wlpg_91_zeros <= iv=[_eat_22] < _wlpg_93_lmax)
        {
        } : _flat_6 ; ,
/* Partn */
        (_flat_5 <= iv=[_eat_22] < _flat_7)
        {
          _flat_8 = 1;
        } : _flat_8 ;
         } :
      genarray( _flat_4);
These do not, from all appearances, form a chain from 0..._flat_4.
Am I missing something obvious here?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking