Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
Best practices
0 votes
2 replies
22 views

I've written a decent amount of C, and every resource I read (books, web documentation, tutorials) insisted that I should never assume malloc() will always succeed. But I've been learning C++ recently,...
Score of 0
0 answers
39 views

If multiple threads among the 32 threads access the same bank at the same address (meaning when there’s broadcasting) while coexisting with LDS.64 or LDS.128, how to calculate wavefronts . Below is ...
Advice
2 votes
1 replies
78 views

Consider the following C/C++ compilation unit extern int i; int i = 1; extern const int c; const int c = 1; And compiled with: $ gcc -xc++ x.c -S -fdata-sections -static -o - | grep '\(data\|GCC\)' ...
Advice
1 vote
9 replies
262 views

If we have dynamic memory allocation, which is best for using the memory efficiently, then why do we use static memory allocation every time? Can't we use dynamic memory everywhere??
Advice
0 votes
8 replies
229 views

As a beginner I don't understand why pointers are being used everywhere . When I got to know about pointers, I had lots of questions: Why can't we simply use another variable to store the value of ...
Advice
0 votes
0 replies
263 views

I am writing cause I wanted to get some opinions from folks here that have actually built and shipped with Electron. Background: Building an API IDE on Electron. Not really “just an API client”, and ...
Advice
0 votes
10 replies
194 views

I am trying to learn malloc() in C. My question is regarding how the values are stored once I malloc the memory. To understand this, I wrote the following program: size_t n_bytes = 4; char *mmry_ptr = ...
Score of 2
0 answers
131 views

I have a C++ hash map class that I'm writing natvis code for in order to easily inspect its members while debugging. One member of the class is char* myControlBytes which is an array of chars/bytes ...
Score of 0
1 answer
134 views

I am creating a project for an ESP32. I'm quite new to ESP and C++ coding. I use PlatformIO inside VSCode. It's a robot that will be driving around. It has Ultrasonic sensors to detect any obstacles. ...
Advice
0 votes
7 replies
138 views

I was thinking about floats and doubles and was wondering if the fact that they use 32 bits and 64 bits respectively means there is a performance increase either in terms of memory used or time for ...
Best practices
0 votes
1 replies
121 views

“I’m fine-tuning a transformer with batch size 8 and getting CUDA out-of-memory errors. Would gradient checkpointing or mixed precision help?”
Best practices
0 votes
12 replies
196 views

I am needing to manage memory for object allocation manually. I have been using a alignas(T) char storage[] array with dynamic casts. But what I really want is an array of uninitialized values. Can I ...
Score of 4
1 answer
203 views

P = y.T @ (np.diag(Wc) @ y) This line is creating increased memory usage for me in the below code on my Windows 11 machine. As soon as I run the code, I see the RAM usage increasing and skyrocketing. ...
Score of 4
1 answer
174 views

I have a Go function for encrypting data in parallel using AES-GCM: func encryptParallel(ctx context.Context, aead cipher.AEAD, w io.Writer, r io.Reader, workers uint64) error The design is: One ...
Score of -1
1 answer
336 views

What is the size of a std::function? If the size is dependent on something, is there a theoretical maximum? The size of closure (lambda function) not same as std::function or pointer explores the ...

15 30 50 per page
1
2 3 4 5
2429