c
c	gxor.f 1.4 92/07/01 15:21:03
c
c  Copyright 1991 Intel Corporation, Inc.
c  See the "Copyright" file for complete rights and liability information.
c
c  Performs a bitwise OR on a vector and its bitwise-complement.
c  A vector bitwise ORed with its own bitwise-complement is all
c  ones (but prints as negative ones because it is interpreted in
c  twos-complement form).
c
c  The glor() call works similarly to gior().

      integer iam
      integer x(5), work(5)

c  Identify self.

      iam = mynode()

c  Node 0 builds simple vector.

      if(iam .eq. 0) then

         print *, 'Starting ...'

         do 1, i = 1, 5
            x(i) = i
1        continue

         write(*, 100) (x(i), i = 1, 5)
100      format('Original Vector:                        ', 5i6)

      else

c  Node 1 builds bitwise-complement of node 0's vector.

         do 2, i = 1, 5
            x(i) = inot(i)
2        continue

         write(*, 300) (x(i), i = 1, 5)
300      format('Bitwise-complement of original vector:  ', 5i6)

      endif

c  Perform bitwise OR.

      call gior(x, 5, work)

c  Node 0 displays resulting vector.

      if(iam .eq. 0) write(*, 200) (x(i), i = 1, 5)
200   format('Vector ORed with its bitwise-complement:', 5i6)

      end
