-
Notifications
You must be signed in to change notification settings - Fork 23
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
Vector Types (GLM) #217
Comments
Required CMake changes, could perhaps set include dir to a variable for ease Probably requires a tweak to ensure all examples use the same copy, haven't tested it in that context.
# Pull in GLM
MACRO (download_glm)
configure_file(cmake/glm/CMakeLists.txt.in glm-download/CMakeLists.txt)
# Run CMake generate
execute_process(
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/glm-download
)
if (result)
message(WARNING
"CMake step for glm failed: ${result}\n")
endif()
# Run CMake build (this only downloads, it is built at build time)
execute_process(
COMMAND ${CMAKE_COMMAND} --build .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/glm-download
)
if (result)
message(WARNING
"Download step for glm-download failed: ${result}\n"
"Attempting to continue\n")
endif()
ENDMACRO()
download_glm()
# Then this after project has been created
target_include_directories("${PROJECT_NAME}" SYSTEM PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/glm-src)
cmake_minimum_required(VERSION 2.8.2)
include(ExternalProject)
project(glm-download NONE)
ExternalProject_Add(glm
GIT_REPOSITORY "https://github.com/g-truc/glm.git"
GIT_TAG "0.9.9.7"
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/glm-src"
BINARY_DIR ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
) |
Although you'll need to make sure that this happens after initialisation of the variable. |
The question in my mind is whether |
Oh, also |
Potentially it's not needed for the executables macro, as they might be implied from the static libraries link targets, but I'm unsure about this / there is no harm in it anyway. |
If i tell CMake that FPGU lib target needs to link against SDL2 (it can't, static libs don't 'link'). Anything which is told to link against FGPU lib target will also link against SDL2. That's what i meant. Not aware of a way to share include dirs like this though. |
Yeah so it's probable redundent in the executable macro/func but still useful for the library macro/func. Cmake is set up on linux that you can build it just for an example, I'm not sure how that will play with the library built separately and purely linked against. I'm not sure how this plays on windows either, as I only tested it on linux (maybe windows a long while ago). |
Building from individual example CMakeLists.txt should still work, I checked it built after my visualisation changes the other day. |
Vecotor types will potentially be a big improvement over non-vector types in the C++ interface (esp. in messages) by reducing the curve overheads by 1/N. i.e. a vec4 wil have 1/4 of the curve overheads of 4 float accesses. |
Given how fiddley RTC can be, I'm curious to find out how happy NVRTC is building agent functions that use GLM. |
Having fixed that Jitify issue (locally), get some new errors, which might be harder to fix.
Have managed to fix 3 of the issues by making GLM detect NVRTC properly (g-truc/glm#1073)
With |
From CINECA profiling, we know that for very scattered accesses (unsorted agent message reads) that fewer, larger reads (AoS) can improve performance. This is essentially a vector type. |
#597 |
I think so, the RTC version will come out from behind the flag as part of #602 |
The whole thing is behind a flag currently. Although there's nothing stopping people from including GLM themselves. |
Vector types (
vec4
etc. ) make stuff nicer.CUDA now includes simple versions of these, but doens't provdie all of the functionality.
Use GLM again, but RTC might not get along with GLM.
Should include examples which make use of vector types (boids)
The text was updated successfully, but these errors were encountered: