MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / gpc_malloc

Function gpc_malloc

paddle/phi/kernels/funcs/gpc.h:193–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191
192template <typename T>
193void gpc_malloc(T *&p, int b, char *s) { // NOLINT
194 if (b > 0) {
195 p = reinterpret_cast<T *>(malloc(b));
196
197 if (!p) {
198 fprintf(stderr, "gpc malloc failure: %s\n", s);
199 exit(0);
200 }
201 } else {
202 p = NULL;
203 }
204}
205template <typename T>
206void gpc_free(T *&p) { // NOLINT
207 if (p) {

Callers

nothing calls this directly

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected