getVectorBlockSize
C++ Function Reference
1 Signature
hsize_t BigDataStatMeth::getVectorBlockSize(int maxSize)2 Description
Calculates optimal block size for vector operations.
3 Parameters
maxSize(int): Maximum size of the vector
4 Returns
hsize_t Optimal block size for vector processing
5 Details
maxSizeMaximum size of the vector hsize_t Optimal block size for vector processing Block size optimization:Considers memory constraintsOptimizes for vector operationsEnsures efficient I/O
6 Source Code
NoteImplementation
File: inst/include/Utilities/Utilities.hpp • Lines 398-415
inline hsize_t getVectorBlockSize(int maxSize)
{
hsize_t blockSize = 0;
try
{
if( (unsigned)maxSize > MAXELEMSINBLOCK) {
blockSize = MAXELEMSINBLOCK;
} else {
blockSize = maxSize;
}
} catch(std::exception& ex) {
Rcpp::Rcout<< "c++ exception getVectorBlockSize: "<<ex.what()<< " \n";
}
return(blockSize);
}7 Usage Example
#include "BigDataStatMeth.hpp"
// Example usage
auto result = getVectorBlockSize(...);