Graph Framework
Loading...
Searching...
No Matches
graph_fortran Module Reference

Module contains subroutines for calling this from fortran. More...

Data Types

interface  graph_add
 Create Addition node. More...
 
interface  graph_add_converge_item
 Add workflow converge item. More...
 
interface  graph_add_item
 Add workflow item. More...
 
interface  graph_add_pre_item
 Add pre workflow item. More...
 
interface  graph_atan
 Create atan node. More...
 
interface  graph_compile
 Compile the work items. More...
 
interface  graph_complex_double_context
 Interface for the graph_context constructor with complex double type. More...
 
interface  graph_complex_float_context
 Interface for the graph_context constructor with complex float type. More...
 
interface  graph_constant
 Create a constant node. More...
 
interface  graph_constant_c
 Create a constant node with complex values. More...
 
interface  graph_construct_context
 Construct a C context. More...
 
type  graph_context
 Class object for the binding. More...
 
interface  graph_copy_to_device
 Copy data to a device buffer. More...
 
interface  graph_copy_to_host
 Copy data to a host buffer. More...
 
interface  graph_cos
 Create Cosine node. More...
 
interface  graph_destroy_context
 Destroy C context. More...
 
interface  graph_df
 Take derivative ∂f∂x. More...
 
interface  graph_div
 Create Divide node. More...
 
interface  graph_double_context
 Interface for the graph_context constructor with double type. More...
 
interface  graph_erfi
 Create Erfi node. More...
 
interface  graph_exp
 Create Exp node. More...
 
interface  graph_float_context
 Interface for the graph_context constructor with float type. More...
 
interface  graph_get_max_concurrency
 Get the maximum number of concurrent devices. More...
 
interface  graph_log
 Create Log node. More...
 
interface  graph_mul
 Create Multiply node. More...
 
interface  graph_piecewise_1d
 Create 1D piecewise node with complex double buffer. More...
 
interface  graph_piecewise_2d
 Create 2D piecewise node. More...
 
interface  graph_pow
 Create pow node. More...
 
interface  graph_pre_run
 Run pre work items. More...
 
interface  graph_print
 Print a value from nodes. More...
 
interface  graph_pseudo_variable
 Create a pseudo variable node. More...
 
interface  graph_random
 Create Random node. More...
 
interface  graph_random_state
 Construct a random state node. More...
 
interface  graph_remove_pseudo
 Remove pseudo. More...
 
interface  graph_run
 Run work items. More...
 
interface  graph_set_device_number
 Choose the device number. More...
 
interface  graph_set_variable
 Set a variable value. More...
 
interface  graph_sin
 Create Sine node. More...
 
interface  graph_sqrt
 Create Sqrt node. More...
 
interface  graph_sub
 Create Substract node. More...
 
interface  graph_variable
 Create a variable node. More...
 
interface  graph_wait
 Wait for work items to complete. More...
 
interface  objc_autoreleasepoolpop
 Auto release pool pop interface. More...
 
interface  objc_autoreleasepoolpush
 Auto release pool push interface. More...
 

Enumerations

enum  { float_t , double_t , complex_float_t , complex_double_t }
 

Functions/Subroutines

integer(c_intptr_t) function graph_ptr (node)
 Convert a node to the pointer value.
 
class(graph_context) function, pointer graph_construct_float (use_safe_math)
 Construct a graph_context object with float type.
 
class(graph_context) function, pointer graph_construct_double (use_safe_math)
 Construct a graph_context object with double type.
 
class(graph_context) function, pointer graph_construct_complex_float (use_safe_math)
 Construct a graph_context object with complex float type.
 
class(graph_context) function, pointer graph_construct_complex_double (use_safe_math)
 Construct a graph_context object with complex double type.
 
subroutine graph_destruct (this)
 Deconstruct a graph_context object.
 
type(c_ptr) function graph_context_variable (this, size, symbol)
 Create variable node.
 
type(c_ptr) function graph_context_constant_real (this, value)
 Create a constant node.
 
