IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C++ Discussion :

[MT] Benchmark de produits matriciels sur processeurs multi-cores


Sujet :

C++

  1. #21
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Je ne veux pas mettre de lien vers un site francophone. Je n'ai de toute façon pas le droit de mettre des liens vers des sites hors de mon université (en toute rigueur, parce que j'ai déjà fais une ou 2 exception...). N'en parlons plus. Je te remercie.

    Mais le topic n'est pas clos pour autant, je voudrais bien que quelqu'un fasse un bench sur un processeur multi-core (Laurent, HanLee...?).
    Rappel, le bench se trouve ici: http://www.ient.rwth-aachen.de/team/...ads/benchs.zip

  2. #22
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    Citation Envoyé par Charlemagne
    je voudrais bien que quelqu'un fasse un bench sur un processeur multi-core
    Je n'ai qu'un mac multi-core (Intel core duo), t'aurais pas une version mac ?


  3. #23
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Citation Envoyé par epsilon68
    Je n'ai qu'un mac multi-core (Intel core duo), t'aurais pas une version mac ?
    Je ne peux malheureusement pas compiler de version Mac. Dommage parce que ton processeur m'intéresse.
    Y'a peut-être 2 possibilités:
    1)je sais qu'il est possible d'installer WinXP sur un Mac Intel. Ne me demande pas comment, mais ça se fait. Et donc si t'as WinXp (ou peut-être Vista) sous la main... Mais si c'était le cas je suppose que tu aurais déjà installé une partition Windows.

    2)Je me suis toujours demandé si mon l'interface C de ma bibliothèque statique compilée était compatible sous Mac. Ca ne me paraît a priori pas impossible puisque les processeurs le sont. J'ai déjà mélangé l'interface C de librairies compilées par GCC et ICL (compatible VC) sous Windows, mais jamais d'un système à l'autre. Si t'es curieux comme moi et si t'as un peu de temps, ça vaudrait le coût d'essayer.
    Pour ce faire:
    -il te faudrait télécharger l'un des projets pour Visual sur mon site (contenant les sources, les librairies compilées et les exemples)
    http://www.ient.rwth-aachen.de/team/...al/genial.html
    -compiler (avec GCC de préférence dans un premier temps car je n'ai jamais compilé ma bibliothèque avec un compilo pour Mac) au moins l'un des exemples fournis dans samples2 en prenant bien soin de faire l'édition de lien avec les fichiers *.lib (éventuellement renommés en *.a pour GCC).
    -Si ça marche je te filerai ma nouvelle librairie pour faire le benchmark avec produits matriciels multi-threadés.

  4. #24
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    Je n'ai pas de licence window pour installer un dual boot ... et puis mon disque dur fait seulement 80Go....

    Je suis a peu pres sur que les libs pre-compilées ne sont pas portable entre systemes ... peut-etre quelqu'un pourrait nous repondre a ce sujet ?

  5. #25
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Les libs compilées C++ ne sont pas compatibles non plus d'un compilateur à l'autre sur un même système. Mais là il s'agit de l'interface C, c'est compatible d'un compilo à l'autre en théorie (ça marche sous WinXP) et je vois une chance pour que ça marche de WinXP à MacIntel.
    Un essai serait vite fait...

  6. #26
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    Citation Envoyé par Charlemagne
    Un essai serait vite fait...
    oui je peux essayer avec plaisir.

  7. #27
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Merci beaucoup. Je suis vraiment curieux de voir si ça peut marcher.
    Suis les instructions un peu plus haut. Si t'as des questions, n'hésite pas.

  8. #28
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    désolé hier je me suis endormi avec mon fils en le couchant....
    ce soir j'essaie...

  9. #29
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    ton avis ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
     gcc main.cpp -I../../genial/
    In file included from ../../genial/util.h:34,
                     from ../../genial/array/vector.h:42,
                     from ../../genial/array/matrix.h:21,
                     from ../../genial/signal/fft.h:23,
                     from main.cpp:4:
    ../../genial/memory.h:46:22: error: malloc.h: No such file or directory
    ../../genial/memory.h: In function 'void* aligned_malloc(size_t, size_t)':
    ../../genial/memory.h:47: error: 'memalign' was not declared in this scope
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft_step1(const V&, const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:1810: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft_step2(const V&, const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:1874: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft_dense_step2(const V&, const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:1910: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft(const V&, const Vector<G2>&, Vector<G2>&, Vector<G2>&, Vector<G2>&, const F&)':
    ../../genial/signal/fft.h:2132: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: At global scope:
    ../../genial/signal/fft.h:2153: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h:2154: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h:2155: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft_step1(const Vector<G>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:3358: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft_step2(const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:3378: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft_dense_step2(const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:3404: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft(const Vector<G>&, Vector<G2>&, Vector<G2>&, Vector<G2>&, const F&)':
    ../../genial/signal/fft.h:3629: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void aux2_real_ifft(const Vector<G>&, Vector<G>&, Vector<data_vector_generator<V2> >&)':
    ../../genial/signal/fft.h:4003: error: thread-local storage not supported for this target

  10. #30
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    avec gcc4.2 (compilé a partir des sources donc pas officiel Apple)

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    /usr/local/bin/g++ main.cpp -I../../genial/ -fopenmp
    In file included from ../../genial/util.h:34,
                     from ../../genial/array/vector.h:42,
                     from ../../genial/array/matrix.h:21,
                     from ../../genial/signal/fft.h:23,
                     from main.cpp:4:
    ../../genial/memory.h:46:22: error: malloc.h: No such file or directory
    main.cpp:116:4: warning: no newline at end of file
    In file included from ../../genial/util.h:34,
                     from ../../genial/array/vector.h:42,
                     from ../../genial/array/matrix.h:21,
                     from ../../genial/signal/fft.h:23,
                     from main.cpp:4:
    ../../genial/memory.h: In function 'void* aligned_malloc(size_t, size_t)':
    ../../genial/memory.h:47: error: 'memalign' was not declared in this scope
    In file included from main.cpp:4:
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft_step1(const V&, const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:1810: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft_step2(const V&, const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:1874: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft_dense_step2(const V&, const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:1910: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void complex_mixed_fft(const V&, const Vector<G2>&, Vector<G2>&, Vector<G2>&, Vector<G2>&, const F&)':
    ../../genial/signal/fft.h:2132: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: At global scope:
    ../../genial/signal/fft.h:2153: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h:2154: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h:2155: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft_step1(const Vector<G>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:3358: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft_step2(const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:3378: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft_dense_step2(const Vector<G2>&, Vector<G2>&, int, int, const F&)':
    ../../genial/signal/fft.h:3404: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void real_mixed_fft(const Vector<G>&, Vector<G2>&, Vector<G2>&, Vector<G2>&, const F&)':
    ../../genial/signal/fft.h:3629: error: thread-local storage not supported for this target
    ../../genial/signal/fft.h: In function 'void aux2_real_ifft(const Vector<G>&, Vector<G>&, Vector<data_vector_generator<V2> >&)':
    ../../genial/signal/fft.h:4003: error: thread-local storage not supported for this target

  11. #31
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    GCC pour Macs a de toute évidence des différences avec GCC sous d'autres systèmes.

    1) Le Thread Local Storage (TLS) n'est visiblement pas supporté par GCC sous Mac (sous Cygwin ou Mingw non plus d'ailleurs). Il faut que tu déclare "#define __thread" dans le fichier 'genial_config.h" vers la ligne 123. L'ideal étant de connaître quel "#define" est fait par GCC sous Mac (comme pour cygwin et mingw)

    2) Plus délicat maintenant, il faut que tu trouves les fonctions pour GCC sous Mac qui permettent d'allouer et désallouer de la mémoire alignée.
    Tu trouveras des exemples pour plusieurs systèmes au début du fichier 'memory.h'. Essaye par exemple chacune de ces fonctions en commentant alternativement les directives de compilation. A priori les fonctions de FreeBSD devraient se laisser compiler, mais c'est pas sûr que la mémoire allouée soit alignée sur 16 octets. A vérifier. Là aussi l'idéal est de connaître le #define" fait par GCC sous Mac pour rendre la sélection automatique à l'avenir.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #if (defined(__ICL) || defined(_MSC_VER) || defined(__ICC))
      #include <fvec.h>
      inline void *aligned_malloc (size_t size, size_t align=16)  {  return _mm_malloc(size,align);  }
      inline void  aligned_free   (void *p)                       {  return _mm_free(p); }
    #elif defined (__CYGWIN__)
      #include <xmmintrin.h>
      inline void *aligned_malloc (size_t size, size_t align=16)  {  return _mm_malloc(size,align);  }
      inline void  aligned_free   (void *p)                       {  return _mm_free(p); }
    #elif defined(__MINGW32__)
      #include <malloc.h>
      inline void *aligned_malloc (size_t size, size_t align=16)  {  return __mingw_aligned_malloc(size,align);  }
      inline void  aligned_free   (void *p)                       {  return __mingw_aligned_free(p);             }
    #elif defined(__FreeBSD__)
      #include <stdlib.h>
      inline void* aligned_malloc (size_t size, size_t align=16) {  return malloc(size); }
      inline void  aligned_free   (void *p)                      {  return free(p); }
    #else 
      #include <malloc.h>
      inline void* aligned_malloc (size_t size, size_t align=16) {  return memalign(align,size); }
      inline void  aligned_free   (void *p)                      {  return free(p); }
    #endif

  12. #32
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    en mettant

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    #include <stdlib.h>
      inline void* aligned_malloc (size_t size, size_t align=16) {  return malloc(size); }
      inline void  aligned_free   (void *p)                      {  return free(p); }
    dans memory.h
    et

    dans genial_config.h
    on obtient

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    /usr/local/bin/g++ main.cpp -I../../genial/ -fopenmp
    main.cpp:116:4: warning: no newline at end of file
    /usr/bin/ld: Undefined symbols:
    _shfft
    collect2: ld returned 1 exit status
    maintenant je regarde pour les libs...

  13. #33
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    deja je ne sais pas trop avec quelle librairie je dois "linker"
    j'ai essayé avec libirc.lib et libmmt.lib, ca donne le resultat suivant:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     /usr/local/bin/g++ main.cpp -I../../genial/ -fopenmp -L../../lib -lmmt    
    main.cpp:116:4: warning: no newline at end of file
    /usr/bin/ld: archive: ../../lib/libmmt.a has no table of contents, add one with ranlib(1) (can't load from it)
    collect2: ld returned 1 exit status

  14. #34
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Je vais essayer de trouver de mon côté les véritables fonctions alignement, et la '#define' faite par GCC sous Mac. Mais c'est pas évident sans Mac sous a main, alors si tu trouves...;

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Undefined symbols: _shfft
    C'est normal. Tu peux maintenant faire le test de compatiblité de l'interface C des librairies Windows.
    J'imagine qu'il vaut mieux copier le fichier 'genial_icl_xxxx.lib' dans le répertoire de test (pour éviter d'avoir à écrire l'option -Lpath au compilo), le renommer en 'libgenial.a', et compiler avec l'option '-lgenial'.
    En espérant que ça marche...
    Il n'est pas impossible que GCC se plaigne alors de dépendances avec d'autres librairies (stlport...), dans ce cas fais de même pour ces librairies.

  15. #35
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    pareil

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    /usr/local/bin/g++ main.cpp -I../../genial/ -fopenmp -L../../lib -lgenial
    main.cpp:116:4: warning: no newline at end of file
    /usr/bin/ld: archive: ../../lib/libgenial.a has no table of contents, add one with ranlib(1) (can't load from it)
    collect2: ld returned 1 exit status
    aussi j'ai lancé ranlib

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    ranlib libgenial.a
    ranlib: warning for library: libgenial.a the table of contents is empty (no object file members in the library define global symbols)
    une idée ?

  16. #36
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    /usr/bin/ld: archive: ../../lib/libmmt.a has no table of contents, add one with ranlib(1) (can't load from it)
    C'est pas bon signe du tout. Mais essaye dans un premier temps uniquement avec 'genial_icl_xxxx.lib'.
    Si y'a encore la même erreur je vois pas trop quoi faire.

    Essaye alors peut-être de faire les include comme ceci dans le programme
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    extern "C" 
    {
    #include "signal/fft.h"
    }
    Il faudra alors que je me résigne à la non compatibilité de l'interface C.
    C'était pas vraiment gagné d'avance, mais ça valait le coup d'essayer.

  17. #37
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Non plus d'idées. Selon toute vraissemblance c'était pas possible.
    Merci en tout cas.

    Par contre si tu trouves le '#define' fait automatiquement par GCC qui permet d'identifier le Mac, et les fonctions d'alignement mémoire, ça m'intéresse car ça rendra ma bibliothèque compilable sous MacOS.
    Mais je vais quand-même chercher de mon coté.

  18. #38
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    bon bah je ne peux pas lier avec genial_xxxx.lib, il faut libgenial.a pour pouvoir faire -lgenial
    si tu as une autre facon, je suis preneur.

    et en mettant extern C, alors c'est la catastrophe (1 tonne d'erreurs):

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    ../../genial/simd/sse.h: In function 'm128cf sum(const m256cf&)':
    ../../genial/simd/sse.h:435: error: no match for 'operator+' in 'x->m256cf::vec0 + x->m256cf::vec1'
    ../../genial/simd/sse.h:376: note: candidates are: m256cf operator+(const m256cf&, const m256cf&)
    In file included from ../../genial/array/vector.h:32,
                     from ../../genial/array/matrix.h:21,
                     from ../../genial/signal/fft.h:23,
                     from main.cpp:7:
    ../../genial/simd/sse2.h: At global scope:
    ../../genial/simd/sse2.h:72: error: template with C linkage
    ../../genial/simd/sse2.h: In function 'm128cf sum(const m256cf&)':
    ../../genial/simd/sse2.h:74: error: declaration of C function 'm128d operator-(const m128d&)' conflicts with
    ../../genial/simd/sse.h:377: error: previous declaration 'm256cf operator-(const m256cf&, const m256cf&)' here
    ../../genial/simd/sse2.h:75: error: declaration of C function 'm128d operator+(const m128d&, const m128d&)' conflicts with
    ..

  19. #39
    Inactif  
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    743
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 743
    Points : 460
    Points
    460
    Par défaut
    Tant pis, je me ferais une raison...

    Ca n'a pas été vain pour moi, je vais peut-être pouvoir rendre ma bibliothèque compatible aux Macs.
    Je pense que j'ai trouvé ce #define automatique. Il s'agirait de '__APPLE__'.
    Tu peux le tester en modifiant le fichier 'genial_config.h' comme ceci.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    // Thread-Local Storage
    #if defined(__ICL) || defined(_MSC_VER)
      //#define __thread
      #define __thread __declspec( thread )
    #elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) // do not support TLS
      #define __thread
    #elif defined(__GNUC__)
      //#define __thread
    #else
      #define __thread
    #endif
    Reste encore à trouver les bonnes fonctions d'alignement. Peut-être que c'est comme FreeBSD mais il faudra s'assurer de l'alignement sur 16 octets.

  20. #40
    Membre expérimenté
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 354
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 354
    Points : 1 419
    Points
    1 419
    Par défaut
    ce ne serait pas __APPLE__ et __MACH__ ?
    je teste de suite...

Discussions similaires

  1. Optimiser l'utilisation d'un processeur multi-core
    Par photorelief dans le forum Modules
    Réponses: 11
    Dernier message: 11/04/2010, 21h28
  2. affichage de produit matricielle sur excel
    Par opensource dans le forum Macros et VBA Excel
    Réponses: 1
    Dernier message: 10/02/2010, 11h42
  3. petite question sur le multi core
    Par vmfa-2 sven dans le forum Composants
    Réponses: 4
    Dernier message: 23/05/2008, 14h51
  4. Benchmark sur processeur multi-core
    Par Charlemagne dans le forum C++
    Réponses: 123
    Dernier message: 16/07/2007, 10h51
  5. Réponses: 5
    Dernier message: 14/04/2007, 14h12

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo