Changeset 6943a987 for src/libcfa
- Timestamp:
- Aug 29, 2016, 10:33:05 AM (9 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:
- 5e644d3e
- Parents:
- 79841be (diff), 413ad05 (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/libcfa
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/libcfa/Makefile.am ¶
r79841be r6943a987 11 11 ## Created On : Sun May 31 08:54:01 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Thu Aug 11 15:36:32201614 ## Update Count : 19 813 ## Last Modified On : Fri Aug 26 12:03:37 2016 14 ## Update Count : 199 15 15 ############################################################################### 16 16 … … 56 56 CC = ${abs_top_srcdir}/src/driver/cfa 57 57 58 headers = limits stdlib math iostream fstream iterator rational #containers/vector58 headers = limits stdlib math iostream fstream iterator rational containers/vector 59 59 libobjs = ${headers:=.o} 60 60 -
TabularUnified src/libcfa/Makefile.in ¶
r79841be r6943a987 89 89 libcfa_a_AR = $(AR) $(ARFLAGS) 90 90 libcfa_a_LIBADD = 91 am__dirstamp = $(am__leading_dot)dirstamp 91 92 am__objects_1 = limits.$(OBJEXT) stdlib.$(OBJEXT) math.$(OBJEXT) \ 92 93 iostream.$(OBJEXT) fstream.$(OBJEXT) iterator.$(OBJEXT) \ 93 rational.$(OBJEXT) 94 rational.$(OBJEXT) containers/vector.$(OBJEXT) 94 95 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1) 95 96 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS) … … 233 234 cfalib_DATA = builtins.cf extras.cf prelude.cf 234 235 MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 235 headers = limits stdlib math iostream fstream iterator rational #containers/vector236 headers = limits stdlib math iostream fstream iterator rational containers/vector 236 237 libobjs = ${headers:=.o} 237 238 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} … … 303 304 clean-libLIBRARIES: 304 305 -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) 306 containers/$(am__dirstamp): 307 @$(MKDIR_P) containers 308 @: > containers/$(am__dirstamp) 309 containers/$(DEPDIR)/$(am__dirstamp): 310 @$(MKDIR_P) containers/$(DEPDIR) 311 @: > containers/$(DEPDIR)/$(am__dirstamp) 312 containers/vector.$(OBJEXT): containers/$(am__dirstamp) \ 313 containers/$(DEPDIR)/$(am__dirstamp) 305 314 libcfa.a: $(libcfa_a_OBJECTS) $(libcfa_a_DEPENDENCIES) $(EXTRA_libcfa_a_DEPENDENCIES) 306 315 $(AM_V_at)-rm -f libcfa.a … … 310 319 mostlyclean-compile: 311 320 -rm -f *.$(OBJEXT) 321 -rm -f containers/vector.$(OBJEXT) 312 322 313 323 distclean-compile: … … 322 332 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rational.Po@am__quote@ 323 333 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdlib.Po@am__quote@ 334 @AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/vector.Po@am__quote@ 324 335 325 336 .c.o: … … 494 505 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 495 506 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 507 -rm -f containers/$(DEPDIR)/$(am__dirstamp) 508 -rm -f containers/$(am__dirstamp) 496 509 497 510 maintainer-clean-generic: … … 504 517 505 518 distclean: distclean-am 506 -rm -rf ./$(DEPDIR) 519 -rm -rf ./$(DEPDIR) containers/$(DEPDIR) 507 520 -rm -f Makefile 508 521 distclean-am: clean-am distclean-compile distclean-generic \ … … 550 563 551 564 maintainer-clean: maintainer-clean-am 552 -rm -rf ./$(DEPDIR) 565 -rm -rf ./$(DEPDIR) containers/$(DEPDIR) 553 566 -rm -f Makefile 554 567 maintainer-clean-am: distclean-am maintainer-clean-generic \ -
TabularUnified src/libcfa/containers/vector ¶
r79841be r6943a987 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) -
TabularUnified src/libcfa/containers/vector.c ¶
r79841be r6943a987 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.