Subscribe to daily Feed

Delivered by Google Feedburner...
Computer Science

Computer Science

posted 1 week 3 days ago
Introduction: If there exist k independent solutions to the time-partition constraints of a loop nest, then it is possible to transform the loop nest to have k outermost fully permutable loops, which can be transformed to create k1 degrees of pipelining, or to create k 1 inner parallelizable loops. Furthermore, we can apply blocking to fully permutable loops to improve data locality of uniprocessors as well as reducing synchronization among processors in a parallel execution.

Exploiting Fully Permutable Loops: We can create a loop nest with k outermost fully permutable loops easily fromk independent solutions to the time-partition constraints. We can do so bysimply making the kth solution the kih row of the new transform. Once theaffine transform is created, Algorithm 11.45 can be used to generate the code.

Example: The solutions found in Example 11.58 for our SOR example were


Making the first solution the first row and the second solution the second row, we get the transform

1 0 "

1 1

which yields the code in Fig. 11.51(a).

Making the second solution the first row instead, we get the transform

" 1 1

1 0

which yields the code in Fig. 11.51(c).

It is easy to see that such transforms produce a legal sequential program. The first row partitions the entire iteration space according to the first solution. The timing constraints guarantee that such a decomposition does not violate any data dependences. Then, we partition the iterations in each of the outermost loop according to the second solution. Again this must be legal because we are dealing with just subsets of the original iteration space. The same goes for the rest of the rows in the matrix. Since we can order the solutions arbitrarily, the loops are fully permutable.

Exploiting Pipelining: We can easily transform a loop with k outermost fully permutable loops into a code with k 1 degrees of pipeline parallelism.

Wavefr ont ing: It is also easy to generate k-1 inner parallelizable loops from a loop with k outermost fully permutable loops. Although pipelining is preferable, we include this information here for completeness.

We partition the computation of a loop with k outermost fully permutable loops using a new index variable i: where i is defined to be some combination of all the indices in the k permutable loop nest. For example, i = i ... ik is one such combination.

We create an outermost sequential loop that iterates through the i partitions in increasing order; the computation nested within each partition is ordered as before. The first k - 1 loops within each partition are guaranteed to be parallelizable. Intuitively, if given a two-dimensional iteration space, this transforms groups iterations along 135 diagonals as an execution of the outermost loop. This strategy guarantees that iterations within each iteration of the outermost loop have no data dependence.

Blocking: A k-deep, fully permutable loop nest can be blocked in ^-dimensions. Insteadof assigning the iterations to processors based on the value of the outer or innerloop indexes, we can aggregate blocks of iterations into one unit. Blocking isuseful for enhancing data locality as well as for minimizing the overhead ofpipelining.

Suppose we have a two-dimensional fully permutable loop nest, as in Fig. 11.55(a), and we wish to break the computation into b x b blocks. The execution order of the blocked code is shown in Fig. 11.56, and the equivalent code is in Fig. 11.55(b).

If we assign each block to one processor, then all the passing of data from one iteration to another that is within a block requires no inter-processor communication.

Alternatively, we can coarsen the granularity of pipelining by assigning a column of blocks to one processor. Notice that each processor synchronizes with its predecessors and successors only at block boundaries. Thus, another advantage of blocking is that programs only need to communicate data accessed at the boundaries of the block with their neighbor blocks. Values that are interior to a block are managed by only one processor.
Like | 0 View | 41

Computer Science

posted 6 months 2 weeks ago

HTML 5 has many new features which completely changed the web development traditional style. Here I am going to write some important features of HTML 5.

New Doctype

Old Tag:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

New Tag: <!DOCTYPE html>
The Figure Element
Previous tagging style of displaying image in a web page:
<img src="path/to/image" alt="About image" />
<p>Image of Mars. </p>
HTML5 tagging style:
    <img src="path/to/image" alt="About image" />
        <p>This is an image of something interesting. </p>
<small> Redefined

The small element now refers to "small print." Like printing of copyright things.


No More Types for Scripts and Links

Older Style:

<link rel="stylesheet" href="path/to/stylesheet.css" type="text/css" />
<script type="text/javascript" src="path/to/script.js"></script>

New Style:

<link rel="stylesheet" href="path/to/stylesheet.css" />
<script src="path/to/script.js"></script>

Make your Content Editable


<ul contenteditable="true">
<li> Break mechanical cab driver. </li>
        <li> Drive to abandoned factory
        <li> Watch video of self </li>
Email Inputs

Now no need to write extra validation for email.

<input id="email" name="email" type="email" />


<input name="email" type="email" placeholder="xyz@example.com" />


