Help PLZ Parrell Prefix Sum Problem

i'm really stuck i need to write a parrell soultion to the prefix sum problem. i'm new 2 java and v.confused any help anybody can give would be major major help

STFW
http://www-2.cs.cmu.edu/afs/cs/academic/class/15251-s00/2000/Site/Materials/Lectures/lecture07/parallel.htm
Slides 26-32 shows exactly how it could be done.
- Marcus Sundman

Similar Messages

  • My iphone is locked i open the find my iphone on and reset the iphone and i forgot the email id but i remember the password plz help me sot out this problem

    i am using i4 (IMEI NO is 013265005169887 my iphone is locked i open the find my iphone on and reset the iphone and i forgot the email id but i remember the password plz help me sort out this problem
    i forgot icloud id and password but i remember the apple id and password plzzzzz help me( my contact  number is +918477889484 from India)

    Hi there sumit4,
    You may find the information in the article below helpful.
    Apple ID: How to find your Apple ID
    http://support.apple.com/kb/HT5625
    -Griff W.

  • I cant get voice over to work on my 4G shuffle it clicks off every time help plz

    i need help plz it wont work

    Hello,
    Welcome to Adobe Forums.
    Try uninstalling Adobe Flash Player from Flash Player uninstaller : http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html#main_uninstall
    Try a clean installation using this KB : http://helpx.adobe.com/content/help/en/flash-player/kb/installation-problems-flash-player- mac.html
    Thanks,
    Vikram

  • Help plz so my gf said she block me and we txt back to back but later on i sent her a messages and it said it was read so am I blocked  a

    help plz so my gf said she block me and we txt back to back but later on i sent her a messages and it said it was read so am I blocked 

    The proper way to close Firefox is through the File menu "Exit" or the equivalent with the Firefox button.
    More detail in item '''#38 Firefox already running '''
    of
    [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 look like 3.6) (#fx4interface)]
    Firefox already running, to properly shutdown Firefox when closing the last window use File → Exit/Quit (or Firefox button → Exit). Closing Firefox with the [X] in the upper right corner closes the window ("Ctrl+W") but that does not necessarily close Firefox if it has subtasks running. If you want to close and reopen Firefox use the "Restart" within Add-ons if you made a change requiring a restart, or install "[https://addons.mozilla.org/firefox/addon/restartless-restart/ Restartless Restart]" ("Ctrl+Alt+R") which will allow you to take Firefox down and restart without having to check the Windows Task Manager to see if Firefox first actually ended. [http://kb.mozillazine.org/Firefox_hangs Firefox hangs]

  • Help plz, i need back up my phone

    Help plz, i have iphone 4 i still have icloud  on my itunes and i need to update it to the new one but i dont want to lose any of my pictues of my kids im not sure if ive backed it up before if i have it would of been a long time ago plz help me thanks

    jennyspeedy* wrote:
    i dont want to lose any of my pictues of my kids im not sure if ive backed it up before if i have it would of been a long time ago plz help me thanks
    Then use the device as designed.  Copy the pictures off the device to the computer.  For any pictures that you desire to keep on the device, simply sync them via iTunes.
    Failure to copy the pictures off the device is only asking for problems.  If the device is ever lost/stolen or simply fails to work, without a backup they would be gone as well.

  • Help Plz i've blank LCD in Lenovo G530

    Help Plz i've blank LCD in Lenovo G530
    the unit is working and the power & wireless indicators is  on but the LCD is blank
    i've allready unpluged the battery and powered the unit with the charger only and plug the battery again but still have the same problem.
    so plz advice what to do ?????

    Try to plug in external monitor and look if anything shows. Then try to check monitor configuration. Maybe it is switched off...
    Regards,
    Publius
    Lenovo 3000 V200

  • LASERJET M1217 nfw MFP urgent help plz

    HAY GUYS, NEED URGENT HELP!!!!!!!!!
    My printer M1217 nfw MFP had a problem with the scanner and it was fixed bu updating the firmware and the scanner works fine and offcourse i printed the config. report  befor updating the firmware , the problem is that i lost the report and i cant config. the fax or the wirless connection . any help plz guys  

    kelsaeed wrote:
    HAY GUYS, NEED URGENT HELP!!!!!!!!!
    My printer M1217 nfw MFP had a problem with the scanner and it was fixed bu updating the firmware and the scanner works fine and offcourse i printed the config. report  befor updating the firmware , the problem is that i lost the report and i cant config. the fax or the wirless connection . any help plz guys  

  • Run Time error!!!Help plz

    hi ..
    every time i run my application i get this error which i can't understand where exactly the error is
    can any one help plz
    )at javax.swing.JLayeredPane.paint(JLayeredPane.java:546
    )at javax.swing.JComponent.paintChildren(JComponent.java:498
    )at javax.swing.JComponent.paint(JComponent.java:669
    )at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:23
    :at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java
    )54
    at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:91
    )at java.awt.Container.paint(Container.java:960
    )at javax.swing.JFrame.update(JFrame.java:329
    )at sun.awt.RepaintArea.update(RepaintArea.java:337
    )at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:200
    )at java.awt.Component.dispatchEventImpl(Component.java:2663
    )at java.awt.Container.dispatchEventImpl(Container.java:1213
    )at java.awt.Window.dispatchEventImpl(Window.java:914
    )at java.awt.Component.dispatchEvent(Component.java:2497
    )at java.awt.EventQueue.dispatchEvent(EventQueue.java:339
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    )read.java:131
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    )ad.java:98
    )at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93
    )at java.awt.EventDispatchThread.run(EventDispatchThread.java:85
    this is part of the code:
      public void actionPerformed(ActionEvent e)
        FileInputStream fis = null;
        if (e.getSource() == add) //The ADD button.
          //User has not populated all the input fields.
          if(name.getText().equals("")|| address.getText().equals("")|| phone.getText().equals("")|| sex.getText().equals("")|| dob.getText().equals("")|| photo.getText().equals(""))
            JOptionPane.showMessageDialog(null, "Please fill in all the fields","Missing Fields",JOptionPane.INFORMATION_MESSAGE);
          else
            // save the new customer:
            try
              //1. take the customer's data and photo:
              int    userId          = Integer.parseInt(id.getText());
              String userName      = name.getText();
              String userAddress      = address.getText();
              String userPhone      = phone.getText();
              String userSex      = sex.getText();
              String userDateBirth      = dob.getText();
              //String userDateBirth=Date.parse(dob);
              String photoName      = photo.getText();
              String audioName=   audio.getText();
              File   file           = new File(photoName);
              int    fileLength      = (int)file.length();
              //2. Set the user's photo into the photoHolder:
              photoHolder.setVisible(false);
              photoHolder = null;
              comments.setVisible(false);
              comments = null;
              Icon[] custPhotos = {new ImageIcon(photoName)};
              JList photosList = new JList(custPhotos);
              photosList.setFixedCellHeight(100);
              photosList.setFixedCellWidth(80);
              photoHolder = new JPanel();
              photoHolder.add(photosList);
              makeComments();
              //3. Insert the data and photo into the database:
              if(fileLength > 0)
                fis = new FileInputStream(file);
                String query = " INSERT INTO CUSTOMER VALUES('"+userId+"', '"+ userName+ "', '"+ userAddress+ "', " +" '"+ userPhone+ "', '"+ userSex+ "', '"+ userDateBirth+ "', ?,?,? ) ";
                PreparedStatement pstmt = conn.prepareStatement(query);
                pstmt.setBinaryStream(1, fis, fileLength);
                  pstmt.setString(2,photoName);
                  pstmt.setString(3,audioName);
                pstmt.executeUpdate();
                comments.setText(userName+", added.");
              else
                String query = " INSERT INTO CUSTOMER (id, name, address, phone, sex, dob) VALUES('"+userId+"', '"+userName+"', '"+userAddress+"', '"+userPhone+"', '"+userSex+"', '"+userDateBirth+"') ";
                stat.executeUpdate(query);
                comments.setText("Customer saved without a photo.");
              backPanel.add(photoHolder);
              backPanel.add(comments);
              updateTable();
              //AddScroll();
            } //try
            catch (Exception ee)
               //The danger of putting creating the JOptionPane in here is that it will show the same message regardless of the error.
                JOptionPane.showMessageDialog(null, "Customers CPR already exits!!Please enter another CPR","Invalid",JOptionPane.INFORMATION_MESSAGE);
              System.out.println("Caught exception in add action: " + ee);
              ee.printStackTrace();
            } //catch
          } //if
        }//add button

    hi...
    i got where the error is..
    now i have another problem..
    Connecting to database..
    Valid Login
    Caught updateTable exception: java.lang.ArrayIndexOutOfBoundsException
    java.lang.ArrayIndexOutOfBoundsException
    at UtilityMethods.updateTable(UtilityMethods.java:305)
    (which is this line:
    tableData[currentRow] = fieldString;)-----> i did this because one of the fields will be a Date and the others are strings
    at UtilityMethods.updateTable(UtilityMethods.java:429)
    at Login.validLogin(Login.java:114)
    at Login.actionPerformed(Login.java:80)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
    50)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1504)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:216)
    at java.awt.Component.processMouseEvent(Component.java:3715)
    at java.awt.Component.processEvent(Component.java:3544)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2593)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Window.dispatchEventImpl(Window.java:914)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    this is the code :
    void updateTable()
          ResultSet results = null;
          ResultSet results1 = null;
          try
            //Get the number of rows in the table so we know how big to make the data array..
            int rowNumbers  = 0;
            int columnCount = 6;
            results = stat.executeQuery("SELECT COUNT(*) FROM CUSTOMER ");
            if(results.next())
              rowNumbers = results.getInt(1);
            } //if
            if(rowNumbers == 0)
            rowNumbers = 1;
            tableData = new String[rowNumbers][columnCount];
            //Initialize the data array with "" so we avoid possibly having nulls in it later..
            for(int i =0;i<tableData.length;i++)
              for(int j=0;j<tableData[0].length;j++)
              tableData[i][j] = "";
            //Populate the data array with results of the query on the database..
            int currentRow = 0;
             SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
            results1 = stat.executeQuery("SELECT * FROM CUSTOMER ORDER BY ID");
            while (results1.next())
              for(int i = 0; i < columnCount; i++){
              Object field = results1.getObject(i + 1);
              // actually this next line should be put outside your loop so you don't keep creating this object
              // or whatever format you want
              String fieldString;
              if (field instanceof Date)
                     fieldString = sdf.format((Date) field);
                     else
                          fieldString = field.toString();
                          tableData[currentRow] = fieldString;
    //tableData[currentRow][i] = results1.getString(i + 1);
    currentRow++;
    } //while
    }//for
    final String[] colName = { "CPR", "Name", "Address", "Phone", "Sex", "Date OF Birth" };
    TableModel pageModel = new AbstractTableModel()
    public int getColumnCount()
    return tableData[0].length;
    } //getColumnCount
    public int getRowCount()
    return tableData.length;
    } //getRowCount
    public Object getValueAt(int row, int col)
    return tableData[row][col];
    } //getValueAt
    public String getColumnName(int column)
    return colName[column];
    } //getcolName
    public Class getColumnClass(int col)
    return getValueAt(0, col).getClass();
    } //getColumnClass
    public boolean isCellEditable(int row, int col)
    return false;
    } //isCellEditable
    public void setValueAt(String aValue, int row, int column)
    tableData[row][column] = aValue;
    } //setValueAt
    //dataTable.setValue( new JScrollBar(JScrollBar.HORIZONTAL), 2,1 );
    }; //pageModel
    //Create the JTable from the table model:
    JTable dataTable = new JTable(pageModel);
    // dataTable.setModel();

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • Random Reboot HELP PLZ

    o_0I have posted here before and still haven't been able to fix my problem.  I get these random reboots, usually when im playing games.  I was just trying to play FFXI and i had 3 reboots within an hour... Needless to say i quit.  I have checked the RAM like you said, and have looked at the power supply.  Both appear to be fine.  You have helped other people with their problems plz help me!!
    Sys. Specs:
    AMD 2600+ Athlon XP
    512 Samsung DDR 3200 RAM
    Western Digital 80GB HD
    Maxtor 80 GB HD
    Geforce FX5600
    Soundblaster Audigy LS
    Klipsch Pro Media 5.1 Ultra
    Samsung 8X DVD ROM
    NEC 12X CD Writer
    Windows XP SP1 Fully updated
    Latest drivers for gforce and audigy

    When you start off your post with this   and demand help because other people have been helped, It tends to make a person not want to help. People on these Forums including the moderators are all volunteers who love to try to help people who are not rude. Maybe you might want to consider another approach.  

  • I need your help plz

    Hi every one
    I have one form depend on table for client details (code , name ,tel,address , ,,,,,)
    I need to
    when try to entering (name or code ) for one client system must
    check if this name Already exists then do query to get other data for this client and doesn't enter new record
    but if this name doesn't exist then
    enter this data as new record
    plz help me to solve this problem with any solve or work around or any thing

    You can query data and also at the same time validate for example if a client exists, in a WHEN-VALIDATE-ITEM of an item do this:
    BEGIN
         SELECT NAME
         INTO :CLIENTS.NAME
         FROM CLIENTS
         WHERE CODE_CLIENT = :CLIENTS.CODE_CLIENT;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         MESSAGE('NO CLIENT FOUND');
         MESSAGE(' ');
         RAISE FORM_TRIGGER_FAILURE;
    END;the RAISE FORM_TRIGGER_FAILURE is optional.
    Regards
    Carlos

  • HELP plz..How to send response from server to client

    Hi..plz help me out of this problem..i am sending request from client side to servlet..lets say i am sendin "Bechkam"..now my servlet fetches this request.n finds out that BECHKAM is a football player..now i dont want to print this on the client side..i simply want to sent this response back to the client..after client receives this response the client should print bechkam is a football player..i have done coding of sending request from client(javascript code)to server but dont kno how to send response to client..do i have to use cookies or sessions..
    Any help will be greatly appreciated
    THANX

    I'm not sure how well versed you're with HTTP and servlets.
    What you term as 'printing on the client side' is in fact the response you're looking for. The response you send from a servlet is 'printed' into the response stream. The client receives this data and interprets is according to some headers. Usually, this data is HTML/ plain text which is interpreted by the browser and rendered as required. It could very well be displayed as is.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Videos Won't Got To i-pod... help plz.

    I just downloaded i-tunes 7, and the first time I try updating my music, more than half of my tv shows will not show up on my i-pod... Anyone else having this problem? Help plz!
    PC   Windows XP  

    I am having the same problem along with a host of others. Please help if you can.

  • X48c platinum board help plz

    dear i have X48c platinum board today i have face a problem .my computer wont start up it always hang after start when i push the button to start the pc after 5 seconds  pushing the button my computer hang up what should i do  i have reset the motherboard but in vain plz help me out form this problem  the everything is working in 5 seconds and after 5 second everything is sotp working even keyboard also stop working

    >>Posting Guide<<

  • Need help plz my iphone is stuck in a reboot loop

    my iphone is stuck in a reboot loop i cant get it to stop itunes dose not detect
    my iphone so i can restore it i don't know what to do plz help

    I am experiencing the same problem, and i have attempted NO jailbreak or other iphone hacked software. My screen will slowly fade to white, and then go into an endless reboot cycle, or just glow bright white til the battery dies. I have tried restoring with itunes via recovery, and i receive error (2003).
    (EDIT)
    I successfully restored my iphone, and it worked GREAT! until i removed it from the cradle, and my screen jumped straight to apple logo, descending into the bottomless pit of reboot cycles.
    Message was edited by: detri

Maybe you are looking for