----------------------------------------------- /* * SAC-Program fold.sac : */ /* * type definitions */ external classtype World::World; external classtype Terminal::Terminal; external classtype TermFile::TermFile; typedef double[2] ComplexBasics::complex; typealias ComplexBasics::complex Complex::complex; external typedef List::list; external void SAC_List_free_list( list); external typealias IOresources::TermFile; external typedef sacprelude::SACarg; external SACarg SACARGcopy( SACarg); external void SACARGfree( SACarg); /* * Global Definitions */ SAC_MT_DEFINE() SAC_PF_DEFINE() SAC_HM_DEFINE() /* * prototypes for locals (FUNDEFS) */ external /* sticky */ int[.] sacprelude::partitionIntersectMax( int[*] idxmin { } , int[*] bound1 { } ) /* * partitionIntersectMax :: --- */ external /* sticky */ int[.], int[.], int[.], int[.] sacprelude::partitionSlicer( int[*] min { } , int[*] max { } , int[*] axis { } , int[*] lb { } , int[*] ub { } ) /* * partitionSlicer :: --- */ external /* sticky */ bool[.] sacprelude::isPartitionIntersectNull( int[*] idxmin { } , int[*] idxmax { } , int[*] bound1 { } , int[*] bound2 { } ) /* * isPartitionIntersectNull :: --- */ external /* sticky */ int[.] sacprelude::partitionIntersectMin( int[*] idxmax { } , int[*] bound2 { } ) /* * partitionIntersectMin :: --- */ external /* sticky */ int[*] sacprelude::adjustLacFunParams( bool[*] p { } , int[*] i { } , int[*] iv { } ) /* * adjustLacFunParams :: --- */ external /* sticky */ int sacprelude::prod( int[*] v { } ) /* * prod :: --- */ external /* sticky */ int[*] sacprelude::adjustLacFunParamsReshape( bool[*] p { } , int[*] i { } , int[*] iv { } , int[*] shp { } ) /* * adjustLacFunParamsReshape :: --- */ external /* sticky */ bool sacprelude::eq( char[*] A { } , char[*] B { } ) /* * eq :: --- */ external /* sticky */ bool sacprelude::eq( bool[*] A { } , bool[*] B { } ) /* * eq :: --- */ external /* sticky */ bool sacprelude::eq( double[*] A { } , double[*] B { } ) /* * eq :: --- */ external /* sticky */ bool sacprelude::eq( float[*] A { } , float[*] B { } ) /* * eq :: --- */ external /* sticky */ bool sacprelude::eq( int[*] A { } , int[*] B { } ) /* * eq :: --- */ external /* sticky */ int[.], int[.], int[.] sacprelude::gridFiller( int[*] lb { } , int[*] ub { } , int[*] wdth { } , int[*] dim { } , int[*] maxwidth { } ) /* * gridFiller :: --- */ external /* sticky */ ulonglong{0} sacprelude::zero( ulonglong[*] A { } ) /* * zero :: --- */ external /* sticky */ ulong{0} sacprelude::zero( ulong[*] A { } ) /* * zero :: --- */ external /* sticky */ uint{0} sacprelude::zero( uint[*] A { } ) /* * zero :: --- */ external /* sticky */ ushort{0} sacprelude::zero( ushort[*] A { } ) /* * zero :: --- */ external /* sticky */ ubyte{} sacprelude::zero( ubyte[*] A { } ) /* * zero :: --- */ external /* sticky */ longlong{0} sacprelude::zero( longlong[*] A { } ) /* * zero :: --- */ external /* sticky */ long{0} sacprelude::zero( long[*] A { } ) /* * zero :: --- */ external /* sticky */ short{0} sacprelude::zero( short[*] A { } ) /* * zero :: --- */ external /* sticky */ byte{} sacprelude::zero( byte[*] A { } ) /* * zero :: --- */ external /* sticky */ bool{0} sacprelude::zero( bool[*] A { } ) /* * zero :: --- */ external /* sticky */ char{ } sacprelude::zero( char[*] A { } ) /* * zero :: --- */ external /* sticky */ float{0.0...} sacprelude::zero( float[*] A { } ) /* * zero :: --- */ external /* sticky */ double{0.0...} sacprelude::zero( double[*] A { } ) /* * zero :: --- */ external /* sticky */ int{0} sacprelude::zero( int[*] A { } ) /* * zero :: --- */ external /* sticky */ char[*] sacprelude::sel( int[*] idx { } , char[*] array { } ) /* * sel :: --- */ external /* sticky */ bool[*] sacprelude::sel( int[*] idx { } , bool[*] array { } ) /* * sel :: --- */ external /* sticky */ double[*] sacprelude::sel( int[*] idx { } , double[*] array { } ) /* * sel :: --- */ external /* sticky */ float[*] sacprelude::sel( int[*] idx { } , float[*] array { } ) /* * sel :: --- */ external /* sticky */ int[*] sacprelude::sel( int[*] idx { } , int[*] array { } ) /* * sel :: --- */ external hidden(0) * World:_INIT::init_TheWorld( hidden(0) *_OI_object { } ) /* * init_TheWorld :: --- */ external hidden(0) *, hidden(1) * Terminal:_INIT::init_TheTerminal( hidden(0) *_rso_5_TheWorld { } , hidden(1) *_OI_object { } ) /* * init_TheTerminal :: --- */ external hidden(1) *, hidden(2) * TermFile:_INIT::init_stdout( hidden(1) *_rso_37_TheTerminal { } , hidden(2) *_OI_object { } ) /* * init_stdout :: --- */ external hidden(1) *, hidden(2) * ScalarIO::print( hidden(1) *_rso_371_TheTerminal { } , hidden(2) *_rso_370_stdout { } , float n { } ) /* * print :: --- */ external /* sticky */ int[*] sacprelude::adjustLacFunParams( bool[*] p { } , int[*] i { } , int[.] iv { } ) /* * adjustLacFunParams :: --- */ external /* sticky */ int[*] sacprelude::adjustLacFunParamsReshape( bool[*] p { } , int[*] i { } , int[.] iv { } , int[.] shp { } ) /* * adjustLacFunParamsReshape :: --- */ /* * global objects */ external hidden(0) World::TheWorld; external hidden(1) Terminal::TheTerminal; external hidden(2) TermFile::stdout; /* * function definitions (FUNDEFS) */ /**************************************************************************** * Wrapper function: * _MAIN::main(...) ****************************************************************************/ hidden(1) *, hidden(2) *, hidden(0) *, int{0} _MAIN::main( hidden(1) *_rso_29_TheTerminal { } , hidden(2) *_rso_28_stdout { } , hidden(0) *_rso_27_TheWorld { } ) /* * main :: --- */ { int{0} _isaa_557__rso_27_TheWorld { } ; hidden(1) _cwc_109 { } ; hidden(2) _cwc_108 { } ; hidden(0) _cwc_107 { } ; int{0} _cwc_106 { } ; _isaa_557__rso_27_TheWorld = 0; _cwc_109, _cwc_108, _cwc_107, _cwc_106 = _MAIN::main( _rso_29_TheTerminal, _rso_28_stdout, _rso_27_TheWorld); return( _cwc_109, _cwc_108, _cwc_107, _isaa_557__rso_27_TheWorld); } /**************************************************************************** * _MAIN::main(...) ****************************************************************************/ hidden(1) *, hidden(2) *, hidden(0) *, int{0} _MAIN::main( hidden(1) *_rso_32_TheTerminal { } , hidden(2) *_rso_31_stdout { } , hidden(0) *_rso_30_TheWorld { } ) /* * main :: --- */ { int _ivesplit_1195 { } ; int _ivesplit_1194 { } ; int _ivesplit_1193 { } ; int _wlidx_1187_a { } ; float _al_1166 { } ; float _al_1165 { } ; int{0} _isaa_578__rso_30_TheWorld { } ; int _pinl_344__eat_41 { } ; int _pinl_343__eat_40 { } ; int[2] _pinl_342_iv { } ; int _pinl_431__flat_212 { } ; float _pinl_432__flat_22 { } ; float _pinl_443__flat_87 { } ; float _pinl_446__flat_203 { } ; float _pinl_447__flat_205 { } ; int _pinl_390__flat_213 { } ; float _pinl_391__flat_22 { } ; float _pinl_402__flat_87 { } ; float _ea_310_b { } ; float _ea_308__hwlg_0 { } ; int _eat_39 { } ; int _eat_38 { } ; int _eat_37 { } ; int _eat_36 { } ; hidden(2) _rso_31_stdout__SSA0_2 { } ; /* declared: TermFile::TermFile */ hidden(1) _rso_32_TheTerminal__SSA0_2 { } ; /* declared: Terminal::Terminal */ int[2] iv__SSA0_1 { } ; float[100,100] a__SSA0_1 { } ; hidden(2) _rso_31_stdout__SSA0_1 { } ; /* declared: TermFile::TermFile */ hidden(1) _rso_32_TheTerminal__SSA0_1 { } ; /* declared: Terminal::Terminal */ hidden(0) _rso_30_TheWorld__SSA0_1 { } ; /* declared: World::World */ float b { } ; float _hwlg_0 { } ; int[2] iv { } ; float{0.0...} _flat_5 { } ; float{100...} _flat_4 { } ; float[100,100] a { } ; float{1.0...} _flat_2 { } ; _isaa_578__rso_30_TheWorld = 0; _rso_30_TheWorld__SSA0_1, _rso_32_TheTerminal__SSA0_1, _rso_31_stdout__SSA0_1 = _MAIN:_INIT::init( _rso_30_TheWorld, _rso_32_TheTerminal, _rso_31_stdout); _flat_2 = 1.0f; a = with /** FOLDABLE (all gen's const) **/ /** REFERENCED: 1 (total num refs) **/ { ([ 0, 0 ] <= _pinl_342_iv=[_pinl_344__eat_41, _pinl_343__eat_40] (IDXS:_wlidx_1187_a) < [ 100, 100 ]) { /* empty */ } : _flat_2 ; } : genarray( [ 100, 100 ], _flat_2, IDX(_wlidx_1187_a)); _flat_4 = 100.0f; _ivesplit_1193 = _idxs2offset_( [ 100, 100 ], 10, 10); a__SSA0_1 = _idx_modarray_AxSxS_( a, _ivesplit_1193, _flat_4); _flat_5 = 0.0f; _hwlg_0 = with /** FOLDABLE (all gen's const) **/ /** REFERENCED: 1 (total num refs) **/ { ([ 0, 0 ] <= iv=[_eat_37, _eat_36] < [ 100, 50 ]) { _ea_308__hwlg_0 = _accu_( iv); _pinl_390__flat_213 = _add_SxS_( _eat_37, _eat_36); _pinl_391__flat_22 = _tof_S_( _pinl_390__flat_213); _ivesplit_1194 = _idxs2offset_( [ 100, 100 ], _eat_37, _eat_36); _pinl_402__flat_87 = _idx_sel_( _ivesplit_1194, a__SSA0_1); _al_1165 = _add_SxS_( _ea_308__hwlg_0, _pinl_402__flat_87); _al_1166 = _add_SxS_( _al_1165, _pinl_391__flat_22); } : _al_1166 ; } : fold( ScalarArith::+, _flat_5); b = with /** FOLDABLE (all gen's const) **/ /** REFERENCED: 1 (total num refs) **/ { ([ 0, 50 ] <= iv__SSA0_1=[_eat_39, _eat_38] < [ 100, 100 ]) { _ea_310_b = _accu_( iv__SSA0_1); _pinl_431__flat_212 = _sub_SxS_( _eat_39, _eat_38); _pinl_432__flat_22 = _tof_S_( _pinl_431__flat_212); _ivesplit_1195 = _idxs2offset_( [ 100, 100 ], _eat_39, _eat_38); _pinl_443__flat_87 = _idx_sel_( _ivesplit_1195, a__SSA0_1); _pinl_446__flat_203 = _mul_SxS_( _pinl_443__flat_87, _pinl_432__flat_22); _pinl_447__flat_205 = _add_SxS_( _ea_310_b, _pinl_446__flat_203); } : _pinl_447__flat_205 ; } : fold( ScalarArith::+, _hwlg_0); _rso_32_TheTerminal__SSA0_2, _rso_31_stdout__SSA0_2 = StdIO::print( _rso_32_TheTerminal__SSA0_1, _rso_31_stdout__SSA0_1, b); return( _rso_32_TheTerminal__SSA0_2, _rso_31_stdout__SSA0_2, _rso_30_TheWorld__SSA0_1, _isaa_578__rso_30_TheWorld); } /**************************************************************************** * _MAIN:_INIT::init(...) ****************************************************************************/ hidden(0) *, hidden(1) *, hidden(2) * _MAIN:_INIT::init( hidden(0) *_rso_35_TheWorld { } , hidden(1) *_rso_34_TheTerminal { } , hidden(2) *_rso_33_stdout { } ) /* * init :: --- */ { hidden(2) _rso_33_stdout__SSA0_1 { } ; /* declared: TermFile::TermFile */ hidden(1) _rso_34_TheTerminal__SSA0_2 { } ; /* declared: Terminal::Terminal */ hidden(1) _rso_34_TheTerminal__SSA0_1 { } ; /* declared: Terminal::Terminal */ hidden(0) _rso_35_TheWorld__SSA0_2 { } ; /* declared: World::World */ hidden(0) _rso_35_TheWorld__SSA0_1 { } ; /* declared: World::World */ _rso_35_TheWorld__SSA0_1 = World:_INIT::init_TheWorld( _rso_35_TheWorld); _rso_35_TheWorld__SSA0_2, _rso_34_TheTerminal__SSA0_1 = Terminal:_INIT::init_TheTerminal( _rso_35_TheWorld__SSA0_1, _rso_34_TheTerminal); _rso_34_TheTerminal__SSA0_2, _rso_33_stdout__SSA0_1 = TermFile:_INIT::init_stdout( _rso_34_TheTerminal__SSA0_1, _rso_33_stdout); return( _rso_35_TheWorld__SSA0_2, _rso_34_TheTerminal__SSA0_2, _rso_33_stdout__SSA0_1); } /**************************************************************************** * ScalarArith::+(...) ****************************************************************************/ inline float ScalarArith::+( float A { } , float B { } ) /* * + :: --- */ { float _flat_205 { } ; _flat_205 = _add_SxS_( A, B); return( _flat_205); } /**************************************************************************** * StdIO::print(...) ****************************************************************************/ inline hidden(1) *, hidden(2) * StdIO::print( hidden(1) *_rso_150_TheTerminal { } , hidden(2) *_rso_149_stdout { } , float n { } ) /* * print :: --- */ { hidden(2) _rso_149_stdout__SSA0_1 { } ; /* declared: TermFile::TermFile */ hidden(1) _rso_150_TheTerminal__SSA0_1 { } ; /* declared: Terminal::Terminal */ _rso_150_TheTerminal__SSA0_1, _rso_149_stdout__SSA0_1 = ScalarIO::print( _rso_150_TheTerminal, _rso_149_stdout, n); return( _rso_150_TheTerminal__SSA0_1, _rso_149_stdout__SSA0_1); } /**************************************************************************** * sacprelude::sel(...) ****************************************************************************/ /* sticky */ inline int[*] sacprelude::sel( int[.] idx { } , int[*] array { } ) /* * sel :: --- */ { int _ivesplit_1196 { } ; int _wlidx_1188_res { } ; int[.] _isaa_648_array { } ; int[*] res { } ; int _flat_147 { } ; int[.] new_idx { } ; int[.] iv { } ; int[.] _flat_145 { } ; int{0} _flat_146 { } ; int[.] new_shape { } ; int _flat_140 { } ; _isaa_648_array = _shape_A_( array); _flat_140 = _idx_shape_sel_( 0, idx); new_shape = _drop_SxV_( _flat_140, _isaa_648_array); _flat_146 = 0; _flat_145 = _mul_SxV_( _flat_146, new_shape); res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_145 <= iv (IDXS:_wlidx_1188_res) < new_shape) { new_idx = _cat_VxV_( idx, iv); _ivesplit_1196 = _vect2offset_( _isaa_648_array, new_idx); _flat_147 = _idx_sel_( _ivesplit_1196, array); } : _flat_147 ; , default partition( iv (IDXS:_wlidx_1188_res) ): { /* empty */ } : _flat_146 ; } : genarray( new_shape, _flat_146, IDX(_wlidx_1188_res)); return( res); } /**************************************************************************** * sacprelude::sel(...) ****************************************************************************/ /* sticky */ inline float[*] sacprelude::sel( int[.] idx { } , float[*] array { } ) /* * sel :: --- */ { int _ivesplit_1197 { } ; int _wlidx_1189_res { } ; int[.] _isaa_666_array { } ; float[*] res { } ; float _flat_139 { } ; int[.] new_idx { } ; int[.] iv { } ; float{0.0...} _flat_136 { } ; int[.] _flat_137 { } ; int{0} _flat_138 { } ; int[.] new_shape { } ; int _flat_132 { } ; _isaa_666_array = _shape_A_( array); _flat_132 = _idx_shape_sel_( 0, idx); new_shape = _drop_SxV_( _flat_132, _isaa_666_array); _flat_138 = 0; _flat_137 = _mul_SxV_( _flat_138, new_shape); _flat_136 = 0.0f; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_137 <= iv (IDXS:_wlidx_1189_res) < new_shape) { new_idx = _cat_VxV_( idx, iv); _ivesplit_1197 = _vect2offset_( _isaa_666_array, new_idx); _flat_139 = _idx_sel_( _ivesplit_1197, array); } : _flat_139 ; , default partition( iv (IDXS:_wlidx_1189_res) ): { /* empty */ } : _flat_136 ; } : genarray( new_shape, _flat_136, IDX(_wlidx_1189_res)); return( res); } /**************************************************************************** * sacprelude::sel(...) ****************************************************************************/ /* sticky */ inline double[*] sacprelude::sel( int[.] idx { } , double[*] array { } ) /* * sel :: --- */ { int _ivesplit_1198 { } ; int _wlidx_1190_res { } ; int[.] _isaa_684_array { } ; double[*] res { } ; double _flat_131 { } ; int[.] new_idx { } ; int[.] iv { } ; double{0.0...} _flat_128 { } ; int[.] _flat_129 { } ; int{0} _flat_130 { } ; int[.] new_shape { } ; int _flat_124 { } ; _isaa_684_array = _shape_A_( array); _flat_124 = _idx_shape_sel_( 0, idx); new_shape = _drop_SxV_( _flat_124, _isaa_684_array); _flat_130 = 0; _flat_129 = _mul_SxV_( _flat_130, new_shape); _flat_128 = 0.0; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_129 <= iv (IDXS:_wlidx_1190_res) < new_shape) { new_idx = _cat_VxV_( idx, iv); _ivesplit_1198 = _vect2offset_( _isaa_684_array, new_idx); _flat_131 = _idx_sel_( _ivesplit_1198, array); } : _flat_131 ; , default partition( iv (IDXS:_wlidx_1190_res) ): { /* empty */ } : _flat_128 ; } : genarray( new_shape, _flat_128, IDX(_wlidx_1190_res)); return( res); } /**************************************************************************** * sacprelude::sel(...) ****************************************************************************/ /* sticky */ inline bool[*] sacprelude::sel( int[.] idx { } , bool[*] array { } ) /* * sel :: --- */ { int _ivesplit_1199 { } ; int _wlidx_1191_res { } ; int[.] _isaa_702_array { } ; bool[*] res { } ; bool _flat_123 { } ; int[.] new_idx { } ; int[.] iv { } ; bool{0} _flat_120 { } ; int[.] _flat_121 { } ; int{0} _flat_122 { } ; int[.] new_shape { } ; int _flat_116 { } ; _isaa_702_array = _shape_A_( array); _flat_116 = _idx_shape_sel_( 0, idx); new_shape = _drop_SxV_( _flat_116, _isaa_702_array); _flat_122 = 0; _flat_121 = _mul_SxV_( _flat_122, new_shape); _flat_120 = false; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_121 <= iv (IDXS:_wlidx_1191_res) < new_shape) { new_idx = _cat_VxV_( idx, iv); _ivesplit_1199 = _vect2offset_( _isaa_702_array, new_idx); _flat_123 = _idx_sel_( _ivesplit_1199, array); } : _flat_123 ; , default partition( iv (IDXS:_wlidx_1191_res) ): { /* empty */ } : _flat_120 ; } : genarray( new_shape, _flat_120, IDX(_wlidx_1191_res)); return( res); } /**************************************************************************** * sacprelude::sel(...) ****************************************************************************/ /* sticky */ inline char[*] sacprelude::sel( int[.] idx { } , char[*] array { } ) /* * sel :: --- */ { int _ivesplit_1200 { } ; int _wlidx_1192_res { } ; int[.] _isaa_720_array { } ; char[*] res { } ; char _flat_115 { } ; int[.] new_idx { } ; int[.] iv { } ; char{ } _flat_112 { } ; int[.] _flat_113 { } ; int{0} _flat_114 { } ; int[.] new_shape { } ; int _flat_108 { } ; _isaa_720_array = _shape_A_( array); _flat_108 = _idx_shape_sel_( 0, idx); new_shape = _drop_SxV_( _flat_108, _isaa_720_array); _flat_114 = 0; _flat_113 = _mul_SxV_( _flat_114, new_shape); _flat_112 = ' '; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_113 <= iv (IDXS:_wlidx_1192_res) < new_shape) { new_idx = _cat_VxV_( idx, iv); _ivesplit_1200 = _vect2offset_( _isaa_720_array, new_idx); _flat_115 = _idx_sel_( _ivesplit_1200, array); } : _flat_115 ; , default partition( iv (IDXS:_wlidx_1192_res) ): { /* empty */ } : _flat_112 ; } : genarray( new_shape, _flat_112, IDX(_wlidx_1192_res)); return( res); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline int{0} sacprelude::zero( int[*] A { } ) /* * zero :: --- */ { int{0} _flat_107 { } ; _flat_107 = 0; return( _flat_107); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline double{0.0...} sacprelude::zero( double[*] A { } ) /* * zero :: --- */ { double{0.0...} _flat_106 { } ; _flat_106 = 0.0; return( _flat_106); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline float{0.0...} sacprelude::zero( float[*] A { } ) /* * zero :: --- */ { float{0.0...} _flat_105 { } ; _flat_105 = 0.0f; return( _flat_105); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline char{ } sacprelude::zero( char[*] A { } ) /* * zero :: --- */ { char{ } _flat_104 { } ; _flat_104 = ' '; return( _flat_104); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline bool{0} sacprelude::zero( bool[*] A { } ) /* * zero :: --- */ { bool{0} _flat_103 { } ; _flat_103 = false; return( _flat_103); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline byte{} sacprelude::zero( byte[*] A { } ) /* * zero :: --- */ { byte{} _flat_102 { } ; _flat_102 = 0; return( _flat_102); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline short{0} sacprelude::zero( short[*] A { } ) /* * zero :: --- */ { short{0} _flat_101 { } ; _flat_101 = 0; return( _flat_101); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline long{0} sacprelude::zero( long[*] A { } ) /* * zero :: --- */ { long{0} _flat_100 { } ; _flat_100 = 0; return( _flat_100); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline longlong{0} sacprelude::zero( longlong[*] A { } ) /* * zero :: --- */ { longlong{0} _flat_99 { } ; _flat_99 = 0LL; return( _flat_99); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline ubyte{} sacprelude::zero( ubyte[*] A { } ) /* * zero :: --- */ { ubyte{} _flat_98 { } ; _flat_98 = 0; return( _flat_98); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline ushort{0} sacprelude::zero( ushort[*] A { } ) /* * zero :: --- */ { ushort{0} _flat_97 { } ; _flat_97 = 0; return( _flat_97); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline uint{0} sacprelude::zero( uint[*] A { } ) /* * zero :: --- */ { uint{0} _flat_96 { } ; _flat_96 = 0; return( _flat_96); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline ulong{0} sacprelude::zero( ulong[*] A { } ) /* * zero :: --- */ { ulong{0} _flat_95 { } ; _flat_95 = 0; return( _flat_95); } /**************************************************************************** * sacprelude::zero(...) ****************************************************************************/ /* sticky */ inline ulonglong{0} sacprelude::zero( ulonglong[*] A { } ) /* * zero :: --- */ { ulonglong{0} _flat_94 { } ; _flat_94 = 0ULL; return( _flat_94); } /**************************************************************************** * sacprelude::eq(...) ****************************************************************************/ /* sticky */ inline bool sacprelude::eq( int[*] A { } , int[*] B { } ) /* * eq :: --- */ { int _ivesplit_1202 { } ; int _ivesplit_1201 { } ; int[.] _isaa_783_A { } ; int[.] _isaa_780_B { } ; int _ctz_493 { } ; bool _pinl_448__flat_93 { } ; bool _ea_312_res { } ; bool res { } ; bool _flat_90 { } ; int _flat_91 { } ; int _flat_92 { } ; int[.] iv { } ; bool{1} _flat_85 { } ; int[.] _flat_86 { } ; int{0} _flat_87 { } ; _isaa_780_B = _shape_A_( B); _isaa_783_A = _shape_A_( A); _flat_87 = 0; _flat_86 = _mul_SxV_( _flat_87, _isaa_783_A); _flat_85 = true; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_86 <= iv < _isaa_783_A) { _ea_312_res = _accu_( iv); _ivesplit_1201 = _vect2offset_( _isaa_780_B, iv); _flat_92 = _idx_sel_( _ivesplit_1201, B); _ivesplit_1202 = _vect2offset_( _isaa_783_A, iv); _flat_91 = _idx_sel_( _ivesplit_1202, A); _ctz_493 = _sub_SxS_( _flat_91, _flat_92); _flat_90 = _eq_SxS_( _ctz_493, _flat_87); _pinl_448__flat_93 = _and_SxS_( _ea_312_res, _flat_90); } : _pinl_448__flat_93 ; } : fold( sacprelude::and, _flat_85); return( res); } /**************************************************************************** * sacprelude::eq(...) ****************************************************************************/ /* sticky */ inline bool sacprelude::eq( float[*] A { } , float[*] B { } ) /* * eq :: --- */ { int _ivesplit_1204 { } ; int _ivesplit_1203 { } ; int[.] _isaa_791_A { } ; int[.] _isaa_788_B { } ; float _ctz_496 { } ; float{0.0...} _ctz_497 { } ; bool _pinl_449__flat_93 { } ; bool _ea_314_res { } ; bool res { } ; bool _flat_82 { } ; float _flat_83 { } ; float _flat_84 { } ; int[.] iv { } ; bool{1} _flat_77 { } ; int[.] _flat_78 { } ; int{0} _flat_79 { } ; _isaa_788_B = _shape_A_( B); _isaa_791_A = _shape_A_( A); _flat_79 = 0; _flat_78 = _mul_SxV_( _flat_79, _isaa_791_A); _flat_77 = true; _ctz_497 = 0.0f; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_78 <= iv < _isaa_791_A) { _ea_314_res = _accu_( iv); _ivesplit_1203 = _vect2offset_( _isaa_788_B, iv); _flat_84 = _idx_sel_( _ivesplit_1203, B); _ivesplit_1204 = _vect2offset_( _isaa_791_A, iv); _flat_83 = _idx_sel_( _ivesplit_1204, A); _ctz_496 = _sub_SxS_( _flat_83, _flat_84); _flat_82 = _eq_SxS_( _ctz_496, _ctz_497); _pinl_449__flat_93 = _and_SxS_( _ea_314_res, _flat_82); } : _pinl_449__flat_93 ; } : fold( sacprelude::and, _flat_77); return( res); } /**************************************************************************** * sacprelude::eq(...) ****************************************************************************/ /* sticky */ inline bool sacprelude::eq( double[*] A { } , double[*] B { } ) /* * eq :: --- */ { int _ivesplit_1206 { } ; int _ivesplit_1205 { } ; int[.] _isaa_799_A { } ; int[.] _isaa_796_B { } ; double _ctz_499 { } ; double{0.0...} _ctz_500 { } ; bool _pinl_450__flat_93 { } ; bool _ea_316_res { } ; bool res { } ; bool _flat_74 { } ; double _flat_75 { } ; double _flat_76 { } ; int[.] iv { } ; bool{1} _flat_69 { } ; int[.] _flat_70 { } ; int{0} _flat_71 { } ; _isaa_796_B = _shape_A_( B); _isaa_799_A = _shape_A_( A); _flat_71 = 0; _flat_70 = _mul_SxV_( _flat_71, _isaa_799_A); _flat_69 = true; _ctz_500 = 0.0; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_70 <= iv < _isaa_799_A) { _ea_316_res = _accu_( iv); _ivesplit_1205 = _vect2offset_( _isaa_796_B, iv); _flat_76 = _idx_sel_( _ivesplit_1205, B); _ivesplit_1206 = _vect2offset_( _isaa_799_A, iv); _flat_75 = _idx_sel_( _ivesplit_1206, A); _ctz_499 = _sub_SxS_( _flat_75, _flat_76); _flat_74 = _eq_SxS_( _ctz_499, _ctz_500); _pinl_450__flat_93 = _and_SxS_( _ea_316_res, _flat_74); } : _pinl_450__flat_93 ; } : fold( sacprelude::and, _flat_69); return( res); } /**************************************************************************** * sacprelude::eq(...) ****************************************************************************/ /* sticky */ inline bool sacprelude::eq( bool[*] A { } , bool[*] B { } ) /* * eq :: --- */ { int _ivesplit_1208 { } ; int _ivesplit_1207 { } ; int[.] _isaa_807_A { } ; int[.] _isaa_804_B { } ; bool _pinl_451__flat_93 { } ; bool _ea_318_res { } ; bool res { } ; bool _flat_66 { } ; bool _flat_67 { } ; bool _flat_68 { } ; int[.] iv { } ; bool{1} _flat_61 { } ; int[.] _flat_62 { } ; int{0} _flat_63 { } ; _isaa_804_B = _shape_A_( B); _isaa_807_A = _shape_A_( A); _flat_63 = 0; _flat_62 = _mul_SxV_( _flat_63, _isaa_807_A); _flat_61 = true; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_62 <= iv < _isaa_807_A) { _ea_318_res = _accu_( iv); _ivesplit_1207 = _vect2offset_( _isaa_804_B, iv); _flat_68 = _idx_sel_( _ivesplit_1207, B); _ivesplit_1208 = _vect2offset_( _isaa_807_A, iv); _flat_67 = _idx_sel_( _ivesplit_1208, A); _flat_66 = _eq_SxS_( _flat_67, _flat_68); _pinl_451__flat_93 = _and_SxS_( _ea_318_res, _flat_66); } : _pinl_451__flat_93 ; } : fold( sacprelude::and, _flat_61); return( res); } /**************************************************************************** * sacprelude::eq(...) ****************************************************************************/ /* sticky */ inline bool sacprelude::eq( char[*] A { } , char[*] B { } ) /* * eq :: --- */ { int _ivesplit_1210 { } ; int _ivesplit_1209 { } ; int[.] _isaa_815_A { } ; int[.] _isaa_812_B { } ; bool _pinl_452__flat_93 { } ; bool _ea_320_res { } ; bool res { } ; bool _flat_58 { } ; char _flat_59 { } ; char _flat_60 { } ; int[.] iv { } ; bool{1} _flat_53 { } ; int[.] _flat_54 { } ; int{0} _flat_55 { } ; _isaa_812_B = _shape_A_( B); _isaa_815_A = _shape_A_( A); _flat_55 = 0; _flat_54 = _mul_SxV_( _flat_55, _isaa_815_A); _flat_53 = true; res = with /** REFERENCED: 1 (total num refs) **/ { (_flat_54 <= iv < _isaa_815_A) { _ea_320_res = _accu_( iv); _ivesplit_1209 = _vect2offset_( _isaa_812_B, iv); _flat_60 = _idx_sel_( _ivesplit_1209, B); _ivesplit_1210 = _vect2offset_( _isaa_815_A, iv); _flat_59 = _idx_sel_( _ivesplit_1210, A); _flat_58 = _eq_SxS_( _flat_59, _flat_60); _pinl_452__flat_93 = _and_SxS_( _ea_320_res, _flat_58); } : _pinl_452__flat_93 ; } : fold( sacprelude::and, _flat_53); return( res); } /**************************************************************************** * sacprelude::prod(...) ****************************************************************************/ /* sticky */ inline int sacprelude::prod( int[.] v { } ) /* * prod :: --- */ { int _ivesplit_1211 { } ; int[1] _isaa_820_v { } ; int{1} _isaa_819_v { } ; int _pinl_453__flat_52 { } ; int _wlbsc_326_sc_e { } ; int _ea_322_res { } ; int res { } ; int _flat_50 { } ; int i { } ; int[1] _flat_49 { } ; _isaa_819_v = 1; _isaa_820_v = _shape_A_( v); _wlbsc_326_sc_e = _idx_shape_sel_( 0, v); res = with /** REFERENCED: 1 (total num refs) **/ { ([ 0 ] <= _flat_49=[i] < [ _wlbsc_326_sc_e ]) { _ea_322_res = _accu_( _flat_49); _ivesplit_1211 = _idxs2offset_( _isaa_820_v, i); _flat_50 = _idx_sel_( _ivesplit_1211, v); _pinl_453__flat_52 = _mul_SxS_( _ea_322_res, _flat_50); } : _pinl_453__flat_52 ; } : fold( sacprelude::*, _isaa_819_v); return( res); } /**************************************************************************** * sacprelude::partitionSlicer(...) ****************************************************************************/ /* sticky */ inline int[.], int[.], int[.], int[.] sacprelude::partitionSlicer( int[.] min { } , int[.] max { } , int axis { } , int[.] lb { } , int[.] ub { } ) /* * partitionSlicer :: --- */ { int _ivesplit_1212 { } ; int[.] new_max { } ; int[.] new_min { } ; int[.] min_upper { } ; int[.] max_lower { } ; int ub_i { } ; int _flat_25 { } ; int lb_i { } ; _ivesplit_1212 = axis; lb_i = _idx_sel_( _ivesplit_1212, lb); _flat_25 = _idx_sel_( _ivesplit_1212, ub); ub_i = _max_SxS_( lb_i, _flat_25); max_lower = _idx_modarray_AxSxS_( max, _ivesplit_1212, lb_i); min_upper = _idx_modarray_AxSxS_( min, _ivesplit_1212, ub_i); new_min = _idx_modarray_AxSxS_( min, _ivesplit_1212, lb_i); new_max = _idx_modarray_AxSxS_( max, _ivesplit_1212, ub_i); return( max_lower, min_upper, new_min, new_max); } /**************************************************************************** * sacprelude::gridFiller(...) ****************************************************************************/ /* sticky */ inline int[.], int[.], int[.] sacprelude::gridFiller( int[.] lb { } , int[.] ub { } , int[.] wdth { } , int dim { } , int[.] maxwidth { } ) /* * gridFiller :: --- */ { int _ivesplit_1218 { } ; int{0} _isaa_844_dim { } ; int[.] nmaxwidth { } ; int[.] nwidth { } ; int[.] nlb { } ; int w_dim { } ; int _flat_13 { } ; int _flat_14 { } ; int l_dim { } ; int _flat_6 { } ; int _flat_7 { } ; int _flat_9 { } ; int _flat_11 { } ; _isaa_844_dim = 0; _ivesplit_1218 = dim; _flat_11 = _idx_sel_( _ivesplit_1218, ub); _flat_9 = _idx_sel_( _ivesplit_1218, wdth); _flat_7 = _idx_sel_( _ivesplit_1218, lb); _flat_6 = _add_SxS_( _flat_7, _flat_9); l_dim = _min_SxS_( _flat_6, _flat_11); _flat_14 = _idx_sel_( _ivesplit_1218, maxwidth); _flat_13 = _sub_SxS_( _flat_14, _flat_9); w_dim = _max_SxS_( _flat_13, _isaa_844_dim); nlb = _idx_modarray_AxSxS_( lb, _ivesplit_1218, l_dim); nwidth = _idx_modarray_AxSxS_( maxwidth, _ivesplit_1218, w_dim); nmaxwidth = _idx_modarray_AxSxS_( maxwidth, _ivesplit_1218, _flat_9); return( nlb, nwidth, nmaxwidth); } /**************************************************************************** * sacprelude::partitionIntersectMax(...) ****************************************************************************/ /* sticky */ inline int[.] sacprelude::partitionIntersectMax( int[.] idxmin { } , int[.] bound1 { } ) /* * partitionIntersectMax :: --- */ { int[.] z { } ; bool[.] p { } ; int{0} _flat_3 { } ; int[.] dif { } ; dif = _sub_VxV_( idxmin, bound1); _flat_3 = 0; p = _ge_VxS_( dif, _flat_3); z = _mesh_VxVxV_( p, idxmin, bound1); return( z); } /**************************************************************************** * sacprelude::partitionIntersectMin(...) ****************************************************************************/ /* sticky */ inline int[.] sacprelude::partitionIntersectMin( int[.] idxmax { } , int[.] bound2 { } ) /* * partitionIntersectMin :: --- */ { int[.] z { } ; bool[.] p { } ; int{0} _flat_2 { } ; int[.] dif { } ; dif = _sub_VxV_( idxmax, bound2); _flat_2 = 0; p = _le_VxS_( dif, _flat_2); z = _mesh_VxVxV_( p, idxmax, bound2); return( z); } /**************************************************************************** * sacprelude::isPartitionIntersectNull(...) ****************************************************************************/ /* sticky */ inline bool[.] sacprelude::isPartitionIntersectNull( int[.] idxmin { } , int[.] idxmax { } , int[.] bound1 { } , int[.] bound2 { } ) /* * isPartitionIntersectNull :: --- */ { int[.] _ctz_510 { } ; int{0} _ctz_511 { } ; int[.] _ctz_508 { } ; bool[.] z { } ; bool[.] _flat_4 { } ; bool[.] _flat_5 { } ; _ctz_510 = _sub_VxV_( idxmin, bound2); _ctz_511 = 0; _flat_5 = _ge_VxS_( _ctz_510, _ctz_511); _ctz_508 = _sub_VxV_( idxmax, bound1); _flat_4 = _le_VxS_( _ctz_508, _ctz_511); z = _or_VxV_( _flat_4, _flat_5); return( z); } /**************************************************************************** * sacprelude::*(...) ****************************************************************************/ inline int sacprelude::*( int a { } , int b { } ) /* * * :: --- */ { int _flat_52 { } ; _flat_52 = _mul_SxS_( a, b); return( _flat_52); } /**************************************************************************** * sacprelude::and(...) ****************************************************************************/ inline bool sacprelude::and( bool a { } , bool b { } ) /* * and :: --- */ { bool _flat_93 { } ; _flat_93 = _and_SxS_( a, b); return( _flat_93); } -----------------------------------------------