subroutine graph_context_set_variable_float (this, var, value)
 Set the value of a variable float types.
 
subroutine graph_context_set_variable_double (this, var, value)
 Set the value of a variable double types.
 
subroutine graph_context_set_variable_cfloat (this, var, value)
 Set the value of a variable complex float types.
 
subroutine graph_context_set_variable_cdouble (this, var, value)
 Set the value of a variable complex double types.
 
function graph_context_constant_complex (this, real_value, img_valu
 Create constant node with complex values.
 
function graph_context_pseudo_variable (this, var)
 Create pseudo variable node.
 
type(c_ptr) function graph_context_remove_pseudo (this, var)
 Remove pseudo.
 
type(c_ptr) function graph_context_add (this, left, right)
 Create Addition node.
 
type(c_ptr) function graph_context_sub (this, left, right)
 Create Subtract node.
 
type(c_ptr) function graph_context_mul (this, left, right)
 Create Multiply node.
 
type(c_ptr) function graph_context_div (this, left, right)
 Create Divide node.
 
type(c_ptr) function graph_context_sqrt (this, arg)
 Create Sqrt node.
 
type(c_ptr) function graph_context_exp (this, arg)
 Create Exp node.
 
type(c_ptr) function graph_context_log (this, arg)
 Create Log node.
 
type(c_ptr) function graph_context_pow (this, left, right)
 Create Pow node.
 
type(c_ptr) function graph_context_erfi (this, arg)
 Create erfi node.
 
type(c_ptr) function graph_context_sin (this, arg)
 Create Sine node.
 
type(c_ptr) function graph_context_cos (this, arg)
 Create Cosine node.
 
type(c_ptr) function graph_context_atan (this, left, right)
 Create atan node.
 
type(c_ptr) function graph_context_random_state (this, seed)
 Get random size.
 
type(c_ptr) function graph_context_random (this, state)
 Create random node.
 
function graph_context_piecewise_1d_float (this, arg, scale, offset
 Create 1D piecewise node with float buffer.
 
function graph_context_piecewise_1d_double (this, arg, scale, offse
 Create 1D piecewise node with double buffer.
 
type(c_ptr) function graph_context_piecewise_1d_cfloat (this, arg, scale, offse
 Create 1D piecewise node with complex float buffer.
 
type(c_ptr) function graph_context_piecewise_1d_cdouble (this, arg, scale, offs
 Create 1D piecewise node with complex double buffer.
 
type(c_ptr) function graph_context_piecewise_2d_float (this,
 Create 2D piecewise node with float buffer.
 
type(c_ptr) function graph_context_piecewise_2d_double (this,
 Create 2D piecewise node with double buffer.
 
type(c_ptr) function graph_context_piecewise_2d_cfloat (this,
 Create 2D piecewise node with complex float buffer.
 
type(c_ptr) function graph_context_piecewise_2d_cdouble (this,
 Create 2D piecewise node with complex double buffer.
 
function graph_context_get_max_concurrency (this)
 Get the maximum number of concurrent devices.
 
subroutine graph_context_set_device_number (this, num)
 Choose the device number.
 
subroutine graph_context_add_pre_item (this, inputs, outputs,
 Add pre workflow item.
 
subroutine graph_context_add_item (this, inputs, outputs,
 Add workflow item.
 
subroutine graph_context_add_converge_item (this, inputs, outputs,
 Add workflow converge item.
 
subroutine graph_context_compile (this)
 Compile the work items.
 
subroutine graph_context_pre_run (this)
 Run pre work items.
 
subroutine graph_context_run (this)
 Run work items.
 
subroutine graph_context_wait (this)
 Wait for work items to complete.
 
type(c_ptr) function graph_context_df (this, fnode, xnode)
 Take derivative ∂f∂x.
 
subroutine graph_context_copy_to_device_float (this, node, source)
 Copy float data to a device buffer.
 
subroutine graph_context_copy_to_device_double (this, node, source)
 Copy double data to a device buffer.
 
subroutine graph_context_copy_to_device_cfloat (this, node, source)
 Copy complex float data to a device buffer.
 
subroutine graph_context_copy_to_device_cdouble (this, node, source
 Copy complex double data to a device buffer.
 
subroutine graph_context_copy_to_host_float (this, node, destinatio
 Copy data to a host float buffer.
 
subroutine graph_context_copy_to_host_double (this, node, destinati
 Copy data to a host double buffer.
 
subroutine graph_context_copy_to_host_cfloat (this, node, destinati
 Copy data to a host complex float buffer.
 
subroutine graph_context_copy_to_host_cdouble (this, node, destinat
 Copy data to a host complex double buffer.
 
subroutine graph_context_print (this, index, nodes)
 Print a value from nodes.
 

Variables

integer(c_intptr_t), dimension(0) graph_null_array
 A null array for empty.
 

Detailed Description

Module contains subroutines for calling this from fortran.

Function/Subroutine Documentation

◆ graph_construct_complex_double()

class(graph_context) function, pointer graph_fortran::graph_construct_complex_double ( logical(c_bool), intent(in)  use_safe_math)

Construct a graph_context object with complex double type.

Allocate memory for the graph_context and initalize the c context with a complex double type.

Parameters
[in]use_safe_mathUse safe math.

◆ graph_construct_complex_float()

class(graph_context) function, pointer graph_fortran::graph_construct_complex_float ( logical(c_bool), intent(in)  use_safe_math)

Construct a graph_context object with complex float type.

Allocate memory for the graph_context and initalize the c context with a complex float type.

Parameters
[in]use_safe_mathUse safe math.

◆ graph_construct_double()

class(graph_context) function, pointer graph_fortran::graph_construct_double ( logical(c_bool), intent(in)  use_safe_math)

Construct a graph_context object with double type.

Allocate memory for the graph_context and initalize the c context with a double type.

Parameters
[in]use_safe_mathUse safe math.

◆ graph_construct_float()

class(graph_context) function, pointer graph_fortran::graph_construct_float ( logical(c_bool), intent(in)  use_safe_math)

Construct a graph_context object with float type.

Allocate memory for the graph_context and initalize the c context with a double type.

Parameters
[in]use_safe_mathOptional use safe math.

◆ graph_context_add()

type(c_ptr) function graph_fortran::graph_context_add ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  left,
type(c_ptr), intent(in)  right 
)

Create Addition node.

Parameters
[in,out]thisgraph_context instance.
[in]leftThe graph to remove pseudo variables.
[in]rightThe graph to remove pseudo variables.
Returns
left + right

◆ graph_context_add_converge_item()

subroutine graph_fortran::graph_context_add_converge_item ( class(graph_context), intent(inout)  this,
integer(c_intptr_t), dimension(:), intent(in)  inputs,
integer(c_intptr_t), dimension(:), intent(in)  outputs 
)

Add workflow converge item.

Parameters
[in,out]thisgraph_context instance.
[in]inputsArray of input nodes.
[in]outputsArray of output nodes.
[in]map_inputsArray of map input nodes.
[in]map_outputsArray of map output nodes.
[in]random_stateOptional random state, can be NULL if not used.
[in]nameName for the kernel.
[in]num_particlesNumber of elements to operate on.
[in]tolMaximum tolarance to converge to.
[in]max_iterMaximum number of iterations for convergence.

◆ graph_context_add_item()

subroutine graph_fortran::graph_context_add_item ( class(graph_context), intent(inout)  this,
integer(c_intptr_t), dimension(:), intent(in)  inputs,
integer(c_intptr_t), dimension(:), intent(in)  outputs 
)

Add workflow item.

Parameters
[in,out]thisgraph_context instance.
[in]inputsArray of input nodes.
[in]outputsArray of output nodes.
[in]map_inputsArray of map input nodes.
[in]map_outputsArray of map output nodes.
[in]random_stateOptional random state, can be NULL if not used.
[in]nameName for the kernel.
[in]num_particlesNumber of elements to operate on.

◆ graph_context_add_pre_item()

subroutine graph_fortran::graph_context_add_pre_item ( class(graph_context), intent(inout)  this,
integer(c_intptr_t), dimension(:), intent(in)  inputs,
integer(c_intptr_t), dimension(:), intent(in)  outputs 
)

Add pre workflow item.

Parameters
[in,out]thisgraph_context instance.
[in]inputsArray of input nodes.
[in]outputsArray of output nodes.
[in]map_inputsArray of map input nodes.
[in]map_outputsArray of map output nodes.
[in]random_stateOptional random state, can be NULL if not used.
[in]nameName for the kernel.
[in]num_particlesNumber of elements to operate on.

◆ graph_context_atan()

type(c_ptr) function graph_fortran::graph_context_atan ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  left,
type(c_ptr), intent(in)  right 
)

Create atan node.

Parameters
[in,out]thisgraph_context instance.
[in]leftThe graph to remove pseudo variables.
[in]rightThe graph to remove pseudo variables.
Returns
atan(left, right)

◆ graph_context_compile()

subroutine graph_fortran::graph_context_compile ( class(graph_context), intent(in)  this)

Compile the work items.

Parameters
[in]thisgraph_context instance.

◆ graph_context_constant_complex()

function graph_fortran::graph_context_constant_complex ( class(graph_context), intent(inout)  this,
real(c_double), intent(in)  real_value,
  img_valu 
)

Create constant node with complex values.

Parameters
[in,out]thisgraph_context instance.
[in]real_valueThe real component.
[in]img_valueThe imaginary component.
Returns
A constant node.

◆ graph_context_constant_real()

type(c_ptr) function graph_fortran::graph_context_constant_real ( class(graph_context), intent(inout)  this,
real(c_double), intent(in)  value 
)

Create a constant node.

Parameters
[in,out]thisgraph_context instance.
[in]valueSize of the data buffer.
Returns
A constant node.

◆ graph_context_copy_to_device_cdouble()

subroutine graph_fortran::graph_context_copy_to_device_cdouble ( class(graph_context), intent(in)  this,
type(c_ptr), intent(in)  node,
complex(c_double_complex), dimension(:), intent(in)  source 
)

Copy complex double data to a device buffer.

Parameters
[in]thisgraph_context instance.
[in]nodeNode to copy to.
[in]sourceSource to copy from.

◆ graph_context_copy_to_device_cfloat()

subroutine graph_fortran::graph_context_copy_to_device_cfloat ( class(graph_context), intent(in)  this,
type(c_ptr), intent(in)  node,
complex(c_float_complex), dimension(:), intent(in)  source 
)

Copy complex float data to a device buffer.

Parameters
[in]thisgraph_context instance.
[in]nodeNode to copy to.
[in]sourceSource to copy from.

◆ graph_context_copy_to_device_double()

subroutine graph_fortran::graph_context_copy_to_device_double ( class(graph_context), intent(in)  this,
type(c_ptr), intent(in)  node,
real(c_double), dimension(:), intent(in)  source 
)

Copy double data to a device buffer.

Parameters
[in]thisgraph_context instance.
[in]nodeNode to copy to.
[in]sourceSource to copy from.

◆ graph_context_copy_to_device_float()

subroutine graph_fortran::graph_context_copy_to_device_float ( class(graph_context), intent(in)  this,
type(c_ptr), intent(in)  node,
real(c_float), dimension(:), intent(in)  source 
)

Copy float data to a device buffer.

Parameters
[in]thisgraph_context instance.
[in]nodeNode to copy to.
[in]sourceSource to copy from.

◆ graph_context_copy_to_host_cdouble()

subroutine graph_fortran::graph_context_copy_to_host_cdouble ( class(graph_context), intent(in)  this,
type(c_ptr), value  node,
complex(c_double_complex), dimension(:), intent(inout)  destinat 
)

Copy data to a host complex double buffer.

Parameters
[in]cThe graph C context.
[in]nodeNode to copy from.
[in,out]destinationHost side buffer to copy to.

◆ graph_context_copy_to_host_cfloat()

subroutine graph_fortran::graph_context_copy_to_host_cfloat ( class(graph_context), intent(in)  this,
type(c_ptr), value  node,
complex(c_float_complex), dimension(:), intent(inout)  destinati 
)

Copy data to a host complex float buffer.

Parameters
[in]cThe graph C context.
[in]nodeNode to copy from.
[in,out]destinationHost side buffer to copy to.

◆ graph_context_copy_to_host_double()

subroutine graph_fortran::graph_context_copy_to_host_double ( class(graph_context), intent(in)  this,
type(c_ptr), value  node,
  destinati 
)

Copy data to a host double buffer.

Parameters
[in]cThe graph C context.
[in]nodeNode to copy from.
[in,out]destinationHost side buffer to copy to.

◆ graph_context_copy_to_host_float()

subroutine graph_fortran::graph_context_copy_to_host_float ( class(graph_context), intent(in)  this,
type(c_ptr), value  node,
  destinatio 
)

Copy data to a host float buffer.

Parameters
[in]thisgraph_context instance.
[in]nodeNode to copy from.
[in,out]destinationHost side buffer to copy to.

◆ graph_context_cos()

type(c_ptr) function graph_fortran::graph_context_cos ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg 
)

Create Cosine node.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
Returns
cos(arg)

◆ graph_context_df()

type(c_ptr) function graph_fortran::graph_context_df ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  fnode,
type(c_ptr), intent(in)  xnode 
)

Take derivative ∂f∂x.

Parameters
[in,out]thisgraph_context instance.
[in]fnodeThe function expression to take the derivative of.
[in]xnodeThe expression to take the derivative with respect to.

◆ graph_context_div()

type(c_ptr) function graph_fortran::graph_context_div ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  left,
type(c_ptr), intent(in)  right 
)

Create Divide node.

Parameters
[in,out]thisgraph_context instance.
[in]leftThe graph to remove pseudo variables.
[in]rightThe graph to remove pseudo variables.
Returns
left/right

◆ graph_context_erfi()

type(c_ptr) function graph_fortran::graph_context_erfi ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg 
)

Create erfi node.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
Returns
erfi(arg)

◆ graph_context_exp()

type(c_ptr) function graph_fortran::graph_context_exp ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg 
)

Create Exp node.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
Returns
exp(arg)

◆ graph_context_get_max_concurrency()

function graph_fortran::graph_context_get_max_concurrency ( class(graph_context), intent(in)  this)

Get the maximum number of concurrent devices.

Parameters
[in]thisgraph_context instance.
Returns
The number of devices.

◆ graph_context_log()

type(c_ptr) function graph_fortran::graph_context_log ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg 
)

Create Log node.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
Returns
log(arg)

◆ graph_context_mul()

type(c_ptr) function graph_fortran::graph_context_mul ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  left,
type(c_ptr), intent(in)  right 
)

Create Multiply node.

Parameters
[in,out]thisgraph_context instance.
[in]leftThe graph to remove pseudo variables.
[in]rightThe graph to remove pseudo variables.
Returns
left*right

◆ graph_context_piecewise_1d_cdouble()

type(c_ptr) function graph_fortran::graph_context_piecewise_1d_cdouble ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg,
real(c_double)  scale,
  offs 
)

Create 1D piecewise node with complex double buffer.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
[in]scaleScale factor argument.
[in]offsetOffset factor argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_piecewise_1d_cfloat()

type(c_ptr) function graph_fortran::graph_context_piecewise_1d_cfloat ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg,
real(c_double)  scale,
  offse 
)

Create 1D piecewise node with complex float buffer.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
[in]scaleScale factor argument.
[in]offsetOffset factor argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_piecewise_1d_double()

function graph_fortran::graph_context_piecewise_1d_double ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg,
real(c_double)  scale,
  offse 
)

Create 1D piecewise node with double buffer.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
[in]scaleScale factor argument.
[in]offsetOffset factor argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_piecewise_1d_float()

function graph_fortran::graph_context_piecewise_1d_float ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg,
real(c_double)  scale,
real(c_double)  offset 
)

Create 1D piecewise node with float buffer.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
[in]scaleScale factor argument.
[in]offsetOffset factor argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_piecewise_2d_cdouble()

type(c_ptr) function graph_fortran::graph_context_piecewise_2d_cdouble ( class(graph_context), intent(inout)  this)

Create 2D piecewise node with complex double buffer.

Parameters
[in,out]thisgraph_context instance.
[in]x_argThe function x argument.
[in]x_scaleScale factor for x argument.
[in]x_offsetOffset factor for x argument.
[in]y_argThe function y argument.
[in]y_scaleScale factor for y argument.
[in]y_offsetOffset factor for y argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_piecewise_2d_cfloat()

type(c_ptr) function graph_fortran::graph_context_piecewise_2d_cfloat ( class(graph_context), intent(inout)  this)

Create 2D piecewise node with complex float buffer.

Parameters
[in,out]thisgraph_context instance.
[in]x_argThe function x argument.
[in]x_scaleScale factor for x argument.
[in]x_offsetOffset factor for x argument.
[in]y_argThe function y argument.
[in]y_scaleScale factor for y argument.
[in]y_offsetOffset factor for y argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_piecewise_2d_double()

type(c_ptr) function graph_fortran::graph_context_piecewise_2d_double ( class(graph_context), intent(inout)  this)

Create 2D piecewise node with double buffer.

Parameters
[in,out]thisgraph_context instance.
[in]x_argThe function x argument.
[in]x_scaleScale factor for x argument.
[in]x_offsetOffset factor for x argument.
[in]y_argThe function y argument.
[in]y_scaleScale factor for y argument.
[in]y_offsetOffset factor for y argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_piecewise_2d_float()

type(c_ptr) function graph_fortran::graph_context_piecewise_2d_float ( class(graph_context), intent(inout)  this)

Create 2D piecewise node with float buffer.

Parameters
[in,out]thisgraph_context instance.
[in]x_argThe function x argument.
[in]x_scaleScale factor for x argument.
[in]x_offsetOffset factor for x argument.
[in]y_argThe function y argument.
[in]y_scaleScale factor for y argument.
[in]y_offsetOffset factor for y argument.
[in]sourceSource buffer to fill elements.
Returns
random(state)

◆ graph_context_pow()

type(c_ptr) function graph_fortran::graph_context_pow ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  left,
type(c_ptr), intent(in)  right 
)

Create Pow node.

Parameters
[in,out]thisgraph_context instance.
[in]leftThe graph to remove pseudo variables.
[in]rightThe graph to remove pseudo variables.
Returns
pow(left, right)

◆ graph_context_pre_run()

subroutine graph_fortran::graph_context_pre_run ( class(graph_context), intent(in)  this)

Run pre work items.

Parameters
[in]thisgraph_context instance.

◆ graph_context_print()

subroutine graph_fortran::graph_context_print ( class(graph_context), intent(in)  this,
integer(c_long), intent(in)  index,
integer(c_intptr_t), dimension(:), intent(in)  nodes 
)

Print a value from nodes.

Parameters
[in]cThe graph C context.
[in]indexParticle index to print.
[in]nodesNodes to print.

◆ graph_context_pseudo_variable()

function graph_fortran::graph_context_pseudo_variable ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  var 
)

Create pseudo variable node.

Parameters
[in,out]thisgraph_context instance.
[in]varThe variable to set.
Returns
The pseudo variable.

◆ graph_context_random()

type(c_ptr) function graph_fortran::graph_context_random ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  state 
)

Create random node.

Parameters
[in,out]thisgraph_context instance.
[in]stateA random state node.
Returns
random(state)

◆ graph_context_random_state()

type(c_ptr) function graph_fortran::graph_context_random_state ( class(graph_context), intent(inout)  this,
integer(c_int32_t), intent(in)  seed 
)

Get random size.

Parameters
[in,out]thisgraph_context instance.
[in]seedIntial random seed.
Returns
The random size.

◆ graph_context_remove_pseudo()

type(c_ptr) function graph_fortran::graph_context_remove_pseudo ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  var 
)

