MCPcopy Create free account

hub / github.com/cmu-db/15445-bootcamp / functions

Functions101 in github.com/cmu-db/15445-bootcamp

↓ 6 callersMethodInsertAtHead
Function for inserting val at the head of the DLL.
src/iterator.cpp:125
↓ 5 callersMethodPrintValid
src/move_constructors.cpp:90
↓ 5 callersMethodget_val
src/spring2024/s24_my_ptr.cpp:61
↓ 5 callersMethodprint
src/templated_classes.cpp:17
↓ 4 callersMethodGetX
src/shared_ptr.cpp:25
↓ 3 callersMethodGetVal
Getter function.
src/wrapper_class.cpp:102
↓ 3 callersMethodGetX
src/unique_ptr.cpp:34
↓ 3 callersMethodPrintPoint
src/vectors.cpp:44
↓ 3 callersFunctionbar
We define a function bar inside the N::M namespace.
src/namespaces.cpp:35
↓ 3 callersFunctionfoo
src/namespaces.cpp:79
↓ 2 callersMethodBegin
The Begin() function returns an iterator to the head of the DLL, which is the first element to access when iterating through.
src/iterator.cpp:139
↓ 2 callersMethodEnd
The End() function returns an iterator that marks the one-past-the-last element of the iterator. In this case, this would be an iterator with its curr
src/iterator.cpp:146
↓ 2 callersMethodSetX
src/shared_ptr.cpp:27
↓ 2 callersFunctionprint_int_vector
A utility function to print the elements of an int vector. The code for this should be understandable and similar to the code iterating through elemen
src/vectors.cpp:56
↓ 2 callersMethodset_val
src/spring2024/s24_my_ptr.cpp:62
↓ 2 callersFunctionspam
We define a function spam in the ABC namespace. This is used in line 57.
src/namespaces.cpp:26
↓ 2 callersFunctiontake_ownership
src/spring2024/s24_my_ptr.cpp:84
↓ 1 callersMethodGetX
src/vectors.cpp:40
↓ 1 callersMethodGetY
src/shared_ptr.cpp:26
↓ 1 callersMethodSetVal
Setter function.
src/wrapper_class.cpp:97
↓ 1 callersMethodSetX
src/unique_ptr.cpp:36
↓ 1 callersFunctionSetXTo445
Function that takes in a unique pointer reference and changes its x value to 445.
src/unique_ptr.cpp:46
↓ 1 callersMethodSetY
src/shared_ptr.cpp:28
↓ 1 callersMethodSetY
src/vectors.cpp:43
↓ 1 callersFunctionadd
src/templated_functions.cpp:21
↓ 1 callersFunctionadd_three
A function that takes an int reference and adds 3 to it.
src/references.cpp:17
↓ 1 callersFunctionadd_three_and_print
Function that takes in a rvalue reference as an argument. It appends 3 to the back of the vector passed in as an argument, and prints the values in th
src/move_semantics.cpp:54
↓ 1 callersFunctioncopy_shared_ptr_in_function
src/shared_ptr.cpp:45
↓ 1 callersFunctioneggs
src/namespaces.cpp:95
↓ 1 callersFunctionmodify_ptr_via_ref
Function that modifies a Point object inside a shared pointer by passing the shared pointer argument as a reference.
src/shared_ptr.cpp:37
↓ 1 callersFunctionmodify_ptr_via_rvalue_ref
Function that modifies a Point object inside a shared pointer by passing the shared pointer argument as a rvalue reference.
src/shared_ptr.cpp:41
↓ 1 callersFunctionmove_add_three_and_print
Function that takes in a rvalue reference as an argument. It seizes ownership of the vector passed in, appends 3 to the back of it, and prints the val
src/move_semantics.cpp:40
↓ 1 callersFunctionnot_take_ownership
src/spring2024/s24_my_ptr.cpp:88
↓ 1 callersFunctionpeloton
src/namespaces.cpp:89
↓ 1 callersMethodprint_int
src/templated_classes.cpp:76
↓ 1 callersFunctionuses_DEF_bar
We define a function uses_DEF_bar inside the ABC namespace, but not inside the DEF namespace. Since bar and uses_DEF_bar are both in the ABC namespace
src/namespaces.cpp:68
↓ 1 callersFunctionuses_bar
We define a function uses_bar inside the ABC::DEF namespace. However, since bar is in the same namespace as uses_bar (they're both in the ABC::DEF nam
src/namespaces.cpp:43
↓ 1 callersFunctionuses_spam
We define a function uses_spam in the ABC::DEF namespace. To refer to ABC::spam from the ABC::DEF namespace, we have no other option but to refer to i
src/namespaces.cpp:55
MethodAbcdefghijklmnopqrstuvwxyz
src/auto.cpp:29
MethodBar
src/templated_classes.cpp:75
MethodDLL
DLL class constructor.
src/iterator.cpp:109
MethodDLLIterator
src/iterator.cpp:59
MethodFoo
src/templated_classes.cpp:16
MethodFoo2
src/templated_classes.cpp:31
MethodFooSpecial
src/templated_classes.cpp:51
MethodFooSpecial
src/templated_classes.cpp:63
MethodGetAge
src/move_constructors.cpp:82
MethodGetY
src/unique_ptr.cpp:35
MethodGetY
src/vectors.cpp:41
MethodIntPtrManager
All constructors of a wrapper class are supposed to initialize a resource. In this case, this means allocating the memory that we are managing. The de
src/wrapper_class.cpp:44
MethodNode
src/iterator.cpp:42
MethodPerson
src/move_constructors.cpp:39
MethodPoint
src/shared_ptr.cpp:23
MethodPoint
src/unique_ptr.cpp:32
MethodPoint
src/vectors.cpp:32
MethodPointer
src/spring2024/s24_my_ptr.cpp:18
MethodPointer<T>
Add move constructor: useful when we need to EXTEND the lifetime of an object!
src/spring2024/s24_my_ptr.cpp:42
MethodSetX
src/vectors.cpp:42
MethodSetY
src/unique_ptr.cpp:37
Functionadd3
src/templated_functions.cpp:44
Functionadd_count
The add_count function allows for a thread to increment the count variable by 1, atomically.
src/mutex.cpp:25
Functionadd_count
The add_count function allows for a thread to increment the count variable by 1, atomically.
src/scoped_lock.cpp:26
Functionadd_count_and_notify
In this function, a thread increments the count variable by 1. It also will notify one waiting thread if the count value is 2. It is ran by two of the
src/condition_variable.cpp:44
Functionconstruct_obj
src/auto.cpp:44
Functionmain
The main method constructs two thread objects and has them both run the add_count function in parallel. After these threads are finished executing, we
src/mutex.cpp:38
Functionmain
The main method constructs six thread objects and has two of them run the write_value function, and four of them run the read_value function, all in p
src/rwlock.cpp:57
Functionmain
The main method is identical to the one in mutex.cpp. It constructs the thread objects, runs add_count on both threads, and prints the result of count
src/scoped_lock.cpp:39
Functionmain
src/move_semantics.cpp:62
Functionmain
src/shared_ptr.cpp:50
Functionmain
src/templated_classes.cpp:81
Functionmain
src/unordered_maps.cpp:26
Functionmain
src/namespaces.cpp:114
Functionmain
The main method constructs three thread objects and has two of them run the add_count_and_notify function in parallel. After these threads are finishe
src/condition_variable.cpp:72
Functionmain
src/references.cpp:19
Functionmain
src/auto.cpp:48
Functionmain
The main function shows the usage of the DLL iterator.
src/iterator.cpp:155
Functionmain
src/move_constructors.cpp:106
Functionmain
src/templated_functions.cpp:52
Functionmain
src/wrapper_class.cpp:111
Functionmain
src/unique_ptr.cpp:48
Functionmain
src/sets.cpp:27
Functionmain
src/vectors.cpp:63
Functionmain
src/spring2024/s24_my_ptr.cpp:92
Methodoperator!=
This is the inequality operator for the DLLIterator class. It tests that the current pointers are not the same.
src/iterator.cpp:87
Methodoperator*
This is the dereference operator for the DLLIterator class. It returns the value of the element at the current position of the iterator. The current p
src/iterator.cpp:95
Methodoperator++
Implementing a postfix increment operator (iter++). The difference between a prefix and postfix increment operator is the return value of the operator
src/iterator.cpp:73
Methodoperator==
This is the equality operator for the DLLIterator class. It tests that the current pointers are the same.
src/iterator.cpp:81
Methodprint
src/templated_classes.cpp:34
Methodprint
src/templated_classes.cpp:52
Methodprint
src/templated_classes.cpp:64
Methodprint
src/auto.cpp:32
Functionprint_msg
src/templated_functions.cpp:34
Functionprint_msg<float>
src/templated_functions.cpp:37
Functionprint_two_values
src/templated_functions.cpp:26
Functionread_value
This function uses a std::shared_lock (reader lock equivalent) to gain read only, shared access to the count variable, and reads the count variable.
src/rwlock.cpp:40
Functionsmart_generator
src/spring2024/s24_my_ptr.cpp:76
Functionwaiter_thread
This function, ran by the waiting thread, waits on the condition count == 2. After that, it grabs the mutex m and executes code in the critical sectio
src/condition_variable.cpp:60
Functionwrite_value
This function uses a std::unique_lock (write lock equivalent) to gain exclusive access to the count variable and write to the value.
src/rwlock.cpp:47
Method~DLL
Destructor should delete all the nodes by iterating through them.
src/iterator.cpp:114
Method~IntPtrManager
Destructor for the wrapper class. The destructor must destroy the resource that it is managing; in this case, the destructor deletes the pointer!
src/wrapper_class.cpp:58
next →1–100 of 101, ranked by callers