Blog Posts

Statistics: Blogs: 33 Blog Posts: 239   1 2 3 ... 16 Previous Next
Items per page
0


We have recently announced the following 3 new compiler products on System z:

Enterprise COBOL for z/OS v4.2 (GA: Aug. 28, 2009)http://www.ibm.com/software/awdtools/cobol

Product Highlights:

  • Improved support for processing of XML documents
    • Enable validation of XML document against a schema while it processed by the COBOL application
    • Support offloading of XML parsing to zAAP specialty processors
    • Provide significant performance improvement when using z/OS XML System Services parser
  • Improved usability
    • Underscore now supported in user-defined words and program name literals
    • New option to allow customization of severity for Compiler messages
  • Improved support for middleware and tools
    • Support CICS v4.1
    • Added capability to show CICS options in listings
  • Support more Java versions to enable integration of COBOL applications with Web applications
    • Added support for Java 5 and Java 6

z/OS XL C/C++ v1.11 (GA: Sep. 25, 2009)

http://www-01.ibm.com/software/awdtools/czos/

Product Highlights:

  • Improved Performance
    • Improved overall SPECint2006 performance by 8.7%
    • Improved memory optimization features and inline C++ destructor
  • Provide system programming capabilities
    • METAL C Compiler option
  • Support latest Middleware and tools
    • Improved readability of listings (qskipsrc)
    • Support debugging on production systems where original source is not available
    • Produce pseudo-C listing to aid debugging of optimized code (-qreport)

Enterprise PL/I for z/OS v3.9 (GA: Oct 30, 2009)

http://www-01.ibm.com/software/awdtools/pli/plizos/

  • Provide more exploitation of recent hardware
    • Inline conversions amongst UTF-8, UTF-16 and UTF-32
    • Improved support for internationalization
    • Improved null pointer usage with compare-and-trap instruction
  • Improved I/O capability
    • Support of LRECL=X for QSAM files with records > 32K
    • Support of dynamic file allocation
  • Improved support for latest Middleware and tools
    • Added Block scoping to the integrated SQL and CICS preprocessors
    • Enhanced IPCS support for easier and faster problem resolution
  • Addressed many user requirements, including
    • Improved performance in array and bit assignments
    • Enabled feature to allow easy compiling out of code with comments
    • Provided more RULES suboptions to enforce coding standards
    • Added compiler message to identify expensive statements to help tune application performance
    • Added compiler messages to flag poor and/or dangerous code to improve maintainability
    • Support for additional common European date formats

For more information on our new products, please visit the Enterprise modernization for System z solution webpage: http://www-01.ibm.com/software/rational/solutions/em/systems/z/

If you were unable to join us at webcast titled " Compilation technology optimizes investment on System z", the replay is now available at: http://www-01.ibm.com/software/os/systemz/telecon/nov11/

A podcast on these new compilers is also available on the on the Rational Talks to You page. Look for #79.


0 Comments Permalink
0

I get this question a lot: "can I set the set the Date field for a line or selection of lines in the Remote Systems LPEX Editor". The good news is that it's possible. The not so bad news is that you have to setup some simple preferences to make this happen.

First, to show the Date field in the LPEX Editor you need to right click in the editor and select Source > Show Date Area. You can also set the Show date area preference on the Remote Systems > Remote Systems LPEX Editor preference page so you don't have to do this every time you open a member.

LPEX ships a bunch of sample actions, one of which is setDate. This is the action that can set the date field for a line or selection of lines. Here are the steps to set this up:

1. Open the preferences dialog (Window > Preferences).

2. Switch to the LPEX > User Actions page. Enter the following values and click Set (don't forget to click Set or this doesn't add it to the table):

Name: setDate
Class name: com.ibm.lpex.samples.SetDateAction

userActions.gif

3. Click Apply.

4. Now you need to assign a keyboard shortcut to the action so it's easy to invoke from the editor. Switch to the user key actions preference page. Enter the following values and click Set.

