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 401
    • Issues 401
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2190
Closed
Open
Created Feb 11, 2011 by Robert Bernecky@rbeDeveloper

ArrayIO.sac has very broken show() function

Bugzilla Link 823
Created on Feb 11, 2011 16:43
Resolution FIXED
Resolved on Feb 11, 2011 20:18
Version svn
OS Linux
Architecture PC

Extended Description

Recent masterrun failures, e.g., see below, demonstrate that
the show() function in ~/sac/BASE/stdlib/world/stdio/ArrayIO.sac
is sadly broken on non-scalars:
For example, consider:
xx = ([(2 == 3), (3 == 3)]);	/* Boolean vector */
show(xx);
StdIO::print( xx);
show(toi(xx));
StdIO::print( toi(xx));
This produces:
 a.out
0 
Dimension:  1
Shape    : <  2>
< 0  1 > 
0 
Dimension:  1
Shape    : <  2>
< 0  1 > 
Since the whole purpose of ArrayFormat is to produce
character arrays without the ugly programmer-"friendly" 
decorations, this is not quite adequate. Note that
the vectors are displaying as scalars.
If we do: xx = reshape( [2,1], xx), both work
properly, but tensors are very wrong, too.
Revision 1060 of ArrayIO gives us this much prettier
output for show( reshape( [ 2,3,4], iota(30))):
a.out
 0  1  2  3  4
 5  6  7  8  9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
25 26 27 28 29
Dimension:  3
Shape    : <  2,  3,  5>
< 0  1  2  3  4 > < 5  6  7  8  9 > <10 11 12 13 14 > 
<15 16 17 18 19 > <20 21 22 23 24 > <25 26 27 28 29 > 
Revision -r1141 (CAJ) works fine. Revision -r1258 (SKD)
does not build. Revision -r1260 (SBS) is broken.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking