Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ nbproject
vlsvdiff_DP
vlsvextract_DP
compile_commands.json
libraries*/
library-build/
run_*/
!run_tests.sh
profile/
6 changes: 4 additions & 2 deletions arch/gpu_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,11 +663,13 @@ __host__ void gpu_trans_allocate(
__host__ void gpu_trans_deallocate() {
// Deallocate any translation vectors or sets which exist
if (gpu_allocated_largestVmeshSizePower != 0) {
::delete unionOfBlocksSet;
unionOfBlocksSet->~Hashmap();
free(unionOfBlocksSet);
gpu_allocated_largestVmeshSizePower = 0;
}
if (gpu_allocated_unionSetSize != 0) {
::delete unionOfBlocks;
unionOfBlocks->~SplitVector();
free(unionOfBlocks);
gpu_allocated_unionSetSize = 0;
}
}
21 changes: 14 additions & 7 deletions spatial_cells/spatial_cell_gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,18 @@ namespace spatial_cell {

SpatialCell::~SpatialCell() {
if (velocity_block_with_content_list) {
::delete velocity_block_with_content_list;
velocity_block_with_content_list->~SplitVector();
free(velocity_block_with_content_list);
velocity_block_with_content_list = 0;
}
if (velocity_block_with_content_map) {
::delete velocity_block_with_content_map;
velocity_block_with_content_map->~Hashmap();
free(velocity_block_with_content_map);
velocity_block_with_content_map = 0;
}
if (velocity_block_with_no_content_map) {
::delete velocity_block_with_no_content_map;
velocity_block_with_no_content_map->~Hashmap();
free(velocity_block_with_no_content_map);
velocity_block_with_no_content_map = 0;
}
velocity_block_with_content_list_size=0;
Expand All @@ -146,19 +149,23 @@ namespace spatial_cell {
vbwncl_sizePower = 0;

if (list_with_replace_new) {
::delete list_with_replace_new;
list_with_replace_new->~SplitVector();
free(list_with_replace_new);
list_with_replace_new = 0;
}
if (list_delete) {
::delete list_delete;
list_delete->~SplitVector();
free(list_delete);
list_delete = 0;
}
if (list_to_replace) {
::delete list_to_replace;
list_to_replace->~SplitVector();
free(list_to_replace);
list_to_replace = 0;
}
if (list_with_replace_old) {
::delete list_with_replace_old;
list_with_replace_old->~SplitVector();
free(list_with_replace_old);
list_with_replace_old = 0;
}
list_with_replace_new_capacity = 0;
Expand Down
Loading