Programming languages array operations, Computer Engineering

Q. Programming languages array operations?

In programming languages array operations are written in compact form which frequently makes programs more understandable.

Consider the loop:

                s=0

                do i=1,n

                    a(i)=b(i)+c(i)

                     s=s+a(i)

                 end do

It can be written (in Fortran 90 notation) in following manner:

             a (1:n) = b(1:n) +c(1:n)

             s=sum (a(1:n))

Besides Fortran 90 there are numerous languages which provide succinct operations on arrays. A number of the mainly popular are and MATLAB and APL. Even though these languages weren't created for parallel computing relatively for expressiveness they can be used to state parallelism as array operations can be effortlessly executed in parallel. So all arithmetic operations (+, -, * /, **) included in vector expression may be performed in parallel. Intrinsic reduction functions like the sum above can be performed in a parallel too.

Posted Date: 7/13/2013 2:37:32 AM | Location : United States







Related Discussions:- Programming languages array operations, Assignment Help, Ask Question on Programming languages array operations, Get Answer, Expert's Help, Programming languages array operations Discussions

Write discussion on Programming languages array operations
Your posts are moderated
Related Questions
Functionality first and then Security?

how to become an ict enginer

Q. Explain the properties of Hypercube? Properties of Hypercube: Hypercube is both edge and node symmetric. The labels of any two neighbouring nodes vary in exactl

Recombination and Mutation: In such a scenario the point of GAs is to generate population after population of individuals that represent possible solutions to the problem at h

Consider a processor with a 4-stage pipeline. Each  time a conditional branch is encountered, the pipeline must be flushed (3 partially completed instructions are lost). Determine

VBA is licensed to Microsoft and this compatible with and only Microsoft products. Code written is compiled by an intermediate language known as P-code and this is stored in hostin

8:1 Mux for a given function, f=S (0, 1,5,7,9, 13)..

Define Radix (or)Base. A number system of base or radix is a system that uses different symbols for r digits. Numbers are shown by a string of digit symbols. To verify the quan

Explain bit pair recoding with an example? Ans: Bit pair recoding halves the maximum number of summands. Group the Booth-recoded multiplier bits in pairs and see the following

Disadvantages of Address translation: Disadvantages are following: A program that is too large to be held in a part needs some special design, that called overlay