*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/csmg (3)              
Title
Content
Arch
Section
 

Contents


CSMG(3I)					       Last changed: 2-5-98

NAME    [Toc]    [Back]

     CSMG - Performs a conditional scalar merge

SYNOPSIS    [Toc]    [Back]

     CSMG ([I=]i, [J=]j, [K=]k)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     The CSMG intrinsic	function merges	i and j, controlled by the bit mask
     in	k.  When a 1 bit appears in k, the corresponding bit of	i becomes
     the corresponding bit of the result.  When	a 0 bit	appears	in k, the
     corresponding bit of j is taken.  Therefore, CSMG(i, j, k)	equals the
     following specification:

	  (i .AND. k) .OR. (j .AND. .NOT. k)

     The CSMG function accepts the following arguments:

     i	  First	item to	be merged.  Can	be of Boolean, integer,	real, or
	  Cray pointer type.

	  If i is of type integer or real, it must be of KIND=8	on UNICOS
	  and UNICOS/mk	systems.  On IRIX systems, i can be of KIND=4 or
	  KIND=8, but it must be the same length as j and k.

     j	  Second item to be merged.  Can be of Boolean,	integer, real, or
	  Cray pointer type.

	  If j is of type integer or real, it must be of KIND=8	on UNICOS
	  and UNICOS/mk	systems.  On IRIX systems, j can be of KIND=4 or
	  KIND=8, but it must be the same length as i and k.

     k	  Bit mask.  Can be of Boolean,	integer, real, or Cray pointer
	  type.

	  If k is of type integer or real, it must be of KIND=8	on UNICOS
	  and UNICOS/mk	systems.  On IRIX systems, k can be of KIND=4 or
	  KIND=8, but it must be the same length as i and j.

     CSMG is an	elemental function.  The name of this intrinsic	cannot be
     passed as an argument.

NOTES    [Toc]    [Back]

     The CSMG intrinsic	function is outmoded.  Refer to	the Fortran
     Language Reference	Manual,	Volume 3, publication SR-3905, for
     information on outmoded features and their	preferred standard
     alternatives.

RETURN VALUES    [Toc]    [Back]

     The return	value is of Boolean type.

EXAMPLES    [Toc]    [Back]

     Example 1:	 Specifying CSMG(i,j,MASK(64) or CSMG(i,j,-1) returns i.

     Example 2:	 CSMG(i,j,0) returns j.

     Example 3:	 Specifying the	conditional scalar merge CSMG( 'ABCDEFGH'H,
     '12345678'H, X'0000FFFFFF0000FF' )	generates '12CDE67H'H as the
     result.

     Example 4:	 This example applies only to UNICOS systems.

		INTEGER	EXPONENT,EXPMASK
		PARAMETER( EXPMASK = X'7FFF000000000000' )
	  C Statement function:
		EXPONENT(X) = SHIFTR(X .AND. EXPMASK, 48)
	  C Statement function:
		DIVBY2(X) =
	      &	CSMG( SHIFTL(EXPONENT(X)-1,48),
	      &	      X,
	      &	      EXPMASK )

     According to this example,	a call to DIVBY2(-28.0)	yields -14.0.

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.
CSMG(3I)					       Last changed: 2-5-98

NAME    [Toc]    [Back]

     CSMG - Performs a conditional scalar merge

SYNOPSIS    [Toc]    [Back]

     CSMG ([I=]i, [J=]j, [K=]k)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     The CSMG intrinsic	function merges	i and j, controlled by the bit mask
     in	k.  When a 1 bit appears in k, the corresponding bit of	i becomes
     the corresponding bit of the result.  When	a 0 bit	appears	in k, the
     corresponding bit of j is taken.  Therefore, CSMG(i, j, k)	equals the
     following specification:

	  (i .AND. k) .OR. (j .AND. .NOT. k)

     The CSMG function accepts the following arguments:

     i	  First	item to	be merged.  Can	be of Boolean, integer,	real, or
	  Cray pointer type.

	  If i is of type integer or real, it must be of KIND=8	on UNICOS
	  and UNICOS/mk	systems.  On IRIX systems, i can be of KIND=4 or
	  KIND=8, but it must be the same length as j and k.

     j	  Second item to be merged.  Can be of Boolean,	integer, real, or
	  Cray pointer type.

	  If j is of type integer or real, it must be of KIND=8	on UNICOS
	  and UNICOS/mk	systems.  On IRIX systems, j can be of KIND=4 or
	  KIND=8, but it must be the same length as i and k.

     k	  Bit mask.  Can be of Boolean,	integer, real, or Cray pointer
	  type.

	  If k is of type integer or real, it must be of KIND=8	on UNICOS
	  and UNICOS/mk	systems.  On IRIX systems, k can be of KIND=4 or
	  KIND=8, but it must be the same length as i and j.

     CSMG is an	elemental function.  The name of this intrinsic	cannot be
     passed as an argument.

NOTES    [Toc]    [Back]

     The CSMG intrinsic	function is outmoded.  Refer to	the Fortran
     Language Reference	Manual,	Volume 3, publication SR-3905, for
     information on outmoded features and their	preferred standard
     alternatives.

RETURN VALUES    [Toc]    [Back]

     The return	value is of Boolean type.

EXAMPLES    [Toc]    [Back]

     Example 1:	 Specifying CSMG(i,j,MASK(64) or CSMG(i,j,-1) returns i.

     Example 2:	 CSMG(i,j,0) returns j.

     Example 3:	 Specifying the	conditional scalar merge CSMG( 'ABCDEFGH'H,
     '12345678'H, X'0000FFFFFF0000FF' )	generates '12CDE67H'H as the
     result.

     Example 4:	 This example applies only to UNICOS systems.

		INTEGER	EXPONENT,EXPMASK
		PARAMETER( EXPMASK = X'7FFF000000000000' )
	  C Statement function:
		EXPONENT(X) = SHIFTR(X .AND. EXPMASK, 48)
	  C Statement function:
		DIVBY2(X) =
	      &	CSMG( SHIFTL(EXPONENT(X)-1,48),
	      &	      X,
	      &	      EXPMASK )

     According to this example,	a call to DIVBY2(-28.0)	yields -14.0.

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.
[ Back ]
 Similar pages
Name OS Title
cvmg IRIX Conditional vector merge functions
sem_trywait Tru64 Performs (or conditionally performs) a semaphore lock (P1003.1b)
sem_wait Tru64 Performs (or conditionally performs) a semaphore lock (P1003.1b)
test Tru64 Evaluates conditional expressions
[ Tru64 Evaluates conditional expressions
dhcp-eval FreeBSD ISC DHCP conditional evaluation
slaeda IRIX compute the Z vector corresponding to the merge step in the CURLVLth step of the merge process with TLVLS step
dlaeda IRIX compute the Z vector corresponding to the merge step in the CURLVLth step of the merge process with TLVLS step
nistest HP-UX return the state of the NIS+ namespace using a conditional expression
shape IRIX Returns the shape of an array or a scalar
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service