#include <sys/time.h>
#include <ffi.h>
#include <dlfcn.h>
#include <cstring>
#include "nlc-rt.h"
#include "term.h"
#include "diag.h"
#include "module.h"
#include "context.h"
Go to the source code of this file.
|
ObjPtr | CreateTensor (torch::Tensor tensor) |
|
void | ConvertStringToTensor (const std::string &from, torch::Tensor &to, ObjType type) |
|
EXTERN_C int | newlang::nlc_prinft_sub_ (char const *format,...) |
|
int | newlang::RunMain (const int arg, const char **argv, const char **penv) |
|
std::string | newlang::GetFileExt (const char *str) |
|
std::string | newlang::AddDefaultFileExt (const char *str, const char *ext_default) |
|
std::string | newlang::ReplaceFileExt (const char *str, const char *ext_old, const char *ext_new) |
|
std::string | newlang::ReadFile (const char *fileName) |
|
std::string | newlang::GetDoc (std::string name) |
|
std::string | newlang::MakeConstructorName (std::string name) |
|
std::string | newlang::MakeLocalName (std::string name) |
|
ObjType | newlang::typeFromString (TermPtr &term, RunTime *rt, bool *has_error) |
|
◆ INCLUDED_RUNTIME_CPP_
#define INCLUDED_RUNTIME_CPP_ |
◆ DEADLOCK_TIMEOUT
#define DEADLOCK_TIMEOUT std::chrono::seconds(5) |
◆ SCOPE_LOCK_DEADLOCK_MESSAGE
#define SCOPE_LOCK_DEADLOCK_MESSAGE |
( |
| THIS | ) |
LOG_RUNTIME("Deadlock timeout!") |
◆ SCOPE_LOCK_READ_NAME
#define SCOPE_LOCK_READ_NAME |
( |
| THIS, |
|
|
| VARNAME ) |
Value: ReadLock VARNAME(*THIS, std::defer_lock);\
SCOPE_LOCK_DEADLOCK_MESSAGE(THIS)
std::shared_lock< Lock > ReadLock
Definition at line 174 of file runtime.h.
◆ SCOPE_LOCK_WRITE_NAME
#define SCOPE_LOCK_WRITE_NAME |
( |
| THIS, |
|
|
| VARNAME ) |
Value:
SCOPE_LOCK_DEADLOCK_MESSAGE(THIS)
std::unique_lock< Lock > WriteLock
Definition at line 178 of file runtime.h.
◆ SCOPE_LOCK_READ
◆ SCOPE_LOCK_WRITE
◆ CreateTensor()
ObjPtr CreateTensor |
( |
torch::Tensor | tensor | ) |
|
◆ ConvertStringToTensor()
void ConvertStringToTensor |
( |
const std::string & | from, |
|
|
torch::Tensor & | to, |
|
|
ObjType | type ) |