Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices library removed #34

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion knp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ add_subdirectory(meta-library)
add_subdirectory(neuron-traits-library)
add_subdirectory(synapse-traits-library)
add_subdirectory(core-library)
add_subdirectory(devices-library)
add_subdirectory(backends)
add_subdirectory(base-framework)
add_subdirectory(python-framework)
Expand Down
16 changes: 8 additions & 8 deletions knp/autodoc/directories.dox
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,23 @@
*/

/**
* @dir /knp/devices-library
* @brief Device library directory.
* @dir /knp/backends/cpu/cpu-devices
* @brief CPU device library directory.
*/

/**
* @dir /knp/devices-library/include
* @brief Include directory for devices library.
* @dir /knp/backends/cpu/cpu-devices/include
* @brief Include directory for CPU devices library.
*/

/**
* @dir /knp/devices-library/include/knp
* @brief Include directory for devices library.
* @dir /knp/backends/cpu/cpu-devices/include/knp
* @brief Include directory for CPU devices library.
*/

/**
* @dir /knp/devices-library/include/knp/devices
* @brief Include directory for devices library.
* @dir /knp/backends/cpu/cpu-devices/include/knp/devices
* @brief Include directory for CPU devices library.
*/

/**
Expand Down
35 changes: 18 additions & 17 deletions knp/backends/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ See the License for the specific language governing permissions and
limitations under the License.
]]

cmake_minimum_required(VERSION 3.25)

add_subdirectory(cpu-library)
add_subdirectory(thread_pool)

file(GLOB backends LIST_DIRECTORIES true "[a-zA-Z0-9_]*-backend")

if(NOT backends)
message(WARNING "No backend was found.")
return()
endif()

foreach(backend ${backends})
message(STATUS "Adding backend \"${backend}\"...")
get_filename_component(BACKEND_NAME "${backend}" NAME)
add_subdirectory("${backend}")
endforeach()
cmake_minimum_required(VERSION 3.25)

add_subdirectory(cpu-devices)
add_subdirectory(cpu-library)
add_subdirectory(thread_pool)

file(GLOB backends LIST_DIRECTORIES true "[a-zA-Z0-9_]*-backend")

if(NOT backends)
message(WARNING "No backend was found.")
return()
endif()

foreach(backend ${backends})
message(STATUS "Adding backend \"${backend}\"...")
get_filename_component(BACKEND_NAME "${backend}" NAME)
add_subdirectory("${backend}")
endforeach()
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
# Required for the linters.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

project(knp-devices VERSION "${KNP_VERSION}" LANGUAGES C CXX
project(knp-cpu-devices VERSION "${KNP_VERSION}" LANGUAGES C CXX
DESCRIPTION "Kaspersky Neuromorphic Platform device parameters library"
HOMEPAGE_URL "https://neuro.kaspersky.ru/neyromorfnye-tekhnologii/")

Expand All @@ -41,7 +41,7 @@ else()
set(${PROJECT_NAME}_CPU_SOURCE impl/unknown_cpu.cpp)
endif()

knp_add_library("${PROJECT_NAME}-cpu"
knp_add_library("${PROJECT_NAME}"
STATIC

${${PROJECT_NAME}_CPU_SOURCE}
Expand All @@ -54,41 +54,17 @@ knp_add_library("${PROJECT_NAME}-cpu"
)

set_target_properties(
"${PROJECT_NAME}-cpu"
"${PROJECT_NAME}"
PROPERTIES
VERSION "${CMAKE_PROJECT_VERSION}"
SOVERSION "${CMAKE_PROJECT_VERSION_MAJOR}")

knp_add_library("${PROJECT_NAME}-altai"
STATIC
impl/altai.cpp

include/${${PROJECT_NAME}_PUBLIC_INCLUDE_DIR}/altai.h

LINK_PRIVATE
spdlog::spdlog_header_only
KNP::Core
ALIAS KNP::Devices::AltAI
)

set_target_properties(
"${PROJECT_NAME}-altai"
PROPERTIES
VERSION "${CMAKE_PROJECT_VERSION}"
SOVERSION "${CMAKE_PROJECT_VERSION_MAJOR}"
)

if (KNP_INSTALL)
set(COMPONENT_NAME "cpp-framework")

install(TARGETS "${PROJECT_NAME}-cpu"
EXPORT "${PROJECT_NAME}-cpu"
COMPONENT "${COMPONENT_NAME}-dev"
ARCHIVE)

# Install for AltAI
install(TARGETS "${PROJECT_NAME}-altai"
EXPORT "${PROJECT_NAME}-altai"
install(TARGETS "${PROJECT_NAME}"
EXPORT "${PROJECT_NAME}"
COMPONENT "${COMPONENT_NAME}-dev"
ARCHIVE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
* @kaspersky_support Artiom N.
* @date 30.01.2023
* @license Apache 2.0
* @copyright © 2024 AO Kaspersky Lab
*
* 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
* @copyright © 2024 AO Kaspersky Lab
*
* 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.
*/

Expand Down
162 changes: 0 additions & 162 deletions knp/devices-library/impl/altai.cpp

This file was deleted.

Loading
Loading