// ************************************************************************** // // // // eses eses // // eses eses // // eses eseses esesese eses Embedded Systems Group // // ese ese ese ese ese // // ese eseseses eseseses ese Department of Computer Science // // eses eses ese eses // // eses eseses eseseses eses University of Kaiserslautern // // eses eses // // // // ************************************************************************** // [256]nat x; thread ParallelPrefixTree_256 { // up-level 0 x[1] = x[0] + x[1]; x[3] = x[2] + x[3]; x[5] = x[4] + x[5]; x[7] = x[6] + x[7]; x[9] = x[8] + x[9]; x[11] = x[10] + x[11]; x[13] = x[12] + x[13]; x[15] = x[14] + x[15]; x[17] = x[16] + x[17]; x[19] = x[18] + x[19]; x[21] = x[20] + x[21]; x[23] = x[22] + x[23]; x[25] = x[24] + x[25]; x[27] = x[26] + x[27]; x[29] = x[28] + x[29]; x[31] = x[30] + x[31]; x[33] = x[32] + x[33]; x[35] = x[34] + x[35]; x[37] = x[36] + x[37]; x[39] = x[38] + x[39]; x[41] = x[40] + x[41]; x[43] = x[42] + x[43]; x[45] = x[44] + x[45]; x[47] = x[46] + x[47]; x[49] = x[48] + x[49]; x[51] = x[50] + x[51]; x[53] = x[52] + x[53]; x[55] = x[54] + x[55]; x[57] = x[56] + x[57]; x[59] = x[58] + x[59]; x[61] = x[60] + x[61]; x[63] = x[62] + x[63]; x[65] = x[64] + x[65]; x[67] = x[66] + x[67]; x[69] = x[68] + x[69]; x[71] = x[70] + x[71]; x[73] = x[72] + x[73]; x[75] = x[74] + x[75]; x[77] = x[76] + x[77]; x[79] = x[78] + x[79]; x[81] = x[80] + x[81]; x[83] = x[82] + x[83]; x[85] = x[84] + x[85]; x[87] = x[86] + x[87]; x[89] = x[88] + x[89]; x[91] = x[90] + x[91]; x[93] = x[92] + x[93]; x[95] = x[94] + x[95]; x[97] = x[96] + x[97]; x[99] = x[98] + x[99]; x[101] = x[100] + x[101]; x[103] = x[102] + x[103]; x[105] = x[104] + x[105]; x[107] = x[106] + x[107]; x[109] = x[108] + x[109]; x[111] = x[110] + x[111]; x[113] = x[112] + x[113]; x[115] = x[114] + x[115]; x[117] = x[116] + x[117]; x[119] = x[118] + x[119]; x[121] = x[120] + x[121]; x[123] = x[122] + x[123]; x[125] = x[124] + x[125]; x[127] = x[126] + x[127]; x[129] = x[128] + x[129]; x[131] = x[130] + x[131]; x[133] = x[132] + x[133]; x[135] = x[134] + x[135]; x[137] = x[136] + x[137]; x[139] = x[138] + x[139]; x[141] = x[140] + x[141]; x[143] = x[142] + x[143]; x[145] = x[144] + x[145]; x[147] = x[146] + x[147]; x[149] = x[148] + x[149]; x[151] = x[150] + x[151]; x[153] = x[152] + x[153]; x[155] = x[154] + x[155]; x[157] = x[156] + x[157]; x[159] = x[158] + x[159]; x[161] = x[160] + x[161]; x[163] = x[162] + x[163]; x[165] = x[164] + x[165]; x[167] = x[166] + x[167]; x[169] = x[168] + x[169]; x[171] = x[170] + x[171]; x[173] = x[172] + x[173]; x[175] = x[174] + x[175]; x[177] = x[176] + x[177]; x[179] = x[178] + x[179]; x[181] = x[180] + x[181]; x[183] = x[182] + x[183]; x[185] = x[184] + x[185]; x[187] = x[186] + x[187]; x[189] = x[188] + x[189]; x[191] = x[190] + x[191]; x[193] = x[192] + x[193]; x[195] = x[194] + x[195]; x[197] = x[196] + x[197]; x[199] = x[198] + x[199]; x[201] = x[200] + x[201]; x[203] = x[202] + x[203]; x[205] = x[204] + x[205]; x[207] = x[206] + x[207]; x[209] = x[208] + x[209]; x[211] = x[210] + x[211]; x[213] = x[212] + x[213]; x[215] = x[214] + x[215]; x[217] = x[216] + x[217]; x[219] = x[218] + x[219]; x[221] = x[220] + x[221]; x[223] = x[222] + x[223]; x[225] = x[224] + x[225]; x[227] = x[226] + x[227]; x[229] = x[228] + x[229]; x[231] = x[230] + x[231]; x[233] = x[232] + x[233]; x[235] = x[234] + x[235]; x[237] = x[236] + x[237]; x[239] = x[238] + x[239]; x[241] = x[240] + x[241]; x[243] = x[242] + x[243]; x[245] = x[244] + x[245]; x[247] = x[246] + x[247]; x[249] = x[248] + x[249]; x[251] = x[250] + x[251]; x[253] = x[252] + x[253]; x[255] = x[254] + x[255]; // up-level 1 x[3] = x[1] + x[3]; x[7] = x[5] + x[7]; x[11] = x[9] + x[11]; x[15] = x[13] + x[15]; x[19] = x[17] + x[19]; x[23] = x[21] + x[23]; x[27] = x[25] + x[27]; x[31] = x[29] + x[31]; x[35] = x[33] + x[35]; x[39] = x[37] + x[39]; x[43] = x[41] + x[43]; x[47] = x[45] + x[47]; x[51] = x[49] + x[51]; x[55] = x[53] + x[55]; x[59] = x[57] + x[59]; x[63] = x[61] + x[63]; x[67] = x[65] + x[67]; x[71] = x[69] + x[71]; x[75] = x[73] + x[75]; x[79] = x[77] + x[79]; x[83] = x[81] + x[83]; x[87] = x[85] + x[87]; x[91] = x[89] + x[91]; x[95] = x[93] + x[95]; x[99] = x[97] + x[99]; x[103] = x[101] + x[103]; x[107] = x[105] + x[107]; x[111] = x[109] + x[111]; x[115] = x[113] + x[115]; x[119] = x[117] + x[119]; x[123] = x[121] + x[123]; x[127] = x[125] + x[127]; x[131] = x[129] + x[131]; x[135] = x[133] + x[135]; x[139] = x[137] + x[139]; x[143] = x[141] + x[143]; x[147] = x[145] + x[147]; x[151] = x[149] + x[151]; x[155] = x[153] + x[155]; x[159] = x[157] + x[159]; x[163] = x[161] + x[163]; x[167] = x[165] + x[167]; x[171] = x[169] + x[171]; x[175] = x[173] + x[175]; x[179] = x[177] + x[179]; x[183] = x[181] + x[183]; x[187] = x[185] + x[187]; x[191] = x[189] + x[191]; x[195] = x[193] + x[195]; x[199] = x[197] + x[199]; x[203] = x[201] + x[203]; x[207] = x[205] + x[207]; x[211] = x[209] + x[211]; x[215] = x[213] + x[215]; x[219] = x[217] + x[219]; x[223] = x[221] + x[223]; x[227] = x[225] + x[227]; x[231] = x[229] + x[231]; x[235] = x[233] + x[235]; x[239] = x[237] + x[239]; x[243] = x[241] + x[243]; x[247] = x[245] + x[247]; x[251] = x[249] + x[251]; x[255] = x[253] + x[255]; // up-level 2 x[7] = x[3] + x[7]; x[15] = x[11] + x[15]; x[23] = x[19] + x[23]; x[31] = x[27] + x[31]; x[39] = x[35] + x[39]; x[47] = x[43] + x[47]; x[55] = x[51] + x[55]; x[63] = x[59] + x[63]; x[71] = x[67] + x[71]; x[79] = x[75] + x[79]; x[87] = x[83] + x[87]; x[95] = x[91] + x[95]; x[103] = x[99] + x[103]; x[111] = x[107] + x[111]; x[119] = x[115] + x[119]; x[127] = x[123] + x[127]; x[135] = x[131] + x[135]; x[143] = x[139] + x[143]; x[151] = x[147] + x[151]; x[159] = x[155] + x[159]; x[167] = x[163] + x[167]; x[175] = x[171] + x[175]; x[183] = x[179] + x[183]; x[191] = x[187] + x[191]; x[199] = x[195] + x[199]; x[207] = x[203] + x[207]; x[215] = x[211] + x[215]; x[223] = x[219] + x[223]; x[231] = x[227] + x[231]; x[239] = x[235] + x[239]; x[247] = x[243] + x[247]; x[255] = x[251] + x[255]; // up-level 3 x[15] = x[7] + x[15]; x[31] = x[23] + x[31]; x[47] = x[39] + x[47]; x[63] = x[55] + x[63]; x[79] = x[71] + x[79]; x[95] = x[87] + x[95]; x[111] = x[103] + x[111]; x[127] = x[119] + x[127]; x[143] = x[135] + x[143]; x[159] = x[151] + x[159]; x[175] = x[167] + x[175]; x[191] = x[183] + x[191]; x[207] = x[199] + x[207]; x[223] = x[215] + x[223]; x[239] = x[231] + x[239]; x[255] = x[247] + x[255]; // up-level 4 x[31] = x[15] + x[31]; x[63] = x[47] + x[63]; x[95] = x[79] + x[95]; x[127] = x[111] + x[127]; x[159] = x[143] + x[159]; x[191] = x[175] + x[191]; x[223] = x[207] + x[223]; x[255] = x[239] + x[255]; // up-level 5 x[63] = x[31] + x[63]; x[127] = x[95] + x[127]; x[191] = x[159] + x[191]; x[255] = x[223] + x[255]; // up-level 6 x[127] = x[63] + x[127]; x[255] = x[191] + x[255]; // up-level 7 x[255] = x[127] + x[255]; // up-level 8 // down-level 9 // down-level 10 x[191] = x[127] + x[191]; // down-level 11 x[95] = x[63] + x[95]; x[159] = x[127] + x[159]; x[223] = x[191] + x[223]; // down-level 12 x[47] = x[31] + x[47]; x[79] = x[63] + x[79]; x[111] = x[95] + x[111]; x[143] = x[127] + x[143]; x[175] = x[159] + x[175]; x[207] = x[191] + x[207]; x[239] = x[223] + x[239]; // down-level 13 x[23] = x[15] + x[23]; x[39] = x[31] + x[39]; x[55] = x[47] + x[55]; x[71] = x[63] + x[71]; x[87] = x[79] + x[87]; x[103] = x[95] + x[103]; x[119] = x[111] + x[119]; x[135] = x[127] + x[135]; x[151] = x[143] + x[151]; x[167] = x[159] + x[167]; x[183] = x[175] + x[183]; x[199] = x[191] + x[199]; x[215] = x[207] + x[215]; x[231] = x[223] + x[231]; x[247] = x[239] + x[247]; // down-level 14 x[11] = x[7] + x[11]; x[19] = x[15] + x[19]; x[27] = x[23] + x[27]; x[35] = x[31] + x[35]; x[43] = x[39] + x[43]; x[51] = x[47] + x[51]; x[59] = x[55] + x[59]; x[67] = x[63] + x[67]; x[75] = x[71] + x[75]; x[83] = x[79] + x[83]; x[91] = x[87] + x[91]; x[99] = x[95] + x[99]; x[107] = x[103] + x[107]; x[115] = x[111] + x[115]; x[123] = x[119] + x[123]; x[131] = x[127] + x[131]; x[139] = x[135] + x[139]; x[147] = x[143] + x[147]; x[155] = x[151] + x[155]; x[163] = x[159] + x[163]; x[171] = x[167] + x[171]; x[179] = x[175] + x[179]; x[187] = x[183] + x[187]; x[195] = x[191] + x[195]; x[203] = x[199] + x[203]; x[211] = x[207] + x[211]; x[219] = x[215] + x[219]; x[227] = x[223] + x[227]; x[235] = x[231] + x[235]; x[243] = x[239] + x[243]; x[251] = x[247] + x[251]; // down-level 15 x[5] = x[3] + x[5]; x[9] = x[7] + x[9]; x[13] = x[11] + x[13]; x[17] = x[15] + x[17]; x[21] = x[19] + x[21]; x[25] = x[23] + x[25]; x[29] = x[27] + x[29]; x[33] = x[31] + x[33]; x[37] = x[35] + x[37]; x[41] = x[39] + x[41]; x[45] = x[43] + x[45]; x[49] = x[47] + x[49]; x[53] = x[51] + x[53]; x[57] = x[55] + x[57]; x[61] = x[59] + x[61]; x[65] = x[63] + x[65]; x[69] = x[67] + x[69]; x[73] = x[71] + x[73]; x[77] = x[75] + x[77]; x[81] = x[79] + x[81]; x[85] = x[83] + x[85]; x[89] = x[87] + x[89]; x[93] = x[91] + x[93]; x[97] = x[95] + x[97]; x[101] = x[99] + x[101]; x[105] = x[103] + x[105]; x[109] = x[107] + x[109]; x[113] = x[111] + x[113]; x[117] = x[115] + x[117]; x[121] = x[119] + x[121]; x[125] = x[123] + x[125]; x[129] = x[127] + x[129]; x[133] = x[131] + x[133]; x[137] = x[135] + x[137]; x[141] = x[139] + x[141]; x[145] = x[143] + x[145]; x[149] = x[147] + x[149]; x[153] = x[151] + x[153]; x[157] = x[155] + x[157]; x[161] = x[159] + x[161]; x[165] = x[163] + x[165]; x[169] = x[167] + x[169]; x[173] = x[171] + x[173]; x[177] = x[175] + x[177]; x[181] = x[179] + x[181]; x[185] = x[183] + x[185]; x[189] = x[187] + x[189]; x[193] = x[191] + x[193]; x[197] = x[195] + x[197]; x[201] = x[199] + x[201]; x[205] = x[203] + x[205]; x[209] = x[207] + x[209]; x[213] = x[211] + x[213]; x[217] = x[215] + x[217]; x[221] = x[219] + x[221]; x[225] = x[223] + x[225]; x[229] = x[227] + x[229]; x[233] = x[231] + x[233]; x[237] = x[235] + x[237]; x[241] = x[239] + x[241]; x[245] = x[243] + x[245]; x[249] = x[247] + x[249]; x[253] = x[251] + x[253]; // down-level 16 x[2] = x[1] + x[2]; x[4] = x[3] + x[4]; x[6] = x[5] + x[6]; x[8] = x[7] + x[8]; x[10] = x[9] + x[10]; x[12] = x[11] + x[12]; x[14] = x[13] + x[14]; x[16] = x[15] + x[16]; x[18] = x[17] + x[18]; x[20] = x[19] + x[20]; x[22] = x[21] + x[22]; x[24] = x[23] + x[24]; x[26] = x[25] + x[26]; x[28] = x[27] + x[28]; x[30] = x[29] + x[30]; x[32] = x[31] + x[32]; x[34] = x[33] + x[34]; x[36] = x[35] + x[36]; x[38] = x[37] + x[38]; x[40] = x[39] + x[40]; x[42] = x[41] + x[42]; x[44] = x[43] + x[44]; x[46] = x[45] + x[46]; x[48] = x[47] + x[48]; x[50] = x[49] + x[50]; x[52] = x[51] + x[52]; x[54] = x[53] + x[54]; x[56] = x[55] + x[56]; x[58] = x[57] + x[58]; x[60] = x[59] + x[60]; x[62] = x[61] + x[62]; x[64] = x[63] + x[64]; x[66] = x[65] + x[66]; x[68] = x[67] + x[68]; x[70] = x[69] + x[70]; x[72] = x[71] + x[72]; x[74] = x[73] + x[74]; x[76] = x[75] + x[76]; x[78] = x[77] + x[78]; x[80] = x[79] + x[80]; x[82] = x[81] + x[82]; x[84] = x[83] + x[84]; x[86] = x[85] + x[86]; x[88] = x[87] + x[88]; x[90] = x[89] + x[90]; x[92] = x[91] + x[92]; x[94] = x[93] + x[94]; x[96] = x[95] + x[96]; x[98] = x[97] + x[98]; x[100] = x[99] + x[100]; x[102] = x[101] + x[102]; x[104] = x[103] + x[104]; x[106] = x[105] + x[106]; x[108] = x[107] + x[108]; x[110] = x[109] + x[110]; x[112] = x[111] + x[112]; x[114] = x[113] + x[114]; x[116] = x[115] + x[116]; x[118] = x[117] + x[118]; x[120] = x[119] + x[120]; x[122] = x[121] + x[122]; x[124] = x[123] + x[124]; x[126] = x[125] + x[126]; x[128] = x[127] + x[128]; x[130] = x[129] + x[130]; x[132] = x[131] + x[132]; x[134] = x[133] + x[134]; x[136] = x[135] + x[136]; x[138] = x[137] + x[138]; x[140] = x[139] + x[140]; x[142] = x[141] + x[142]; x[144] = x[143] + x[144]; x[146] = x[145] + x[146]; x[148] = x[147] + x[148]; x[150] = x[149] + x[150]; x[152] = x[151] + x[152]; x[154] = x[153] + x[154]; x[156] = x[155] + x[156]; x[158] = x[157] + x[158]; x[160] = x[159] + x[160]; x[162] = x[161] + x[162]; x[164] = x[163] + x[164]; x[166] = x[165] + x[166]; x[168] = x[167] + x[168]; x[170] = x[169] + x[170]; x[172] = x[171] + x[172]; x[174] = x[173] + x[174]; x[176] = x[175] + x[176]; x[178] = x[177] + x[178]; x[180] = x[179] + x[180]; x[182] = x[181] + x[182]; x[184] = x[183] + x[184]; x[186] = x[185] + x[186]; x[188] = x[187] + x[188]; x[190] = x[189] + x[190]; x[192] = x[191] + x[192]; x[194] = x[193] + x[194]; x[196] = x[195] + x[196]; x[198] = x[197] + x[198]; x[200] = x[199] + x[200]; x[202] = x[201] + x[202]; x[204] = x[203] + x[204]; x[206] = x[205] + x[206]; x[208] = x[207] + x[208]; x[210] = x[209] + x[210]; x[212] = x[211] + x[212]; x[214] = x[213] + x[214]; x[216] = x[215] + x[216]; x[218] = x[217] + x[218]; x[220] = x[219] + x[220]; x[222] = x[221] + x[222]; x[224] = x[223] + x[224]; x[226] = x[225] + x[226]; x[228] = x[227] + x[228]; x[230] = x[229] + x[230]; x[232] = x[231] + x[232]; x[234] = x[233] + x[234]; x[236] = x[235] + x[236]; x[238] = x[237] + x[238]; x[240] = x[239] + x[240]; x[242] = x[241] + x[242]; x[244] = x[243] + x[244]; x[246] = x[245] + x[246]; x[248] = x[247] + x[248]; x[250] = x[249] + x[250]; x[252] = x[251] + x[252]; x[254] = x[253] + x[254]; }