Blender
V4.3
source
blender
blenlib
intern
vector.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#include "
BLI_string.h
"
6
#include "
BLI_vector.hh
"
7
8
#include <iostream>
9
10
void
blender::internal::vector_print_stats
(
const
char
*name,
11
const
void
*address,
12
int64_t
size,
13
int64_t
capacity,
14
int64_t
inlineCapacity,
15
int64_t
memorySize)
16
{
17
std::cout <<
"Vector Stats: "
<< name <<
"\n"
;
18
std::cout <<
" Address: "
<< address <<
"\n"
;
19
std::cout <<
" Elements: "
<< size <<
"\n"
;
20
std::cout <<
" Capacity: "
<< capacity <<
"\n"
;
21
std::cout <<
" Inline Capacity: "
<< inlineCapacity <<
"\n"
;
22
23
char
memory_size_str[
BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE
];
24
BLI_str_format_byte_unit
(memory_size_str, memorySize,
true
);
25
std::cout <<
" Size on Stack: "
<< memory_size_str <<
"\n"
;
26
}
BLI_string.h
BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE
#define BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE
Definition
BLI_string.h:28
BLI_str_format_byte_unit
void BLI_str_format_byte_unit(char dst[BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE], long long int bytes, bool base_10) ATTR_NONNULL(1)
Definition
string.c:1192
BLI_vector.hh
blender::internal::vector_print_stats
void vector_print_stats(const char *name, const void *address, int64_t size, int64_t capacity, int64_t inlineCapacity, int64_t memorySize)
Definition
vector.cc:10
int64_t
__int64 int64_t
Definition
stdint.h:89
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0