Skip to content

Commit 8578ac1

Browse files
committed
1.2.3
1 parent c3a3c0a commit 8578ac1

20 files changed

Lines changed: 2241 additions & 910 deletions

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,3 +597,7 @@ void destroy(pq);
597597
598598
[![Hypercommit](https://img.shields.io/badge/Hypercommit-DB2475)](https://hypercommit.com/opencstl)
599599
600+
601+
602+
* https://mermaid.live/edit
603+
* https://www.ray.so/#width=null&theme=candy&padding=32&language=cpp&lineNumbers=true&code=I2luY2x1ZGUgIm9wZW5jc3RsLmgiCgppbnQgbWFpbigpIHsKICAgIAogICAgcmV0dXJuIDA7Cn0K&title=filename.c&background=true&darkMode=true

amalgamate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ def main():
251251

252252
shutil.copy("opencstl.h", "examples/opencstl.h")
253253
shutil.copy("opencstl.h", "assets/opencstl.h")
254+
shutil.copy("opencstl.h", "bench/bench_cstl/3rdparty/include/opencstl.h")
254255

255256
if __name__ == '__main__':
256257
main()

assets/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.txt
2+
opencstl.h

assets/blogo.png

116 Bytes
Loading

main.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <stdlib.h>
33
#include <string.h>
44
#include <time.h>
5+
#define OPENCSTL_TRACER
56
#include "opencstl/opencstl.h"
67
#define DECORATE(STR) {int padding = 70 - strlen(STR);int margin=0;if(padding%2==1)margin=1;else margin=0;for (int i = 0; i < padding/2; i++) { putchar('#'); } printf(STR); for (int i = 0; i < padding/2+margin; i++) { putchar('#'); } putchar('\n');}
78

@@ -138,7 +139,7 @@ void cstl_list_test02(void) {
138139
}
139140

140141

141-
cstl_list_sort(list, LESS(int));
142+
cstl_sort(list, LESS(int));
142143

143144
logging.info("list size: %d", size(list));
144145
for (int *it = begin(list); it != end(list); it = next(it)) {
@@ -388,16 +389,16 @@ void test01(void) {
388389
void test02(void) {
389390
VECTOR(int) v = new_vector(int);
390391

391-
watch t_beg = now();
392+
watch t_beg = chrono.now();
392393
for (int i = 0; i < 100; i++) {
393394
push_back(v, rand32() % 1000);
394395
}
395396

396397
sort(v,size(v), sizeof(int),GREATER(int));
397398

398-
watch t_end = now();
399+
watch t_end = chrono.now();
399400

400-
double ms = duration(t_beg, t_end);
401+
double ms = chrono.duration(t_beg, t_end);
401402
for (int i = 0; i < size(v); i++) {
402403
printf("[%4d]\n", v[i]);
403404
}
@@ -444,6 +445,9 @@ void test04(void) {
444445
}
445446

446447
int main(void) {
448+
449+
//cstl_list_test02();
450+
//return 0;
447451
// watch t_beg = now();
448452
// test_opencstl_unordered_set();
449453
// watch t_end = now();

0 commit comments

Comments
 (0)