Newer
Older
print(str(second_round_indices))
print("-> STRUCTURE OF STORE INDICES FOR THIS WORK PIECE:")
print(str(store_indices))
}
}
# Converting array indices to vector indices
store_dims <- work_piece[['store_dims']]
store_indices <- do.call('expand.grid', store_indices)
### Given a matrix where each row is a set of array indices of an element
### the vector indices are computed
weights <- sapply(1:length(store_dims),
function(i) prod(c(1, store_dims)[1:i]))
matrix_indices <- 1 + colSums(t(store_indices - 1) * weights)
###
data_array <- bigmemory::attach.big.matrix(shared_matrix_pointer)
rm(data_array)
gc()
if (!is.null(work_piece[['save_metadata_in']])) {
saveRDS(metadata, file = work_piece[['save_metadata_in']])
}
}
if (!is.null(work_piece[['progress_amount']]) && !silent) {
message(work_piece[['progress_amount']], appendLF = FALSE)
}
is.null(sub_array)
}