Loading...
Searching...
No Matches
eonc::IARTnResource Class Referenceabstract

#include <ARTnResource.h>

Inheritance diagram for eonc::IARTnResource:

Public Types

using artn_create_fn = int (*)()
using setup_artn_fn = void (*)(const int nat, bool *cerr)
using artn_fn
using artn_destroy_fn = void (*)()
using set_param_fn
using get_param_fn = int (*)(const char *name, void **cval)
 pARTn bind(C) get_param / get_runparam: type(c_ptr), intent(out).
using get_runparam_fn = int (*)(const char *name, void **cval)
using get_data_fn = int (*)(const char *name, void **cval)
using print_caller_fn = void (*)()
using artn_step_fn
using get_error_fn = int (*)(void **cmsg)
 Retrieve pARTn error code + c_malloc'd message pointer.

Public Member Functions

virtual ~IARTnResource ()=default
virtual void require_loaded ()=0
virtual bool is_loaded () const noexcept=0
virtual artn_create_fn get_create_fn () const =0
virtual setup_artn_fn get_setup_fn () const =0
virtual artn_fn get_artn_fn () const =0
virtual artn_destroy_fn get_destroy_fn () const =0
virtual set_param_fn get_set_param_fn () const =0
virtual get_param_fn get_get_param_fn () const =0
virtual get_runparam_fn get_get_runparam_fn () const =0
virtual get_data_fn get_get_data_fn () const =0
virtual print_caller_fn get_print_caller_fn () const =0
virtual artn_step_fn get_artn_step_fn () const =0
virtual get_error_fn get_get_error_fn () const =0
 May be null on older pARTn builds that predate the C get_error wrapper; callers must null-check before dispatching.
 IARTnResource (const IARTnResource &)=delete
IARTnResource & operator= (const IARTnResource &)=delete

Public Attributes

std::mutex library_mutex
 Serializes access to the Fortran backend's shared global state.

Protected Member Functions

 IARTnResource ()=default

Detailed Description

Definition at line 37 of file ARTnResource.h.

Member Typedef Documentation

◆ artn_create_fn

Definition at line 40 of file ARTnResource.h.

◆ artn_destroy_fn

Definition at line 46 of file ARTnResource.h.

◆ artn_fn

Initial value:
void (*)(const int nat, const double *etot, const double *f,
int const *ityp, double *const tau, const int *order,
const double *lat, const int *if_pos, int *disp_code,
double *disp_vec, bool *lconv)

Definition at line 42 of file ARTnResource.h.

◆ artn_step_fn

Initial value:
void (*)(const int nat, const double etot,
double *const force, int const *ityp,
double *const pos, const double *box,
const int *if_pos, double *displ_vec,
bool *lconv)

Definition at line 56 of file ARTnResource.h.

◆ get_data_fn

using eonc::IARTnResource::get_data_fn = int (*)(const char *name, void **cval)

Definition at line 54 of file ARTnResource.h.

◆ get_error_fn

using eonc::IARTnResource::get_error_fn = int (*)(void **cmsg)

Retrieve pARTn error code + c_malloc'd message pointer.

Defined in m_artn_error.f90 as bind(C, name="get_error"): int get_error(void** cmsg); Non-zero return indicates an error; *cmsg then points at a C-string the caller must std::free. Zero leaves *cmsg null.

Definition at line 66 of file ARTnResource.h.

◆ get_param_fn

using eonc::IARTnResource::get_param_fn = int (*)(const char *name, void **cval)

pARTn bind(C) get_param / get_runparam: type(c_ptr), intent(out).

That is void** in C. The artn.h comment says void*. A void* out parameter writes the allocated pointer at the wrong address.

Definition at line 52 of file ARTnResource.h.

◆ get_runparam_fn

using eonc::IARTnResource::get_runparam_fn = int (*)(const char *name, void **cval)

Definition at line 53 of file ARTnResource.h.

◆ print_caller_fn

Definition at line 55 of file ARTnResource.h.

◆ set_param_fn

Initial value:
int (*)(const char *const name, const int crank,
const int *csize, const void *cval)

Definition at line 47 of file ARTnResource.h.

◆ setup_artn_fn

using eonc::IARTnResource::setup_artn_fn = void (*)(const int nat, bool *cerr)

Definition at line 41 of file ARTnResource.h.

Constructor & Destructor Documentation

◆ ~IARTnResource()

virtual eonc::IARTnResource::~IARTnResource ( )
virtualdefault

◆ IARTnResource() [1/2]

eonc::IARTnResource::IARTnResource ( const IARTnResource & )
delete

◆ IARTnResource() [2/2]

eonc::IARTnResource::IARTnResource ( )
protecteddefault

Member Function Documentation

◆ get_artn_fn()

virtual artn_fn eonc::IARTnResource::get_artn_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_artn_step_fn()

virtual artn_step_fn eonc::IARTnResource::get_artn_step_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_create_fn()

virtual artn_create_fn eonc::IARTnResource::get_create_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_destroy_fn()

virtual artn_destroy_fn eonc::IARTnResource::get_destroy_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_get_data_fn()

virtual get_data_fn eonc::IARTnResource::get_get_data_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_get_error_fn()

virtual get_error_fn eonc::IARTnResource::get_get_error_fn ( ) const
nodiscardpure virtual

May be null on older pARTn builds that predate the C get_error wrapper; callers must null-check before dispatching.

Implemented in eonc::ARTnResource.

◆ get_get_param_fn()

virtual get_param_fn eonc::IARTnResource::get_get_param_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_get_runparam_fn()

virtual get_runparam_fn eonc::IARTnResource::get_get_runparam_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_print_caller_fn()

virtual print_caller_fn eonc::IARTnResource::get_print_caller_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_set_param_fn()

virtual set_param_fn eonc::IARTnResource::get_set_param_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ get_setup_fn()

virtual setup_artn_fn eonc::IARTnResource::get_setup_fn ( ) const
nodiscardpure virtual

Implemented in eonc::ARTnResource.

◆ is_loaded()

virtual bool eonc::IARTnResource::is_loaded ( ) const
nodiscardpure virtualnoexcept

Implemented in eonc::ARTnResource.

◆ operator=()

IARTnResource & eonc::IARTnResource::operator= ( const IARTnResource & )
delete

◆ require_loaded()

virtual void eonc::IARTnResource::require_loaded ( )
pure virtual

Implemented in eonc::ARTnResource.

Member Data Documentation

◆ library_mutex

std::mutex eonc::IARTnResource::library_mutex

Serializes access to the Fortran backend's shared global state.

Definition at line 69 of file ARTnResource.h.


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