c
c	gxxor.f 1.4 92/07/01 15:21:20
c
c  Copyright 1991 Intel Corporation, Inc.
c  See the "Copyright" file for complete rights and liability information.
c
c  Performs an exclusive OR between an arbitrary vector and a vector
c  containing all ones.  (A vector of all ones prints as negative ones
c  because it is interpreted in twos-complement form.)  An exclusive OR
c  like this produces the bitwise-complement of the arbitray vector.
c
c  The glxor() call works similarly to gixor().

      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 vector containing all ones.

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

         write(*, 300) (x(i), i = 1, 5)
300      format('Vector containing all ones:                 ', 5i6)

      endif

c  Perform exclusive OR.

      call gixor(x, 5, work)

c  Display resulting vector.

      if (iam .eq. 0) write(*, 200) (x(i), i = 1, 5)
200   format('Vector exclusive ORed with all-ones vector: ', 5i6)

      end
