Comments (4)
Hello,
creating app structure like this VkFFTApplication app = {};
makes it scope local - meaning it will be deallocated once vkfft_create call finishes. What you want is likely to call VkFFTApplication app = {};
outside the vkfft_create and then pass the pointer &app to vkfft_create. Or you can manually allocate memory for app in vkfft_create with VkFFTApplication* app = (VkFFTApplication*)calloc(1, sizeof(VkFFTApplication));
and free it later in vkfft_free call, for example.
Best regards,
Dmitrii
from vkfft.
Hello Dmitrii,
Thank you for your quick response.
Second option really made it work.
I changed subroutine signature a bit:
void vkfft_create(int size, int how_many, int double_precision, VkFFTApplication **app_handle) {
VkFFTConfiguration config = {};
VkFFTApplication* app = (VkFFTApplication*)calloc(1, sizeof(VkFFTApplication));
// Populating config values
// ...
VKFFT_CALL(initializeVkFFT(app, config));
*app_handle = app;
}
and I can clearly see that app is pointing to different locations.
Thank you.
I have another unrelated question.
Are there any memory estimations of memory that VkFFT will allocate internally for M batches of DCT2 transforms of size N?
from vkfft.
For DCT2 the additional memory usage depends on the system size. If system fits in shared memory of a GPU (<4096, approximately) it will not use additional memory (regardless of M). for bigger sequences it depends if system is decomposable as small primes or can be done with Rader algorithm - then the additional size will be 2x the system size (M*N). If the system uses Bluestein's algorithm, the size will be 4x. Some small additional memory is used for twiddle factors (at least M times smaller).
from vkfft.
Thanks for clarification.
I'm closing this issue.
from vkfft.
Related Issues (20)
- Merge DCT and DST into DTT HOT 4
- [1.3.4] #include glslang_c_interface.h -> glslang/Include/glslang_c_interface.h HOT 1
- [1.3.4] Could you detect and use the system glslang via cmake HOT 1
- Support VK_KHR_push_descriptor to allow multiple invocations with different buffers in a single command buffer HOT 3
- initializeVkFFT throws an exception for small-size convolutions HOT 3
- Multiple systems - one kernel - multiple outputs convolution HOT 10
- in order to use VkFFT, my machine must have a Vulkan driver installed ? HOT 1
- how to dump the generated source kernel? HOT 6
- CUDA&HIP stream asynchronicity HOT 2
- Use enum for precision HOT 2
- Error module and new error handling HOT 2
- Allow HIP to be used with NVIDIA GPUs HOT 1
- [Metal] red herring
- Suggestion: add CITATION.cff HOT 1
- device function performing FFT/DCT of data in shared memory (feature request / feasability) HOT 1
- Orthogonal normalization HOT 4
- Fortran API HOT 1
- Promise not to overwrite user's data HOT 2
- Improve user's `tempBuffer` allocation workflow HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vkfft.