Graph Framework
Loading...
Searching...
No Matches
graph_fortran::graph_context Type Reference

Class object for the binding. More...

Public Member Functions

FINAL graph_destruct (this)
 Deconstruct a graph_context object.
 
procedure variable (this, size, symbol)
 Create variable node.
 
procedure constant_real (this, value)
 Create a constant node.
 
procedure constant_complex (this, real_value, img_valu
 Create constant node with complex values.
 
GENERIC constant constant_real, constant_complex
 
procedure set_variable_float graph_context_set_variable_f
 
procedure set_variable_double graph_context_set_variable_
 
procedure set_variable_cfloat graph_context_set_variable_
 
procedure set_variable_cdouble graph_context_set_variable
 
GENERIC set_variable set_variable_float,
 
 set_variable_double set_variable_double
 
 set_variable_cfloat set_variable_cfloat
 
 set_variable_cdouble set_variable_cdouble
 
procedure pseudo_variable (this, var)
 Create pseudo variable node.
 
procedure remove_pseudo (this, var)
 Remove pseudo.
 
procedure add (this, left, right)
 Create Addition node.
 
procedure sub (this, left, right)
 Create Subtract node.
 
procedure mul (this, left, right)
 Create Multiply node.
 
procedure div (this, left, right)
 Create Divide node.
 
procedure sqrt (this, arg)
 Create Sqrt node.
 
procedure exp (this, arg)
 Create Exp node.
 
procedure log (this, arg)
 Create Log node.
 
procedure pow (this, left, right)
 Create Pow node.
 
procedure erfi (this, arg)
 Create erfi node.
 
procedure sin (this, arg)
 Create Sine node.
 
procedure cos (this, arg)
 Create Cosine node.
 
procedure atan (this, left, right)
 Create atan node.
 
procedure random_state (this, seed)
 Get random size.
 
procedure random (this, state)
 Create random node.
 
procedure piecewise_1d_float graph_context_piecewise_1d_f
 
procedure piecewise_1d_double graph_context_piecewise_1d_
 
procedure piecewise_1d_cfloat graph_context_piecewise_1d_
 
procedure piecewise_1d_cdouble
 
 graph_context_piecewise_1d_cdouble (this, arg, scale, offs
 Create 1D piecewise node with complex double buffer.
 
GENERIC piecewise_1d piecewise_1d_float,
 
 piecewise_1d_double piecewise_1d_double
 
 piecewise_1d_cfloat piecewise_1d_cfloat
 
 piecewise_1d_cdouble piecewise_1d_cdouble
 
procedure piecewise_2d_float graph_context_piecewise_2d_f
 
procedure piecewise_2d_double graph_context_piecewise_2d_
 
procedure piecewise_2d_cfloat graph_context_piecewise_2d_
 
procedure piecewise_2d_cdouble graph_context_piecewise_2d
 
GENERIC piecewise_2d piecewise_2d_float,
 
 piecewise_2d_double piecewise_2d_double
 
 piecewise_2d_cfloat piecewise_2d_cfloat
 
 piecewise_2d_cdouble piecewise_2d_cdouble
 
procedure get_max_concurrency graph_context_get_max_concu
 
procedure set_device_number graph_context_set_device_numb
 
procedure add_pre_item (this, inputs, outputs,
 Add pre workflow item.
 
procedure add_item (this, inputs, outputs,
 Add workflow item.
 
procedure add_converge_item graph_context_add_converge_it
 
procedure df (this, fnode, xnode)
 Take derivative ∂f∂x.
 
procedure compile (this)
 Compile the work items.
 
procedure pre_run (this)
 Run pre work items.
 
procedure run (this)
 Run work items.
 
procedure wait (this)
 Wait for work items to complete.
 
procedure copy_to_device_float graph_context_copy_to_devi
 
procedure copy_to_device_double
 
 graph_context_copy_to_device_double (this, node, source)
 Copy double data to a device buffer.
 
procedure copy_to_device_cfloat
 
 graph_context_copy_to_device_cfloat (this, node, source)
 Copy complex float data to a device buffer.
 
procedure copy_to_device_cdouble
 
 graph_context_copy_to_device_cdouble (this, node, source
 Copy complex double data to a device buffer.
 
GENERIC copy_to_device copy_to_device_float,
 
 copy_to_device_double copy_to_device_double
 
 copy_to_device_cfloat copy_to_device_cfloat
 
 copy_to_device_cdouble copy_to_device_cdouble
 
procedure copy_to_host_float graph_context_copy_to_host_f
 
procedure copy_to_host_double graph_context_copy_to_host_
 
procedure copy_to_host_cfloat graph_context_copy_to_host_
 
procedure copy_to_host_cdouble graph_context_copy_to_host
 
GENERIC copy_to_host copy_to_host_float,
 
 copy_to_host_double copy_to_host_double
 
 copy_to_host_cfloat copy_to_host_cfloat
 
 copy_to_host_cdouble copy_to_host_cdouble
 
procedure print (this, index, nodes)
 Print a value from nodes.
 

Public Attributes

type(c_ptr) arp_context
 The auto release pool context.
 
type(c_ptr) c_context
 The graph c context.
 

Detailed Description

Class object for the binding.

Member Function/Subroutine Documentation

◆ add()

procedure 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

◆ add_item()

procedure 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.

◆ add_pre_item()

procedure 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.

◆ atan()

procedure 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)

◆ compile()

procedure graph_fortran::graph_context::compile ( class(graph_context), intent(in)  this)

Compile the work items.

Parameters
[in]thisgraph_context instance.

◆ constant_complex()

procedure 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.

◆ constant_real()

procedure 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.

◆ cos()

procedure 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)

◆ df()

procedure 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.

◆ div()

procedure 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

◆ erfi()

procedure 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)

◆ exp()

procedure 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_copy_to_device_cdouble()

graph_fortran::graph_context::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()

graph_fortran::graph_context::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()

graph_fortran::graph_context::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_piecewise_1d_cdouble()

graph_fortran::graph_context::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_destruct()

FINAL graph_fortran::graph_context::graph_destruct ( type(graph_context), intent(inout)  this)
final

Deconstruct a graph_context object.

Deallocate memory and unitialize a graph_context object.

Parameters
[in,out]thisA graph_context instance.

◆ log()

procedure 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)

◆ mul()

procedure 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

◆ pow()

procedure 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)

◆ pre_run()

procedure graph_fortran::graph_context::pre_run ( class(graph_context), intent(in)  this)

Run pre work items.

Parameters
[in]thisgraph_context instance.

◆ print()

procedure 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.

◆ pseudo_variable()

procedure 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.

◆ random()

procedure 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)

◆ random_state()

procedure 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.

◆ remove_pseudo()

procedure 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.

◆ run()

procedure graph_fortran::graph_context::run ( class(graph_context), intent(in)  this)

Run work items.

Parameters
[in]thisgraph_context instance.

◆ sin()

procedure 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)

◆ sqrt()

procedure 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)

◆ sub()

procedure 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

◆ variable()

procedure 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.

◆ wait()

procedure graph_fortran::graph_context::wait ( class(graph_context), intent(in)  this)

Wait for work items to complete.

Parameters
[in]thisgraph_context instance.

The documentation for this type was generated from the following file: