, but this code // executes before the first paint, when

麻豆区

is not yet present. The // classes are added to so styling immediately reflects the current // toolbar state. The classes are removed after the toolbar completes // initialization. const classesToAdd = ['toolbar-loading', 'toolbar-anti-flicker']; if (toolbarState) { const { orientation, hasActiveTab, isFixed, activeTray, activeTabId, isOriented, userButtonMinWidth } = toolbarState; classesToAdd.push( orientation ? `toolbar-` + orientation + `` : 'toolbar-horizontal', ); if (hasActiveTab !== false) { classesToAdd.push('toolbar-tray-open'); } if (isFixed) { classesToAdd.push('toolbar-fixed'); } if (isOriented) { classesToAdd.push('toolbar-oriented'); } if (activeTray) { // These styles are added so the active tab/tray styles are present // immediately instead of "flickering" on as the toolbar initializes. In // instances where a tray is lazy loaded, these styles facilitate the // lazy loaded tray appearing gracefully and without reflow. const styleContent = ` .toolbar-loading #` + activeTabId + ` { background-image: linear-gradient(rgba(255, 255, 255, 0.25) 20%, transparent 200%); } .toolbar-loading #` + activeTabId + `-tray { display: block; box-shadow: -1px 0 5px 2px rgb(0 0 0 / 33%); border-right: 1px solid #aaa; background-color: #f5f5f5; z-index: 0; } .toolbar-loading.toolbar-vertical.toolbar-tray-open #` + activeTabId + `-tray { width: 15rem; height: 100vh; } .toolbar-loading.toolbar-horizontal :not(#` + activeTray + `) > .toolbar-lining {opacity: 0}`; const style = document.createElement('style'); style.textContent = styleContent; style.setAttribute('data-toolbar-anti-flicker-loading', true); document.querySelector('head').appendChild(style); if (userButtonMinWidth) { const userButtonStyle = document.createElement('style'); userButtonStyle.textContent = `#toolbar-item-user {min-width: ` + userButtonMinWidth +`px;}` document.querySelector('head').appendChild(userButtonStyle); } } } document.querySelector('html').classList.add(...classesToAdd); })(); A $600k NSF grant to teach parallel computing - News & Stories | 麻豆区

麻豆区

Skip to main content

Calvin News

A $600k NSF grant to teach parallel computing

Wed, Oct 31, 2012
Myrna Anderson

Today鈥檚 computers are as powerful as supercomputers were 20 years ago, said professor . And 20 years from now, the average desktop may be as powerful as the supercomputers of today.

That鈥檚 why Adams, along with colleagues from and colleges, has pursued and landed a $600,000 grant from the National Science Foundation: They want to ensure that their students will have the skills to handle the computers of the future.

Adams, Elizabeth Shoop and Dick Brown, (computer science professors from Macalester and Saint Olaf colleges, respectively) propose to teach parallel computing鈥攕upercomputing鈥攏ot to their students, but to their CS colleagues from around the country. 鈥淭hat鈥檚 the way you can attack this problem on a national level,鈥 he said. 鈥淵ou train the trainers, not just your own students.鈥

The programming gap

Many college-age students don鈥檛 have parallel-programming skills, nor do the professors who are teaching them, Adams said: 鈥淢ost people who got advanced degrees in computing got little of this.鈥 That knowledge gap came about not just because computers became more powerful but because of the way they became more powerful.

Prior to 2006, computers worked increasingly faster because they were equipped with more and more powerful processors. Though they were speedier, each of these single-core machines could only perform one task. In 2006, various computer companies introduced the first computers with dual-core processors, and the number of cores in the average computer has roughly doubled every year. And each core in a multi-core unit can perform a different task.

Adams has a favorite analogy to explain the benefits of a multi-core computer: 鈥淪uppose you have a 12-slice pizza, and the problem is to consume it. A single core computer is like you eating that pizza yourself. A quadruple-core computer is like you and three friends eating the pizza. It will take you one-quarter the time.鈥

That鈥檚 if you know how to take advantage of the multiple cores, Adams said: 鈥淭he problem is, you don鈥檛 program these the way you did before 2006 鈥 .The thought process you use to write the software becomes kind of a design process.鈥

The NSF grant, (of which Calvin鈥檚 portion is $125,307), will equip Adams, Shoop and Brown to host parallel computing workshops for computer science professors from many institutions next summer at either Macalester or St. Olaf and at the in New Mexico.

The parallel challenge

A grant Adams earned 18 months ago from the Technical Committee on Parallel Computing, part of the , allowed three Calvin professors (Harry Plantinga, Serita Nelesen and Patrick Bailey) to build parallel computing components into their computer science classes. Students in Plantinga鈥檚 鈥淒ata Structures and Algorithms鈥 class are writing a parallel program to play a game called Mankalah. 鈥淵ou have to learn some new programming and design techniques, and the algorithms change as well聽 鈥 . It鈥檚 always fun to learn new things, but it adds a level of challenge,鈥 Plantinga said.

Calvin and its colleagues are ahead of the curve on teaching parallel computing, said Adams, who constructed the college鈥檚 , in 2001, , in 2007 and a the same year. 鈥淲e鈥檙e ahead of a lot of schools in this,鈥 Adams conceded. 鈥淚t used to be that in order to get any kind of parallel program going and get any speed up, you had to have a Beowulf cluster: a supercomputer.鈥

With parallel computing becoming the norm, students will need the skill to do it in today鈥檚 job market, Adams said: 鈥淚f they go to work for a company, they should be able to write software that runs faster on today鈥檚 computers rather than slower. They could solve bigger problems, like the kind of things the government is interested in.鈥

Some of the most compelling reasons for learning parallel programming are closer to home, he added: 鈥淚f you鈥檙e going to spend $1,500 for a computer, you want software that takes advantage of it. You can鈥檛 buy a single-core computer. Your iPhone doesn鈥檛 have one core,鈥 Adams emphasized. 鈥淚t has four.鈥 聽