811,972
questions
0
votes
0
answers
11
views
Can I use a C++ macro to get a filename out of a variable and create an identifier from it?
I have many C++ (SFML) projects in which I loaded resources through filename paths. Now I'd like to embed those resource files so that I can put standalone executables on GitHub. (I've been running ...
1
vote
0
answers
23
views
Is there a way to check if 128-bit integers are available
I'm working on a fixed-point math library. The accepted way of handling multiplications for fixed-point numbers is to multiply them into an integer variable that's larger than what you're storing, ...
0
votes
0
answers
30
views
Best way to hide platform-specific type in C++ header
I am creating a cross-platform font rasterization class that uses platform-specific types across macOS, Linux, and Windows. The header is basically the same, except NativeFontType should be ...
0
votes
0
answers
20
views
Tensorflow model weights not loading correctly
i'm trying to load a tensorflow neural network in c++ for a chess engine. the model was trained in python and i'm converting the weights to a binary file, but the dimensions are wrong when loading in ...
0
votes
1
answer
26
views
friend template function results in Undefined symbols bug error
Context:
The program is supposed to have a template for a single linked list where you can find info through the key. I meant to implement a split function that would take in one source sequence, ...
1
vote
0
answers
31
views
pthread_cond_broadcast not waking up threads waiting with pthread_cond_wait
I'm just facing a problem with my threads. I'm coding a program that needs to execute asynchronous tasks, and I do it via a thread pool.
To avoid my threads running in the void when they have nothing ...
0
votes
0
answers
54
views
The fastest MOD algorithm in C++ for extremely large uint_64_t numbers stored in an array
I am working with extremely large numbers and would like to verify my Karatsuba multiplication result ((2^136279841)-1)^2 which needs (532 344 * _m256i_epi64)^2 i.e. 4,258,752 uint64_t to store the ...
0
votes
0
answers
24
views
Visual Studio profiler for C++ for a model driven profject using ecore and uml metamodels
I have been working on something similar like this. I am working on a project which follows model driven approach in c++ using ecore, uml metamodel. I was looking for a way to profile c++ codes for ...
0
votes
0
answers
34
views
c++ dll loading: Call function before global variable constructors
I'm working on a plugin based system that uses shared libraries for the plugins. I want to set up some static variables in these libraries so I can use them in various places, including global ...
2
votes
1
answer
41
views
AVX(2)/SIMD way to get/set (to 1) a single bit in a 256 bit register
Current but hacky approach is this:
__m256i bitset(__m256i source, uint8_t index) {
uint8_t pos_in_64 = index % 64;
uint8_t location = index / 64;
uint64_t bitmask = 1ULL << ...
0
votes
0
answers
16
views
Cannot use Cpp Library on ESP32 PlatformIO [duplicate]
This question is specific to PlatformIO extension
I am working on a little project in which I use an ESP32 to send me an email with the weather report every mornings.
I already took care of the email ...
2
votes
1
answer
46
views
what are "const-correctness" rules for initializing/binding pointers and references to pointers?
Given that there are 4 "constness" flavors of pointers:
B * = non-const pointer to non-const B
const B * = non-const pointer to const B aka
B ...
-2
votes
1
answer
76
views
Is there a definitive umbrella term to refer to both operator precedence and associativity? [closed]
Full Question:
In programming languages such as C and C++, is there an umbrella term (super-category term, collective term, etc.) to simultaneously refer to both the concepts of operator precedence ...
0
votes
0
answers
33
views
Memory deallocation issue with parent nodes in C++ reverse-mode autodiff
I am implementing reverse-mode automatic differentiation in C++ but am encountering an issue where the memory of parent functions (variables) is getting deallocated when I create new functions that ...
-2
votes
0
answers
41
views
2 injected dlls showing different values in memory
So i have 2 different dlls that i am injecting into an application. I am trying to port a dll someone else wrote from rust to c++. When i inject both of them i read in different values from memory in ...