FIAS . Impressum . Privacy

sizeof VC object

admin@wingarch.xohost.com [please enable javascript to see the address]
Sat Oct 1 00:35:45 CEST 2016


I extracted code from VecGeom, as a frontend to different backends...like VC or UMESIMD. 
A code example is below.  Can someone explain where to research code that makes sizeof return these values?  I am researching because
this approach does not work with UMESimd. 
 
I uploaded my extraction from VecGeom to 
https://github.com/nicholasferguson/Portable_SIMD
 
for code below, preprocessor is VECCORE_ENABLE_VC
 
==================== code for file backend.cpp ===================
 
#include <VecCore/VecCore>
 
int main(int argc, char *argv[])
{
using T = Vc_1::Vector<float, struct Vc_1::VectorAbi::Avx>;
size_t c = sizeof(T);  // c is 32
size_t t = sizeof(vecCore::Scalar<T>); // t is 4
size_t VectorSize = c / t;  // VectorSize is 8
 
return 0;
}
==================== code ===================
 
 



More information about the Vc mailing list
FIAS . Impressum . Privacy