msl.examples.loadlib.fortran64 module
Communicates with fortran_lib32 via the Fortran32
class.
Example of a module that can be executed within a 64-bit Python interpreter which can
communicate with a 32-bit library, fortran_lib32, that is hosted
by a 32-bit Python server, fortran32
. A 64-bit process cannot load a 32-bit
library and therefore inter-process communication is used to interact with
a 32-bit library from a 64-bit process.
Fortran64
is the 64-bit client and Fortran32
is the 32-bit server for inter-process communication.
- class msl.examples.loadlib.fortran64.Fortran64
Bases:
Client64
Communicates with the 32-bit FORTRAN fortran_lib32 library.
This class demonstrates how to communicate with a 32-bit FORTRAN library if an instance of this class is created within a 64-bit Python interpreter.
- sum_8bit(a, b)
Send a request to add two 8-bit signed integers.
See the corresponding 32-bit
sum_8bit()
method.
- sum_16bit(a, b)
Send a request to add two 16-bit signed integers.
See the corresponding 32-bit
sum_16bit()
method.
- sum_32bit(a, b)
Send a request to add two 32-bit signed integers.
See the corresponding 32-bit
sum_32bit()
method.
- sum_64bit(a, b)
Send a request to add two 64-bit signed integers.
See the corresponding 32-bit
sum_64bit()
method.
- multiply_float32(a, b)
Send a request to multiply two FORTRAN floating-point numbers.
See the corresponding 32-bit
multiply_float32()
method.
- multiply_float64(a, b)
Send a request to multiply two FORTRAN double-precision numbers.
See the corresponding 32-bit
multiply_float64()
method.
- is_positive(a)
Returns whether the value of the input argument is > 0.
See the corresponding 32-bit
is_positive()
method.
- add_or_subtract(a, b, do_addition)
Add or subtract two integers.
See the corresponding 32-bit
add_or_subtract()
method.
- factorial(n)
Compute the n’th factorial.
See the corresponding 32-bit
factorial()
method.
- standard_deviation(data)
Compute the standard deviation.
See the corresponding 32-bit
standard_deviation()
method.
- besselJ0(x)
Compute the Bessel function of the first kind of order 0 of x.
See the corresponding 32-bit
besselJ0()
method.
- reverse_string(original)
Reverse a string.
See the corresponding 32-bit
reverse_string()
method.
- add_1d_arrays(a1, a2)
Perform an element-wise addition of two 1D double-precision arrays.
See the corresponding 32-bit
add_1d_arrays()
method.