Remove pseudo.

Parameters
[in,out]thisgraph_context instance.
[in]varThe graph to remove pseudo variables.
Returns
The graph with pseudo variables removed.

◆ graph_context_run()

subroutine graph_fortran::graph_context_run ( class(graph_context), intent(in)  this)

Run work items.

Parameters
[in]thisgraph_context instance.

◆ graph_context_set_device_number()

subroutine graph_fortran::graph_context_set_device_number ( class(graph_context), intent(inout)  this,
integer(c_long), intent(in)  num 
)

Choose the device number.

Parameters
[in]thisgraph_context instance.
[in]numThe device number.

◆ graph_context_set_variable_cdouble()

subroutine graph_fortran::graph_context_set_variable_cdouble ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  var,
complex(c_double_complex), dimension(:), intent(in)  value 
)

Set the value of a variable complex double types.

Parameters
[in,out]thisgraph_context instance.
[in]varThe variable to set
[in]valueTHe value to set.

◆ graph_context_set_variable_cfloat()

subroutine graph_fortran::graph_context_set_variable_cfloat ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  var,
complex(c_float_complex), dimension(:), intent(in)  value 
)

Set the value of a variable complex float types.

Parameters
[in,out]thisgraph_context instance.
[in]varThe variable to set
[in]valueTHe value to set.

