Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • Robert MullinsJuly 7, 2009 7:21 AM PDT   
    __tm_retry (ICC Prototype STM support)

    Is there a public document that describes the STM API in detail? is "__tm_retry" part of the API? If so, what is its behaviour precisely? Many thanks for any help.


    Ravi Narayanaswamy (Intel)July 8, 2009 5:00 PM PDT
    Rate
     
    Re: __tm_retry (ICC Prototype STM support)

    Quoting - Robert Mullins
    Is there a public document that describes the STM API in detail? is "__tm_retry" part of the API? If so, what is its behaviour precisely? Many thanks for any help.

    __tm_retry is provided as an experimental language extension support in the compiler.  __tm_retry aborts the current transaction including all the outer transaction enclosing this transaction and retries the transaction starting from the outermost transaction.

    Robert MullinsJuly 9, 2009 2:28 AM PDT
    Rate
     
    Re: __tm_retry (ICC Prototype STM support)


    __tm_retry is provided as an experimental language extension support in the compiler.  __tm_retry aborts the current transaction including all the outer transaction enclosing this transaction and retries the transaction starting from the outermost transaction.
    Many thanks for your reply Ravi. 

    I assume from the behaviour of the code below that __tm_retry simply spins rather than waiting for a change in the object state? Is there a simple way around this?

    __attribute__((tm_callable))
    void Queue::enq (int v) {

    __tm_atomic {
    // queue is full
    if (count==MAX_LEN) __tm_retry;
    buf[tail]=v;
    if (++tail == MAX_LEN) tail=0;
    count++;
    }
    //  cout << "enq" << endl;
    }



    Ravi Narayanaswamy (Intel)July 9, 2009 10:28 AM PDT
    Rate
     
    Re: __tm_retry (ICC Prototype STM support)

    Quoting - Robert Mullins
    Many thanks for your reply Ravi. 

    I assume from the behaviour of the code below that __tm_retry simply spins rather than waiting for a change in the object state? Is there a simple way around this?

    __attribute__((tm_callable))
    void Queue::enq (int v) {

    __tm_atomic {
    // queue is full
    if (count==MAX_LEN) __tm_retry;
    buf[tail]=v;
    if (++tail == MAX_LEN) tail=0;
    count++;
    }
    //  cout << "enq" << endl;
    }


    __tm_retry was provided as an experimental hoping to get user feedback on the use case for this language extension.  So not much time was spend on an optimal implementation.

Forum jump:  

Intel Software Network Forums Statistics

16,376 users have contributed to 46,361 threads and 164,027 posts to date.

In the past 24 hours, we have 11 new thread(s) 29 new posts(s), and 24 new user(s).

In the past 3 days, the most popular thread for everyone has been Program compiles in release but not debug The most posts were made to You need to show us the whole The post with the most views is vectorization of sin/cos results in wrong values

Please welcome our newest member brownwatch75


For more complete information about compiler optimizations, see our Optimization Notice.