Clean-up for og12 commit
84914e197d91a67b3d27db0e4c69a433462983a5
"openmp, nvptx: ompx_unified_shared_mem_alloc". No functional change.
libgomp/
* config/linux/allocator.c (linux_memspace_calloc): Elide
(innocuous) duplicate 'if' condition.
* config/nvptx/allocator.c (nvptx_memspace_free): Explicitly
handle 'memspace == ompx_host_mem_space'.
* libgomp.h (gomp_is_usm_ptr): Remove.
2023-02-16 Thomas Schwinge <thomas@codesourcery.com>
+ * config/linux/allocator.c (linux_memspace_calloc): Elide
+ (innocuous) duplicate 'if' condition.
+ * config/nvptx/allocator.c (nvptx_memspace_free): Explicitly
+ handle 'memspace == ompx_host_mem_space'.
+ * libgomp.h (gomp_is_usm_ptr): Remove.
+
* basic-allocator.c (BASIC_ALLOC_YIELD): instead of '#deine',
'#define' it.
memset (ret, 0, size);
return ret;
}
- else if (memspace == ompx_unified_shared_mem_space
- || pin)
+ else if (pin)
return linux_memspace_alloc (memspace, size, pin);
else
return calloc (1, size);
chunks. */
#include "libgomp.h"
+#include <assert.h>
#include <stdlib.h>
#define BASIC_ALLOC_PREFIX __nvptx_lowlat
__nvptx_lowlat_free (shared_pool, addr, size);
}
+ else if (memspace == ompx_host_mem_space)
+ /* Just verify what all allocator functions return. */
+ assert (addr == NULL);
else
free (addr);
}
void *);
extern void * gomp_usm_alloc (size_t size, int device_num);
extern void gomp_usm_free (void *device_ptr, int device_num);
-extern bool gomp_is_usm_ptr (void *ptr);
/* Splay tree definitions. */
typedef struct splay_tree_node_s *splay_tree_node;