◆ graph_context_set_variable_double()

subroutine graph_fortran::graph_context_set_variable_double ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  var,
real(c_double), dimension(:), intent(in)  value 
)

Set the value of a variable double types.

Parameters
[in,out]thisgraph_context instance.
[in]varThe variable to set
[in]valueTHe value to set.

◆ graph_context_set_variable_float()

subroutine graph_fortran::graph_context_set_variable_float ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  var,
real(c_float), dimension(:), intent(in)  value 
)

Set the value of a variable float types.

Parameters
[in,out]thisgraph_context instance.
[in]varThe variable to set
[in]valueTHe value to set.

◆ graph_context_sin()

type(c_ptr) function graph_fortran::graph_context_sin ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg 
)

Create Sine node.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
Returns
sin(arg)

◆ graph_context_sqrt()

type(c_ptr) function graph_fortran::graph_context_sqrt ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  arg 
)

Create Sqrt node.

Parameters
[in,out]thisgraph_context instance.
[in]argThe function argument.
Returns
sqrt(arg)

◆ graph_context_sub()

type(c_ptr) function graph_fortran::graph_context_sub ( class(graph_context), intent(inout)  this,
type(c_ptr), intent(in)  left,
type(c_ptr), intent(in)  right 
)

Create Subtract node.

Parameters
[in,out]thisgraph_context instance.
[in]leftThe graph to remove pseudo variables.
[in]rightThe graph to remove pseudo variables.
Returns
left - right

◆ graph_context_variable()

type(c_ptr) function graph_fortran::graph_context_variable ( class(graph_context), intent(inout)  this,
integer(c_long), intent(in)  size,
character(kind=c_char,len=*), intent(in)  symbol 
)

Create variable node.

Parameters
[in,out]thisgraph_context instance.
[in]sizeSize of the data buffer.
[in]symbolSymbol of the variable.
Returns
A variable node.

◆ graph_context_wait()

subroutine graph_fortran::graph_context_wait ( class(graph_context), intent(in)  this)

Wait for work items to complete.

Parameters
[in]thisgraph_context instance.

◆ graph_destruct()

subroutine graph_fortran::graph_destruct ( type(graph_context), intent(inout)  this)

Deconstruct a graph_context object.

Deallocate memory and unitialize a graph_context object.

Parameters
[in,out]thisA graph_context instance.

◆ graph_ptr()

integer(c_intptr_t) function graph_fortran::graph_ptr ( type(c_ptr), intent(in)  node)

Convert a node to the pointer value.

Returns
The pointer value.