The Semantic Header and Footer

Old Style: 

<div id="header">
<div id="footer">
New Style:
Internet Explorer and HTML5
IE browsers still not supporting features of HTML5. Solution for it. Alternate option to implement HTML5 for IE Browser.
header, footer, article, section, nav, menu { 
   display: block;
HTML Commented Tag
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
Removed Completely
Required Attribute

<input type="text" name="someInput" required="required">

Autofocus Attribute

<input type="text" name="someInput" placeholder="Douglas Quaid" required autofocus>

Audio Support

<audio autoplay="autoplay" controls="controls">
    <source src="file.ogg" />
    <source src="file.mp3" /> 
    <a>Download this file.</a>
Video Support
<video controls preload>
    <source src="cohagenPhoneCall.ogv" type="video/ogg; codecs='vorbis, theora'" />
    <source src="cohagenPhoneCall.mp4" type="video/mp4; 'codecs='avc1.42E01E, mp4a.40.2'" />
    <p> Your browser is old. <a href="cohagenPhoneCall.mp4">Download this video instead.</a> </p>
Preload Videos
<video preload>
Display Controls
<video preload controls>
Regular Expressions
<form action="" method="post">
    <label for="username">Create a Username: </label>
    <input type="text"
       placeholder="4 <> 10"
    <button type="submit">Go </button>
Detect Support for Attributes
alert( 'pattern' in document.createElement('input') ) // boolean;
Mark Element
Think of the <mark> element as a highlighter.
<h3> Search Results </h3>
<p> They were interrupted, just after Quato said, <mark>"Open your Mind"</mark>. </p>
Think of the <mark> element as a highlighter.
What is Not HTML5
  1. SVG: Not HTML5. It's at least five years old.
  2. CSS3: Not HTML5. It's...CSS.
  3. Geolocation: Not HTML5.
  4. Client Storage: Not HTML5. It was at one point, but was removed from the spec, due to the fact that many worried that it, as a whole, was becoming too complicated. It now has its own specification.
  5. Web Sockets: Not HTML5. Again, was exported to its own specification.

Custom Attributes

<h1 id=someId customAttribute=value> Thank you, Tony. </h1>


The Output Element

<form action="" method="get">
        10 + 5 = <output name="sum"></output> 
    <button type="submit"> Calculate </button>
(function() {
    var f = document.forms[0];
    if ( typeof f['sum'] !== 'undefined' ) {
        f.addEventListener('submit', function(e) {
            f['sum'].value = 15;
        }, false);
    else { alert('Your browser is not ready yet.'); }
Create Sliders with the Range Input
<form method="post">
    <h1> Total Recall Awesomness Gauge </h1>
    <input type="range" name="range" min="0" max="10" step="1" value="">
    <output name="result">  </output>
Like | 13 View | 1145

Computer Science

posted 6 months 3 weeks ago
Light Fidelity (Li-Fi) is a bidirectional, high-speed and fully networked wireless communication technology similar to Wi-Fi. The term was coined by Harald Haas and is a form of visible light communication and a subset of optical wireless communications (OWC) and could be a complement to RF communication (Wi-Fi or cellular networks), or even a replacement in contexts of data broadcasting.
It is wire and uv visible-light communication or infrared and near-ultraviolet instead of radio-frequency spectrum, part of optical wireless communications technology, which carries much more information, and has been proposed as a solution to the RF-bandwidth limitations.
This OWC technology uses light from light-emitting diodes (LEDs) as a medium to deliver networked, mobile, high-speed 
communication in a similar manner to Wi-Fi.The Li-Fi market is projected to have a compound annual growth rate of 82% from 2013 
to 2018 and to be worth over $6 billion per year by 2018.
Visible light communications (VLC) works by switching the current to the LEDs off and on at a very high rate,too quick to be 
noticed by the human eye. Although Li-Fi LEDs would have to be kept on to transmit data, they could be dimmed to below human 
visibility while still emitting enough light to carry data.The light waves cannot penetrate walls which makes a much shorter 
range, though more secure from hacking, relative to Wi-Fi.Direct line of sight is not necessary for Li-Fi to transmit a signal; 
light reflected off the walls can achieve 70 Mbit/s.
Li-Fi has the advantage of being useful in electromagnetic sensitive areas such as in aircraft cabins, hospitals and nuclear 
power plants without causing electromagnetic interference.Both Wi-Fi and Li-Fi transmit data over the electromagnetic spectrum, 
but whereas Wi-Fi utilizes radio waves, Li-Fi uses visible light. While the US Federal Communications Commission has warned of 
a potential spectrum crisis because Wi-Fi is close to full capacity, Li-Fi has almost no limitations on capacity.The visible 
light spectrum is 10,000 times larger than the entire radio frequency spectrum.Researchers have reached data rates of over 10 
Gbit/s, which is much faster than typical fast broadband in 2013.Li-Fi is expected to be ten times cheaper than Wi-Fi.Short 
range, low reliability and high installation costs are the potential downsides.
PureLiFi demonstrated the first commercially available Li-Fi system, the Li-1st, at the 2014 Mobile World Congress in 
Bg-Fi is a Li-Fi system consisting of an application for a mobile device, and a simple consumer product, like an IoT (Internet 
of Things) device, with color sensor, microcontroller, and embedded software. Light from the mobile device display communicates 
to the color sensor on the consumer product, which converts the light into digital information. Light emitting diodes enable 
the consumer product to communicate synchronously with the mobile device.
Like | 17 View | 1718

Computer Science

posted 6 months 3 weeks ago
In the simplest terms, cloud computing means storing and accessing data and programs over the Internet instead of your computer's hard drive. The cloud is just a metaphor for the Internet. It goes back to the days of flowcharts and presentations that would represent the gigantic server-farm infrastructure of the Internet as nothing but a puffy, white cumulus cloud, accepting connections and doling out information as it floats.
What cloud computing is not about is your hard drive. When you store data on or run programs from the hard drive, that's called local storage and computing. Everything you need is physically close to you, which means accessing your data is fast and easy, for that one computer, or others on the local network. Working off your hard drive is how the computer industry functioned for decades; some would argue it's still superior to cloud computing, for reasons I'll explain shortly.
The cloud is also not about having a dedicated network attached storage (NAS) hardware or server in residence. Storing data on a home or office network does not count as utilizing the cloud. (However, some NAS will let you remotely access things over the Internet, and there's at least one brand from Western Digital named "My Cloud," just to keep things confusing.)
For it to be considered "cloud computing," you need to access your data or your programs over the Internet, or at the very least, have that data synced with other information over the Web. In a big business, you may know all there is to know about what's on the other side of the connection; as an individual user, you may never have any idea what kind of massive data processing is happening on the other end. The end result is the same: with an online connection, cloud computing can be done anywhere, anytime.
Consumer vs. Business
Let's be clear here. We're talking about cloud computing as it impacts individual consumers—those of us who sit back at home or in small-to-medium offices and use the Internet on a regular basis.
There is an entirely different "cloud" when it comes to business. Some businesses choose to implement Software-as-a-Service (SaaS), where the business subscribes to an application it accesses over the Internet. (Think Salesforce.com.) There's also Platform-as-a-Service (PaaS), where a business can create its own custom applications for use by all in the company. And don't forget the mighty Infrastructure-as-a-Service (IaaS), where players like Amazon, Microsoft, Google, and Rackspace provide a backbone that can be "rented out" by other companies. (For example, Netflix provides services to you because it's a customer of the cloud services at Amazon.)
Of course, cloud computing is big business: The market generated $100 billion a year in 2012, which could be $127 billion by 2017 and $500 billion by 2020.
Common Cloud Examples
The lines between local computing and cloud computing sometimes get very, very blurry. That's because the cloud is part of almost everything on our computers these days. You can easily have a local piece of software (for instance, Microsoft Office 365) that utilizes a form of cloud computing for storage (Microsoft OneDrive).
That said, Microsoft also offers a set of Web-based apps, Office Online, that are Internet-only versions of Word, Excel, PowerPoint, and OneNote accessed via your Web browser without installing anything. That makes them a version of cloud computing (Web-based=cloud).
Some other major examples of cloud computing you're probably using:
Google Drive: This is a pure cloud computing service, with all the storage found online so it can work with the cloud apps: Google Docs, Google Sheets, and Google Slides. Drive is also available on more than just desktop computers; you can use it on tablets like the iPad or on smartphones, and there are separate apps for Docs and Sheets, as well. In fact, most of Google's services could be considered cloud computing: Gmail, Google Calendar, Google Maps, and so on.
Apple iCloud: Apple's cloud service is primarily used for online storage, backup, and synchronization of your mail, contacts, calendar, and more. All the data you need is available to you on your iOS, Mac OS, or Windows device (Windows users have to install the iCloud control panel). Naturally, Apple won't be outdone by rivals: it offers cloud-based versions of its word processor (Pages), spreadsheet (Numbers), and presentations (Keynote) for use by any iCloud subscriber. iCloud is also the place iPhone users go to utilize the Find My iPhone feature that's all important when the handset goes missing.
Amazon Cloud Drive: Storage at the big retailer is mainly for music, preferably MP3s that you purchase from Amazon, and images—if you have Amazon Prime, you get unlimited image storage. Amazon Cloud Drive also holds anything you buy for the Kindle. It's essentially storage for anything digital you'd buy from Amazon, baked into all its products and services.
Hybrid services like Box, Dropbox, and SugarSync all say they work in the cloud because they store a synced version of your files online, but they also sync those files with local storage. Synchronization is a cornerstone of the cloud computing experience, even if you do access the file locally.
Likewise, it's considered cloud computing if you have a community of people with separate devices that need the same data synced, be it for work collaboration projects or just to keep the family in sync. For more, check out the The Best Cloud Storage and File-Syncing Services for 2016.
Cloud Hardware
Right now, the primary example of a device that is completely cloud-centric is the Chromebook. These are laptops that have just enough local storage and power to run the Chrome OS, which essentially turns the Google Chrome Web browser into an operating system. With a Chromebook, most everything you do is online: apps, media, and storage are all in the cloud.
Or you can try a  ChromeBit, a smaller-than-a-candy-bar drive that turns any display with an HDMI port into a usable computer running Chrome OS.
Of course, you may be wondering what happens if you're somewhere without a connection and you need to access your data. This is currently one of the biggest complaints about Chrome OS, although its offline functionality (that is, non-cloud abilities) are expanding.
The Chromebook isn't the first product to try this approach. So-called "dumb terminals" that lack local storage and connect to a local server or mainframe go back decades. The first Internet-only product attempts included the old NIC (New Internet Computer), the Netpliance iOpener, and the disastrous 3Com Ergo Audrey (pictured). You could argue they all debuted well before their time—dial-up speeds of the 1990s had training wheels compared to the accelerated broadband Internet connections of today. That's why many would argue that cloud computing works at all: the connection to the Internet is as fast as the connection to the hard drive. (At least it is for some of us.) 
Arguments Against the Cloud
In a 2013 edition of his feature What if?, xkcd-cartoonist (and former NASA roboticist) Randall Monroe tried to answer the question of "When—if ever—will the bandwidth of the Internet surpass that of FedEx?" The question was posed because no matter how great your broadband connection, it's still cheaper to send a package of hundreds of gigabytes of data via Fedex's "sneakernet" of planes and trucks than it is to try and send it over the Internet. (The answer, Monroe concluded, is the year 2040.)
Cory Doctorow over at boingboing took Monroe's answer as "an implicit critique of cloud computing." To him, the speed and cost of local storage easily outstrips using a wide-area network connection controlled by a telecom company (your ISP).
That's the rub. The ISPs, telcos, and media companies control your access. Putting all your faith in the cloud means you're also putting all your faith in continued, unfettered access. You might get this level of access, but it'll cost you. And it will continue to cost more and more as companies find ways to make you pay by doing things like metering your service: the more bandwidth you use, the more it costs.
Maybe you trust those corporations. That's fine, but there are plenty of other arguments against going into the cloud whole hog. Apple co-founder Steve Wozniak decried cloud computing in 2012, saying: "I think it's going to be horrendous. I think there are going to be a lot of horrible problems in the next five years."
In part, that comes from the potential for crashes. When there are problems at a company like Amazon, which provides cloud storage services to big name companies like Netflix and Pinterest, it can take out all those services (as happened in the summer of 2012). In 2014, outages afflicted Dropbox, Gmail, Basecamp, Adobe, Evernote, iCloud, and Microsoft; in 2015 the outtages hit Apple, Verizon, Microsoft, AOL, Level 3, and Google. Microsoft had another this year. The problems typically last for just hours.
Wozniak was concerned more about the intellectual property issues. Who owns the data you store online? Is it you or the company storing it? Consider how many times there's been widespread controversy over the changing terms of service for companies like Facebook and Instagram—which are definitely cloud services—regarding what they get to do with your photos. There's also a difference between data you upload, and data you create in the cloud itself—a provider could have a strong claim on the latter. Ownership is a relevant factor to be concerned about.
After all, there's no central body governing use of the cloud for storage and services. The Institute of Electrical and Electronics Engineers (IEEE) is trying. It created an IEEE Cloud Computing Initiative in 2011 to establish standards for use, especially for the business sector. The Supreme Court ruling against Aereo could have told us a lot about copyright of files in the cloud... but the court side-stepped the issue to keep cloud computing status quo.
Cloud computing—like so much about the Internet—is a little bit like the Wild West, where the rules are made up as you go, and you hope for the best.


Like | 6 View | 745