diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 3221c63..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -project(cpplab) -cmake_minimum_required(VERSION 3.10) - -FIND_PACKAGE(GTK) - -IF(GTK_FOUND) - INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIR}) - ADD_EXECUTABLE(my_gtk_exe my_gtk_exe.cxx) - TARGET_LINK_LIBRARIES(my_gtk_exe ${GTK_LIBRARIES}) -ENDIF(GTK_FOUND) - - -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - -#Set c++ c11 version -set(CMAKE_CXX_STANDARD 11) - -add_subdirectory(src) -add_subdirectory(include) -#add_executable(c_time time.cpp) - -#install(TARGETS cpplab RUNTIME DESTINATION bin) - - -# CPack instructions for bundling purposes -set(CPACK_PACKAGE_CONTACT "Balhau") -set(CPACK_GENERATOR "STGZ;TGZ;TZ;DEB") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CppLab") -SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt") -set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") - -include(CPack) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt deleted file mode 100644 index d252c73..0000000 --- a/include/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_subdirectory(bmath) -add_subdirectory(cpu) -add_subdirectory(dstruct) -add_subdirectory(misc) \ No newline at end of file diff --git a/include/bmath/CMakeLists.txt b/include/bmath/CMakeLists.txt deleted file mode 100644 index e69de29..0000000 diff --git a/include/cpu/CMakeLists.txt b/include/cpu/CMakeLists.txt deleted file mode 100644 index e69de29..0000000 diff --git a/include/dstruct/CMakeLists.txt b/include/dstruct/CMakeLists.txt deleted file mode 100644 index e69de29..0000000 diff --git a/include/dstruct/blist.hpp b/include/dstruct/blist.hpp deleted file mode 100644 index 2c25593..0000000 --- a/include/dstruct/blist.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2017 Vitor Fernandes - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#pragma once - -#include -#include -#include - -template -class blist -{ -public: - typedef struct node - { - node(T v, node *p, node *n) - { - value = v; - next = n; - previous = p; - } - node(T v) - { - value = v; - next = NULL; - previous = NULL; - } - T value; - node *next; - node *previous; - } Node; - - blist() - { - this->rootNode = NULL; - this->currentNode = this->rootNode; - size = 0; - }; - blist(T value) - { - this->rootNode = new Node(value, NULL, NULL); - this->currentNode = this->rootNode; - size = 1; - }; - blist(const blist &other) - { - this->rootNode = other.root(); - }; - void add(T value) - { - if (this->rootNode == NULL) - { - this->rootNode = new Node(value, NULL, NULL); - this->currentNode = rootNode; - } - else - { - Node *newNode = new Node(value, currentNode, NULL); - this->currentNode->next = newNode; - currentNode = newNode; - } - size++; - }; - ~blist() - { - std::cout << "Destructing list" << std::endl; - Node *aux; - while (this->currentNode != this->rootNode) - { - aux = this->currentNode; - this->currentNode = this->currentNode->previous; - delete aux; - } - delete this->rootNode; - }; - blist &operator=(const blist &other) - { - this->rootNode = other.root(); - }; - bool operator==(const blist &other) - { - this->rootNode == other.root(); - }; - Node *root() const - { - return this->rootNode; - }; - Node *current() const - { - return this->currentNode; - }; - - T *values() - { - T *aux = new T[size]; - Node *naux = this->rootNode; - for (int i = 0; i < size; i++) - { - aux[i] = naux->value; - naux = naux->next; - } - return aux; - }; - int getSize() - { - return size; - }; - -private: - Node *rootNode; - Node *currentNode; - int size; -}; \ No newline at end of file diff --git a/include/misc/CMakeLists.txt b/include/misc/CMakeLists.txt deleted file mode 100644 index 245716d..0000000 --- a/include/misc/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(memory) -add_subdirectory(util) \ No newline at end of file diff --git a/include/misc/memory/CMakeLists.txt b/include/misc/memory/CMakeLists.txt deleted file mode 100644 index e69de29..0000000 diff --git a/include/misc/util/CMakeLists.txt b/include/misc/util/CMakeLists.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index c83fd5c..0000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -add_subdirectory(bmath) -add_subdirectory(cpu) -add_subdirectory(dtstruct) -add_subdirectory(opengl) -add_subdirectory(misc) -add_subdirectory(gui) \ No newline at end of file diff --git a/src/bmath/CMakeLists.txt b/src/bmath/CMakeLists.txt deleted file mode 100644 index d1d29cc..0000000 --- a/src/bmath/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -add_library( - bmath SHARED - complex.cpp - math.cpp -) - -target_include_directories( bmath - PUBLIC - "${CMAKE_SOURCE_DIR}/include" -) - -add_executable( - complex - demos/complex.cpp - complex.cpp -) - -add_executable( - math - demos/math.cpp - math.cpp -) - -install(TARGETS bmath - DESTINATION "/usr/lib/bmath" -) \ No newline at end of file diff --git a/include/bmath/complex.hpp b/src/bmath/complex.hpp similarity index 100% rename from include/bmath/complex.hpp rename to src/bmath/complex.hpp diff --git a/include/bmath/math.hpp b/src/bmath/math.hpp similarity index 100% rename from include/bmath/math.hpp rename to src/bmath/math.hpp diff --git a/src/cpu/CMakeLists.txt b/src/cpu/CMakeLists.txt deleted file mode 100644 index 038945a..0000000 --- a/src/cpu/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -add_executable( - sse - demos/sse.cpp - sse.cpp - naive.cpp - avx2.cpp -) \ No newline at end of file diff --git a/include/cpu/atomic.hpp b/src/cpu/atomic.hpp similarity index 100% rename from include/cpu/atomic.hpp rename to src/cpu/atomic.hpp diff --git a/include/cpu/avx2.hpp b/src/cpu/avx2.hpp similarity index 100% rename from include/cpu/avx2.hpp rename to src/cpu/avx2.hpp diff --git a/include/cpu/naive.hpp b/src/cpu/naive.hpp similarity index 100% rename from include/cpu/naive.hpp rename to src/cpu/naive.hpp diff --git a/include/cpu/sse.hpp b/src/cpu/sse.hpp similarity index 100% rename from include/cpu/sse.hpp rename to src/cpu/sse.hpp diff --git a/include/cpu/types.hpp b/src/cpu/types.hpp similarity index 100% rename from include/cpu/types.hpp rename to src/cpu/types.hpp diff --git a/include/cpu/utils.hpp b/src/cpu/utils.hpp similarity index 100% rename from include/cpu/utils.hpp rename to src/cpu/utils.hpp diff --git a/src/dtstruct/CMakeLists.txt b/src/dtstruct/CMakeLists.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/dtstruct/blist.cpp b/src/dtstruct/blist.cpp deleted file mode 100644 index d8107d9..0000000 --- a/src/dtstruct/blist.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2017 Vitor Fernandes - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "blist.hpp" -#include -#include - - diff --git a/src/misc/CMakeLists.txt b/src/misc/CMakeLists.txt deleted file mode 100644 index 3e5874e..0000000 --- a/src/misc/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(memory) -add_subdirectory(dec) \ No newline at end of file diff --git a/src/misc/dec/CMakeLists.txt b/src/misc/dec/CMakeLists.txt deleted file mode 100644 index 4dcc6f4..0000000 --- a/src/misc/dec/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_executable(dec_ex1 ex1.cpp) -add_executable(dec_ex2 ex2.cpp) diff --git a/src/misc/memory/CMakeLists.txt b/src/misc/memory/CMakeLists.txt deleted file mode 100644 index 84d4b01..0000000 --- a/src/misc/memory/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_executable(memorymodel model.cpp) -add_executable(volatile volatile.cpp) -add_executable(cmem cmem.c) -add_executable(cautofree cautofree.c) diff --git a/include/misc/memory/model.h b/src/misc/memory/model.h similarity index 100% rename from include/misc/memory/model.h rename to src/misc/memory/model.h diff --git a/include/misc/memory/util.h b/src/misc/memory/util.h similarity index 100% rename from include/misc/memory/util.h rename to src/misc/memory/util.h diff --git a/include/misc/util/debug.h b/src/misc/util/debug.h similarity index 100% rename from include/misc/util/debug.h rename to src/misc/util/debug.h diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt deleted file mode 100644 index 060918c..0000000 --- a/src/opengl/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Search for glfw -find_package(glfw3 3.2 REQUIRED) -# Search for glew -find_package(GLEW REQUIRED) -find_package(OpenGL REQUIRED) -find_package(GLUT REQUIRED) -#add_compile_definitions(IS_DEBUG=1) - - - - - -# Add gl1 executable build from gl1.cpp, glew.c and Renderer.cpp -add_executable( - gl1 - gl1.cpp - Shader.cpp - Renderer.cpp - VertexBuffer.cpp - IndexBuffer.cpp - VertexArray.cpp - VertexBufferLayout.cpp - utils.cpp -) - -add_executable(gl2 gl2.cpp) -target_link_libraries(gl2 ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ) - -add_executable(gl3 gl3.cpp) -target_link_libraries(gl3 ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ) - -# Link gl1 with glfw lib -target_link_libraries(gl1 glfw GLEW OpenGL::GL) \ No newline at end of file