Questions tagged [c-api]

154 questions
0
votes
1 answer

Tcl convertion to double not working with large examples

I have a list of dicts and I want to retrieve some values of these dicts. Here is the code: void Get_Dict_Value(Tcl_Interp *interp, Tcl_Obj *dict, const char* key, std::function data_handler) { Tcl_Obj* val_ptr; Tcl_Obj*…
João Paulo
  • 6,300
  • 4
  • 51
  • 80
0
votes
1 answer

Correct way of using janet_wrap_array

I am trying to use janet c api on ncurses and I am not getting what I expected. I tried to define the function as such on the c file static Janet jgetyx(int32_t argc, Janet *argv){ janet_fixarity(argc, 1); WINDOW *win = (WINDOW *)…
0
votes
1 answer

Print DST from the TZ time format

I have an API, which reads the time format from TZ variable using getenv EST+5EDT,M3.2.0/2,M11.1.0/2 Here M3.2.0/2 is the DST begin date and time M11.1.0/2 is the DST end date and time Note: |This format specifies day d of week w of month m. The…
harini
  • 3
  • 3
0
votes
0 answers

C API to get start and end date of DST using tz database

I want to print the start and end date of DST when the tz data is given using a C code. I know that I can use getenv to read the TZ variable. When I use this I get the local time/required time of the zone. But I want to get the DST Start and End…
harini
  • 3
  • 3
0
votes
1 answer

Tensorflow C API - Problem with the Input Tensor

I'm working with the Tensorflow API for C to load a pre-trained model in python and run predictions in an embedded compiled program. The model I'm using takes a string as input, which is converted to a tensor, and gives a single float as output. The…
Mallo
  • 1
0
votes
1 answer

Python C-extention levels of indirection

I am trying to write a simple python extention in C. However, it keeps throwing these errors about levels of indirection when I try to compile the setup.py. I am quite a noob at C, but after error googling for some time I think there is something…
0
votes
1 answer

Tensorflow C API returns wrong results for RGB images

I'm trying to implement the Tensorflow C API for a C++ Plugin Environment, but the segmentation results differ from the Python graph. I was told it maybe has to do something with the correct casting to float/uint8, because the resulting image seems…
0
votes
1 answer

Resizing the input dimension in TensorFlow Lite C API when using a model created with make_image_classifier

Apologies if this questions looks familiar, I had posted a more broader description of the problem earlier but I have since deleted it as I have made some progress in my investigation and can narrow down to more specific questions. Context: I am…
0
votes
1 answer

TF_SessionRun of TensorFlow C API cannot run a session created in another member function

I have a C++ class RF with two member functions: load() for loading savedmodel (.pb) and detect() for running the model multiple times for inference. I have another C++ class IMPL with two functions: one initialize() and the other create(). One…
fisakhan
  • 704
  • 1
  • 9
  • 27
0
votes
1 answer

Problem printing output from tensorflow, specific to C api

I am currently trying to transfer a tensorflow model I produced and have saved in python to something compatible with C++, my model is running succesfully apart from the fact that it gives wildly different numbers to the python version. int…
0
votes
1 answer

Reshape input layer 'requested shape' size always 'input shape' size squared

I am trying to run a SavedModel using the C-API. When it comes to running TF_SessionRun it always fails on various input nodes with the same error. TF_SessionRun status: 3:Input to reshape is a tensor with 6 values, but the requested shape has…
James
  • 9,064
  • 3
  • 31
  • 49
0
votes
1 answer

Delphi usage of sqlite3_db_config()

I am trying to set the SQLITE_DBCONFIG_MAINDBNAME option via sqlite3_db_config() to a custom one, but I still have problems with these pointers in Delphi 10.3. The connection runs fine, but a later PRAGMA database_list returns not what I previously…
Anse
  • 1,573
  • 12
  • 27
0
votes
1 answer

How to decrypt encrypted emails of lotus notes pro-grammatically?

I am using the C API to fetch the email document property. Currently, I am facing some issues while retrieving the encrypted emails from Lotus Notes. On analyzing the properties of the encrypted email document, I found that the encrypted email data…
0
votes
1 answer

Calling a Go callback from a threaded low-level C/C++ code layer in a Go application

I have a Go application and some C API function (e.g. some Win32 API function) that works asynchronously and spawns worker threads. This API function calls callbacks from some of those worker threads. The threads are system ones and are created…
Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121
0
votes
1 answer

Getting old results when iterating over sqlite3_next_stmt()

I have a graphical interface which can display multiple SQLite query results in their own tabs. Now, I am finalizing a sqlite3_stmt statement when the user closes its tab, not immediately. If there is more than one tab/result, the first one gives me…
Anse
  • 1,573
  • 12
  • 27