BitClass Module

This module defines bit-wise operations.



Interfaces

public interface not

logical NOT operation

  • public function notBitFunc(obj) result(ret)

    Arguments

    Type IntentOptional Attributes Name
    type(Bit_), intent(in) :: obj

    Return Value type(Bit_)

public interface reverse

Bit reverse

  • public function reverseBitFunc(obj) result(ret)

    Arguments

    Type IntentOptional Attributes Name
    type(Bit_), intent(in) :: obj

    Return Value type(Bit_)

public interface assignment(=)

assignment

  • public subroutine assignIntBit(x, y)

    Arguments

    Type IntentOptional Attributes Name
    type(Bit_), intent(inout) :: x
    integer(kind=int32), intent(in) :: y

Derived Types

type, public ::  Bit_

This is a derived type for a bit array.

Components

Type Visibility Attributes Name Initial
logical, public, allocatable :: bitArray(:)

Type-Bound Procedures

procedure, public :: init => initBit ../../../

It is a constructor of a bit array

procedure, public :: int => intBit ../../../

It converts bit array into a int value.

procedure, public :: not => notBit ../../../

It converts NOT operation for all bits in a bit array.


Functions

public function intBit(obj) result(ret)

Arguments

Type IntentOptional Attributes Name
class(Bit_), intent(inout) :: obj

Return Value integer(kind=int32)

public function notBitFunc(obj) result(ret)

Arguments

Type IntentOptional Attributes Name
type(Bit_), intent(in) :: obj

Return Value type(Bit_)

public function reverseBitFunc(obj) result(ret)

Arguments

Type IntentOptional Attributes Name
type(Bit_), intent(in) :: obj

Return Value type(Bit_)


Subroutines

public subroutine initBit(obj, n)

Arguments

Type IntentOptional Attributes Name
class(Bit_), intent(inout) :: obj
integer(kind=int32), intent(in) :: n

public subroutine notBit(obj)

Arguments

Type IntentOptional Attributes Name
class(Bit_), intent(inout) :: obj

public subroutine assignIntBit(x, y)

Arguments

Type IntentOptional Attributes Name
type(Bit_), intent(inout) :: x
integer(kind=int32), intent(in) :: y