Changeset 3f1e68f
- Timestamp:
- Aug 28, 2016, 11:02:06 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 413ad05
- Parents:
- 6d665d9 (diff), 4999940 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/gc_no_raii/premake4.lua
r6d665d9 r3f1e68f 5 5 includeDirList = { 6 6 "src/", 7 "../", 8 "containers/" 7 "../" 9 8 } 10 9 -
src/libcfa/containers/vector
r6d665d9 r3f1e68f 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // vector -- 8 // 6 // 7 // vector -- 8 // 9 9 // Author : Thierry Delisle 10 10 // Created On : Tue Jul 5 18:00:07 2016 … … 12 12 // Last Modified On : Tue Jul 5 18:01:35 2016 13 13 // Update Count : 2 14 // 14 // 15 15 16 16 #pragma once … … 28 28 void ctor(allocator_t* const); 29 29 void dtor(allocator_t* const); 30 void realloc (allocator_t* const, size_t);30 void realloc_storage(allocator_t* const, size_t); 31 31 T* data(allocator_t* const); 32 32 }; … … 64 64 static inline void reserve(vector(T, allocator_t) *const this, size_t size) 65 65 { 66 realloc (&this->storage, this->size+1);66 realloc_storage(&this->storage, this->size+1); 67 67 } 68 68 … … 146 146 147 147 forall(otype T) 148 void realloc (heap_allocator(T) *const this, size_t size);148 void realloc_storage(heap_allocator(T) *const this, size_t size); 149 149 150 150 forall(otype T) -
src/libcfa/containers/vector.c
r6d665d9 r3f1e68f 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // vector.c -- 8 // 6 // 7 // vector.c -- 8 // 9 9 // Author : Thierry Delisle 10 10 // Created On : Tue Jul 5 18:07:52 2016 … … 12 12 // Last Modified On : Tue Jul 5 18:08:31 2016 13 13 // Update Count : 2 14 // 14 // 15 15 16 #include <containers/vector> 16 #include <containers/vector> 17 17 18 18 #include <stdlib> … … 39 39 void push_back(vector(T, allocator_t) *const this, T value) 40 40 { 41 realloc (&this->storage, this->size+1);41 realloc_storage(&this->storage, this->size+1); 42 42 data(&this->storage)[this->size] = value; 43 43 this->size++; … … 77 77 78 78 forall(otype T) 79 inline void realloc (heap_allocator(T) *const this, size_t size)79 inline void realloc_storage(heap_allocator(T) *const this, size_t size) 80 80 { 81 81 enum { GROWTH_RATE = 2 };
Note: See TracChangeset
for help on using the changeset viewer.