Key: c-s-t
Action: setDate

The c-s-t sets the keyboard shortcut to Ctrl + Shift + T. You can enter any keyboard shortcut you want here.

keyActions.gif

5. Click Apply and close the preferences dialog.

When you are inside the LPEX editor you can now invoke the new action. Position the cursor on the line you want to change, or select the block of lines to change. Hint: to select the entire file press Ctrl + Home, then hold down Shift and press Ctrl + End.

Then invoke the action by pressing Ctrl + Shift + T. A dialog box appears at the bottom of the editor prompting for the new date.

newDate.gif

While we're on the topic, RDi 7.5 added a new Find Date action to LPEX. Press Ctrl + Shift + D to search for lines that match a specific date, are greater than or less than a date, or match a range.

Alternatively you could move to a change management system like Rational Team Concert for i and stop relying on Date fields to detect when things are changed :)

0 Comments Permalink
0

When developing Rich Internet Applications, it is important to make the applications accessible to everyone. Due to the fact that EGL Rich UI applications are generated into standard HTML and Javascript, the applications comply with accessibility standards and can be used with utilities such as screen readers, etc. The following are some specific details on working with screen readers, tab indices, and relative sizes in an EGL Rich UI application.

Screen Readers
When working with widgets that map directly to basic HTML controls (e.g. button, checkbox, etc), no additional work is required to enable a screen reader, as the readers are already able to interpret standard HTML tags. In addition to the basic widgets provided by the HTML specification, Rich Internet Applications commonly contain more complex widgets that are rendered using generic HTML tags such as the DIV tag. To make these complex widgets accessible to a screen reader, the W3C organization has defined the Accessible Rich Internet Applications (WAI-ARIA) specification (http://www.w3.org/TR/wai-aria/). This specification defines the 'Role' attribute for all tags, which can be used to instruct a screen reader on how a widget should be interpreted (e.g. "checkbox"). All widgets found in an EGL Rich UI application contain the fields "ariaRole", which can be used to instruct a screen reader on how to interpret the widget.

An example application that uses the "ariaRole" field is provided as part of the attached project, in the file AraiaRoleDemo.egl.

Another common aspect of Rich Internet Applications is the usage of widgets that update their content as the application is running, without re-rendering the entire page (e.g. stock prices, etc). To support these widgets, the ARIA specification defines the 'Live' attribute, which can be used to instruct a screen reader to re-read a widget's content after it has been updated. All widgets found in an EGL Rich UI application contain the fields "ariaLive", which can be used to instruct a screen reader on how often to re-read a widget after its content has changed.

An example application that uses the "ariaLive" field is provided as part of the attached project, in the file LiveRegionDemo.egl.

Tab Index
When developing an application, it is important to consider a user that does not have a mouse or other pointing device. To support these users, the application should enable tabbing so that the application can be used with only a keyboard. All widgets found in an EGL Rich UI application contain the field "tabIndex", which can be used to indicate the Tab order for the widget in the running application.

An example application that uses the "tabIndex" field is provided as part of the attached project, in the file TabIndexDemo.egl.

Relative Sizes
When developing Rich Internet Applications, it is a good idea to size elements using relative values, so that the application will render correctly on different size monitors or at different resolutions. To specify that a widget should take up a certain percentage of the screen in an EGL Rich UI application, you can set size attributes using a value with a percentage (e.g. width = "50%").

Font sizes should also be specified using relative units (e.g. em) instead of fixed units (e.g. px), so that the browser can adjust the font size to the users preferences. You can specify font sizes with different sizes and units (e.g. em, pt, etc) using the "fontSize" attribute found on all widgets in an EGL Rich UI application.

An example application that uses relative sizes and units is provided as part of the attached project, in the file RelativeSizeDemo.egl.

Note: The attached project, AccessibilityDemo, requires the com.ibm.egl.rui_1.0.2 project.

Attachment: AccessibilityDemo.zip

0 Comments Permalink
0

EGL programs are transformed (we call the process "generation") to Java, COBOL, or JavaScript programs for deployment in a target runtime environment.

If performance of the generated program is significant to you, then it is important to understand the performance characteristics of EGL syntax alternatives in the different runtime environments.


A new white paper, EGL Best Practices: Coding For Performance, provides insight into this topic for EGL programs destined for Java or COBOL environments.

Please feel free to use this document. Comment on information that you feel was especially important to you or point out issues or scenarios that you would like addressed with more detail.

0 Comments Permalink
0

Today we released the (0.7.1.1) EGL Dojo Widgets for RBD 7.5.1.4. These are the same widgets that were released in the EGL Community Edition (CE), just for RBD. Not to worry though, from this point forward all releases of EGL Dojo Widgets will work in both RBD and CE. We also made available a great Gallery Sample showcasing all Dojo widgets in a single sample! Take a look at it here.

Our apologies for this, but any existing EGL applications using the 0.6.0 version of the Dojo Widgets will most likely require changes to bring them forward. That said, the current API has been firmly defined and will not experience significant changes in future releases.

To download the EGL Dojo Widgets for RBD click here. Be sure to also take a look at the great documentation attached to the page to get a feel for the API.

0 Comments Permalink
0

Hello all, over the last year, a group of Transactional Memory experts from Sun, Intel, and IBM have been getting together every Friday to discuss how to create a uniform syntax for Transactional Memory.

We are happy to release the first version of the Draft Specification of Transactional Language Constructs for C++. This specification is the result of a joint work by a group of people from Intel, IBM and Sun, and is based on our experience working with transactional language constructs. We would like to encourage people to implement this specification and we welcome feedback on the document. Please direct any such feedback to this discussion group TM & Languages.

You can find the specification in the Resource Library/Articles, Presentation, Ebooks under the Parallel Section

If you have any comments, I invite you to post them here or in the Discussion forum.

TM Specification Drafting Group

0 Comments Permalink
11

(updated for V7.5.1.4 and 7.1.0.4 - 11/10/09)

A question I frequently get is what is the current maintenance is for the Rational COBOL Runtime for z/Series V6.0.1 product. Well the answer is it depends on what level of RBD you are using. Here is the list of PTFs by RBD release and the minimum PTF per release. Note that all have to be installed, up to the level of RBD you are using.

Also, the support website has now been updated as well. See:

Rational COBOL Runtime PTF List

and

For RBD in general:

RBD Fixes by Version

Level / PTF #


v6010 : /
v7000 : UK24108
v7100 : UK29575
v7101 : UK40726
v7102 : UK42718
v7510 : UK42740


V7511: UK43754
V7512: UK45676
V7513: UK46879


V7104: UK48413

V7514: UK51729 <-- This PTF will support all other levels of EGL as well (V7.5 .x and


with these important install notes

* UK24108 requires that the base product is accepted
  • UK24108 and UK40726 must be applied in two different steps
    (doing both in the same steps breaks SMP/E and the product must be installed again

11 Comments Permalink
1

RDi Webcast Series in RDi Team Blog

Posted by yantzi Nov 10, 2009

Over the past 2 months I've been doing a monthly webcast series with Sirius Computer Solutions on Rational Developer for i (RDi). The format is generall 40 min deep dive on a specific topic, 10 min preview of the next month's topic, and 10 mins for Q&A.

So far we have covered an overview and a deep dive on RSE. The webcasts are being recorded and are available for playback.

The next one is this coming Friday (November 13th) and will cover the Integrated i Debugger; one of my favorite RDi topics because it's so easy to use and something I have to use often when coding RPG, COBOL, or CL :(

Here are the details for the upcoming call:

Topic: RDi webcast 3 - Debugger
Date: Friday, November 13, 2009
Time: 11:00 am, Eastern Standard Time
Meeting Number: 557 432 806

1-877-369-7289 passcode 7541 then you need to enter 2468.



To join the online meeting (Now from iPhones too!)

1. Go to https://sirius.webex.com/sirius/j.php?ED=112887842&UID=0
2. Enter your name and email address.
3. Enter the meeting password: (This meeting does not require a password.)
4. Click "Join Now".

Hope to see you in one of the upcoming webcasts.

Don.

1 Comments Permalink
4

Fix pack 7.5.1.4 is now available. It includes fixes in many areas of the
product, as well as significant runtime performance improvements in both Java and COBOL environments. Everyone using RBD 7.5.x should install it. See IBM Rational Business Developer 7.5.1.4 Release Information for more info, including installation instructions and the list of APARs which are fixed. The download instructions are here.

If you generate COBOL for System z, you should also install PTF UK51729.

Rational Business Developer version 7.5.1.4 includes these enhancements:

  • Improvements in COBOL runtime performance affect the following kinds of processing:
    data-table access, dynamic-array access, assignments, SQL statements,
    exception handling, calls, string handling, and other memory usage. Consider re-generating existing applications, especially if they access SQL databases extensively or access data tables.
  • Improvements in Java runtime performance affect the processing of system libraries
    sysVar, vgVar, and converseVar. Re-generate existing applications only
    if you notice a problem with performance.
  • An EGL-generated Java wrapper can now call an EGL main program that is
    generated to Java and can share a database connection with that
    program.
  • EGL-generated Java code and the EGL debugger can now access z/OS batch programs and DL/I databases.
  • A new preference exists to change the behavior of SQL Retrieve at
    development time, so that you can define EGL fields of type CHAR in
    relation to SQL table columns that are of type DATE, TIME, or
    TIMESTAMP. The new preference is Use EGL type char for SQL date, time, and timestamp in SQL Retrieve.
  • The sysvar.remoteSystemID function can be used to dynamically specify the
    system name of a remote program, data file, asynchronous transaction,
    or transient data queue. The function now supports 256 characters if
    the EGL code is generated to Java.
  • In regard to COBOL or Java generation, the new blanksAsZero
    build descriptor option helps control the runtime behavior when a
    program assigns text to a numeric variable. The default value is NO,
    which matches the previous behavior for Java generation. If you
    generate COBOL and currently set v60NumWithCharBehavior to NO, you should also set blanksAsZero to YES if the program compares character data to numeric data.
  • Several new COBOL symparms are in place; for example, WRITEFUNCTIONDETAILS and WRITESTATEMENTDETAILS support the debugging of EGL-generated CICS COBOL programs.
  • The Rich UI widgets were upgraded to version 1.0.2 and now match those that became available in EGL Community Edition.
  • JavaScript code is now compressed when you deploy Rich UI code in the Workbench. Re-deploying existing Rich UI applications significantly reduces the size of the application code.
  • In relation to widget-type creation in Rich UI, the @VEWidget complex
    property now includes a field named container. If you create a widget
    type and indicate that it represents a container, an EGL developer can
    place a container on the Design surface, drag a widget of another type
    from the palette, and drop that widget into the container.
  • An EGL-generated VG Web transaction can now call another with parameters,
    such that the called transaction can interact with the browser. This
    capability is available if the target for each Web transaction is a
    Java platform. Also, you can use a new program property, enableJ2ee, to
    specify whether a VG Web transaction that runs completely in a JEE
    application server uses these JEE capabilities: data sources rather
    than direct database connections, and the JEE deployment descriptor
    rather than a Java properties file.
  • The JSONName property can be used to copy a JSON string to or from a
    record, when the JSON field name is an EGL-reserved word or is not
    valid in EGL. Similarly, the FormName property is available when you
    develop an Interface part for accessing a service and are prevented
    from sending form data to the service because a field name in the form
    is not valid in EGL.

Enjoy!

4 Comments Permalink
0

Rational Business Developer (RBD) and EGL Community Edition (EGL CE) both allow you to more easily develop Web 2.0 applications using a single language, EGL. With EGL, you can create a rich internet application (RIA) without having to learn a multitude of technologies like JavaScript, Java, HTML, or PHP. To develop RIAs using RBD or EGL CE, you write your application in EGL, and the tool generates JavaScript and Java. You'll need RBD, the enterprise level big brother of EGL CE, if you want to create COBOL, JSF, text or console applications.

If you have been using Rational Business Developer (RBD), you'll notice a few things are different in EGL CE. First, you'll probably notice that EGL CE has a single EGL perspective. For developing EGL, there is a single EGL editor that determines whether to show the Design and Preview tabs based on the content of the file opened. To create an EGL project, you are required to enter only a project name. Because it combines features from the General and Rich UI project types from RBD, a single EGL CE project can contain Rich UIs, Web services, or both. By default, each EGL CE project depends on the EGL Rich UI widget project and a Dojo runtime project. Simply drag-and-drop any of the widgets from the palette onto the visual editor in Design view. Use the Properties view to customize each widget and define events.


Like RBD, you can use EGL CE to code, preview, and debug RIAs before you deploy them to an application server. In EGL CE, services can be tested in Preview or debug using the service's source code if it's in your workspace or using the deployed version for existing services. Being able to see your application in action using Preview and Debug, make quick changes, and test again speeds up the development process a lot. Once you're happy with your application, you can deploy it.


Deployment in EGL CE is somewhat different too. EGL CE removed the need to switch between deployment and development modes since code is automatically generated for debug and target deployment (see the EGL CE Project Structure and Code Generation blog). For deployment in RBD, you select a single Rich UI handler to serve as the entry point to your application. In EGL CE, you can better control how your application is deployed using the Deployment Descriptor editor. By default, all Rich UI handlers create an HTML endpoint for each specified locale in EGL CE. You can edit the application's deployment descriptor (.egldd) to pick each Rich UI handler you want to have an HTML endpoint, and therefore you control the entry point URLs for your application. In the deployment descriptor, you can also determine what types of services to create such as SOAP or REST, and the service client bindings that tie your front-end user interfaces with the back-end services. Each deployment descriptor has one Web project as the target. If you want parts of your application to run on different targets, you can create multiple deployment descriptors, for example a descriptor to deploy Rich UIs to one target and another descriptor to deploy services to a second target. Currently, EGL CE supports deployment to Apache Tomcat.


So if you want to develop Web 2.0 applications quickly and efficiently, try EGL CE. We think learning a single language like EGL will make your life easier, as well as reduce the strain on your bookshelf since you won't need a bunch of reference manuals. And it's free, so you can try it without asking your boss for a purchase order.


And remember, the C in EGL CE stands for community. We encourage comments and feedback from you, the EGL community. Feel free to ask questions in the forum, comment on blog posts, or contact us to write a blog post yourself. Let us know what you think! We'd love to hear from you.

0 Comments Permalink
0

Standards love to add things. They remove very little, but they do like to deprecate. This post will describe a collection of things that is heading that way, or not heading that way in C++ 0x.

In my posting on Intention to deprecate trigraphs in the next C++ Standard, we successfully demonstrated that much of the non-English speaking world will still need to rely on trigraphs as a way to get to UCN through "\" which may be inaccessible in some codepages. So we would object to deprecating it without an alternative.

In the last meeting in Santa Cruz, an alternative was proposed in Core issue 789:Replacing Trigraphs. In short, it does not so much deprecate trigraphs (which we like) as move trigraphs out of translation phase 1 so trigraphs are not recognized ahead of raw strings, but is still recognized ahead of other strings (as it is now). It seems that trigraph interaction with raw strings was always the real issue behind the original National Body comment. This interaction had become more prevalent because Raw strings are accepted as part of C++0x. This proposal will level the playing field to what it was again.

We reviewed the paper as a way of fixing the interaction of trigraphs and raw strings. We think the paper is ready to go, but we're holding it back because we're considering other approaches, including moving UCNs out of translation phase 1 or moving raw string recognition into phase 1.

We're still looking at deprecating exception specifications. Our current feeling is that we will deprecate them except for the ways of saying a function doesn't throw at all (e.g., the new noexcept feature, still being reviewed). This feature has been shown to be relatively useless since its inception.

We did a straw poll on deprecating or removing exported templates. I voted to support removal of export to reduce dialecting C++. However a straw poll in full committee seems to prefer deprecation. This feature has been implemented exactly by one company, and even their lead is not opposing its removal. We appreciate their selfless sense of the C++ community and appreciate their sacrifice in learning about why this feature was problematic. Sometimes, it does take doing to see the whole picture.

Finally, we deprecated the semantics of the register keyword. This keyword has been ignored by most compiler that I am aware of, so it is the right time to deprecate it.

As with all deprecation, have no fear. All compilers will generally continue to accept (and or ignore) these cases, so that your code will continue to compile.

0 Comments Permalink
0

The Library side brought about some of the most interesting changes. I already discussed the key discussions with respect to unifying the Asynchronous futures proposal in The View (or trip report) from the Oct 2009 C++ Standard meeting.

This resulted in a paper which will be published in the upcoming mailing (in about a week from now), which will show the approach on Asynchronous Call A Simple Asynchronous Call.

The key changes there were:

  • A restoration of the variadic thread and async functions. This restoration is a consequence of analysis and request of the British Standards Institute.
  • A convergence on the "as if a new thread" in the launching of asynchronous work. This change avoids undefined behavior arising from any delay in destroying thread-local variables, but requires careful implementation to avoid excessive overhead.
  • Removal of the is_ready, has_exception, and has_value query functions. The presence of these function requires still other functions in the synchronous case. Evolution Working Group direction is that the complexity in interface is as yet unjustified, and prudence dictates a smaller initial interface.
  • Unspecified behavior for the use of timed wait functions when the unique_future was created from a deferred async.
  • The conversion from unique_future to shared_future will execute any deferred work.
  • The use of an enum class to better clarify the launching policy.

The other papers which support this is a resolution of most of the futures issues from National Body comments in Issues on Futures (Rev. 1) . A future describes components that a C++ program can use to retrieve in one thread the result (value or exception) from a function that has run in another thread.

These components are not restricted to multi-threaded programs but can be useful in single-threaded programs as well.

The other resolved issues include:



  • moves swap from the <algorithm> header to <utility> to address UK 300 because swap has become a common utility operation with several common idioms relying on it




Most of these are motivated by National Body comments from CD1. This shows the effort and focus of the committee during these periods as we continue to resolve the almost 600 comments that was received from the September 2008 CD1 draft.

There is now plan to issue a second draft for comment (post removal of Concepts, and with the fixes like above from CD1 comments). This will be CD2 and will be aimed for release after the next meeting in March 2010, in Pittsburgh hosted by Carnegie Mellon.

I will describe in another post more details on the schedule changes which is now clearer and I have updated in the C/C++ Standard hub

0 Comments Permalink
0

Santa Cruz is a wonderful location for us to decide weighty matters such as how best to ship a C++ Standard with the overloaded number of issues. Normally a surfing town as I am told, I have not had a chance to even make it to the ocean shoreline as yet even though I am only mere blocks from it. So busy we are that let me waste no more time and recap.

1. P.J. Plauger (or Bill Plauger) has been the convener of the C++ meeting. There was an attempt to stop processing any new features in order to facilitate our promised shipping date for the Standard. The problem is what is new? Some issues are discovered late and are serious if not fixed. Some new issues are truly wish list and should be stopped. Other issues are somewhat in between but need to be weighted with all the other.

The vote that tried to stop all new feature failed probably because of how ambiguous the wording is, in my opinion. The issue isn't about stopping consideration of any new feature, but balancing all features based on their seriousness and only being able to handle a fixed number of them based on resource.

But the problem with that model of triage (which is often done in software industry), is that we are all volunteers and you just can't easily make volunteers do the hard thing, when they would rather do what they like.

The end result is that P.J. Plauger has tendered his resignation as convener. I and many would like to thank him for his service and his guidance which has enabled C++ meeting hostings well into 2011.

2. Both Evolution and Core Committees met in addition to Library. Evolution had to deal with a number of pending additions which had been long promised. The most significant discussion is the proposal to add Asynchronous and Futures to C++. This is a higher abstraction for concurrency that allows independent action with a return value.

This was controversial because there were two leading candidate proposals. The majority of the discussion allowed a unified proposal which offered:

  • A restoration of the variadic thread and async functions. This restoration is a consequence of analysis and request of the British Standards Institute.
  • A convergence on the "as if a new thread" in the launching of asynchronous work. This change avoids undefined behavior arising from any delay in destroying thread-local variables, but requires careful implementation to avoid excessive overhead.
  • Removal of the is_ready, has_exception, and has_value query functions. The presence of these function requires still other functions in the synchronous case. Evolution Working Group direction is that the complexity in interface is as yet unjustified, and prudence dictates a smaller initial interface.
  • Unspecified behavior for the use of timed wait functions when the unique_future was created from a deferred async.
  • The conversion from unique_future to shared_future will execute any deferred work.
  • The use of an enum class to better clarify the launching policy.

Interestingly, this discussion really only have bearing on two Library proposals which I will detail in a following blog post.


The formal motions for C++ Core language which resulted from this include the usual group of defect fixes, numbering into the 70 range. Basically, all Ready and Tentatively Ready issues of
n2962 except issues 799, 812, 861, 919, and 920.

There was also a paper called Reaching Scope of Lambda Expressions

n2998
Current lambdas restrict the referents of a lambda expression to the immediately-enclosing function or lambda expression. This restriction is severe and does damage to the utility of the lambda feature.

For example, a simple matrix multiplication kernal would require two enclosing scopes and there would be no captures. It is essentially equivalent to saying that the body of a nested loop cannot access function parameters.

Much of this is from the paper.

Consider the following function to multiply square matricies.


matrix operator*( const matrix& a, const matrix& b )
{
    int n = a.numrows();
    matrix c( n, n );
    for ( int i = 0; i < n; i++ ) {
        for ( int j = 0; j < n; j++ ) {
            double t = 0.0;
            for ( int k = 0; k < n; k++ ) {
                t += a[i][k] * b[k][j];
            }
            c[i][j] = t;
        }
    }
    return c;
}

Its rewrite into functions and lambdas, as intended by the adopted N2550, is as follows. Note that the rewrite is approximately the same size.


matrix operator*( const matrix& a, const matrix& b )
{
    int n = a.numrows();
    matrix c( n, n );
    for_range( 0, n-1, [&]( int i ){
        for_range( 0, n-1, [&]( int j ){
            double t = 0.0;
            for_range( 0, n-1, [&]( int k ){
                t += a[i][k] * b[k][j];
            } );
            c[i][j] = t;
        } );
    } );
    return c;
}

However this straightforward reformulation is ill-formed as per N2927 wording for 5.1.1 expr.prim.lambda paragraphs 9–12. To make the code well-formed, the function must be rewritten as follows, where inserted text shows new code, which sometimes alter variable references.

matrix operator*( const matrix& a, const matrix& b )
{
    int n = a.numrows( );
    matrix c( n, n );
    for_range( 0, n-1, [&]( int i ){
        const matrix& a1 = a;
        const matrix& b1 = b;
	int& n1 = n;
	matrix& c1 = c;
        for_range( 0, n1-1, [&]( int j ){
            const matrix& a2 = a1;
            const matrix& b2 = b1;
	    int& n2 = n1;
	    int& i2 = i;
            double t = 0.0;
            for_range( 0, n1-1, [&]( int k ){
                t += a2[i2][k] * b2[k][j];
            } );
            c1[i][j] = t;
        } );
    } );
    return c;
}

Such extensive mechanical editing will inhibit use, make errors more likely, and complicate code maintenance. Such editing is properly the domain of the compiler.

A third proposal n2989 "Unified Function Syntax" was not moved after significant discussion on whether it solved significant problem or not especially at this late stage, or just merely being a stylistic wish, especially if you have written large amounts of lambdas with the late specified return syntax and found current syntax ugly.

There was controversy because a previous proposal on auto lambda syntax was moved on the contingency that there would be room to explore a unified function syntax. However, as with all agreement in such a committee, the promise is always to allow the work to go forward with all the resource costs (such as authors and collaborators working together, review committee going over the proposal in this case over eight hours over several day), but there is no promise that it would be accepted. Such was the case, and of course the disappointment of the authors of this paper.

Well, in the next posting I will go over the Library proposal.

0 Comments Permalink
0

This is the meeting that closes on all new features for the upcoming C1X Standard (with only a few minor known exceptions)

In this meeting, we processed a number of key issues. We incorporated a few additional details to the memory model and concurrency proposals taken from C++ Standardization. We moved zero-initialization for thread locals from 5.1.2p1 to integrate with 6.7.8p10

One proposal removed gets() from the standard. This has been a problematic function, and was made obsolete in TC3. The function gets() has been problematic because of uncertain newline removal. The answer for a long time is to use fgets() instead.

We reviewed whether C wishes to support a general syntax for attributes similar to C++. This was rejected as most members were uncomfortable with the need and the consequences. Instead, C will adapt keywords prefixed with a single underscore for future attributes. For example, the alignment proposal will use _Align.

Personally, I feel this will cause C more problems in the future as attributes proliferates. But I do not think it precludes future adaption of a generalized system, if the need becomes serious. although right now the consensus is that C does not want general system for attributes.

I also pitched the concept of a common vectorized type for C based on OpenCL. There was general enthusiasm for the feature as many felt the need to drive for future parallelization support based on many existing implementations of vector extensions. However, due to C1X being on a schedule for completion of features, and the relative size of this proposal, the members felt that this proposal need time to develop. Furthermore, there was interest in maintaining close liaison with OpenCL to ensure we do not create dialects of OpenCL if we were to pick subsets.

In the end, the meeting closed with great belief that we are on track to have a feature completed draft by the next meeting in April, 2010. This puts C on a very promising track to finish on time.

0 Comments Permalink
0

Hi all, my name is Michael Wong. I will be attending the next C Standard meeting in Santa Cruz on Oct 26-30, representing IBM and Canada.

This promises to be a critical meeting as it is where the C Committee has nominated as the cutoff for adding features to the upcoming C1X (the code name for the next release of C).

One of the paper is the IBM comment on the Bounds Checking Library:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1388.pdf

where we have made responses as follows:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1389.pdf

IBM has also submitted one more proposal in addition to others.

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1408.pdf

This is a proposal to suggest work to start on a common vectorized type that will be native in C. Currently, the situation is like a jungle out there in that there is a proliferation of vector types from various platforms. Even within one compiler, there are many different vectorized type support because a compiler may need to support VMX, VSX, (Altivec), SSE2, MMX, OpenCL, to name a few.

This has caused a profusion of vectorized names which are similar but possibly not extendable as wider vector registers appear. It is also a recipe for non-portability of code.

The other part of the proposal uses OpenCL as a way to suggest one possible model (but not the only one) of how to support a common Vectorized type.

Please have a look and give me feedback if you wish.

And if you are in the Santa Cruz area, please join us, but first let me know so we can add you to the guest list as the meeting room space is limited based on the projected attendees.

Thanks and I will give a trip report post-meeting.

0 Comments Permalink
1 2 3 ... 16 Previous Next
Bottom Banner