Retourner au contenu associé (journal : Pyth(on|ran) + OpenMP ?)
Posté par Zarmakuizz le 07 août 2012 à 14:07. En réponse au journal Pyth(on|ran) + OpenMP ?. Évalué à 8.
Quitte à ajouter sa propre syntaxe, pourquoi pas mettre les annotations en commentaire ?
Comme ça :
def saxpy(x,y,a): #@omp parallel for private(i,b) for i in range(len(x)): b = a* x[i] # laid mais utile pour l'exemple y[i]+= b
def fibo(n): if n < 2 : return n else: #@omp task default(none) shared(x,n) x = fibo(n-1) y = fibo(n-2) #@omp task wait return x+y
Commentaire sous licence LPRAB - http://sam.zoy.org/lprab/
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Des annotations en commentaire
Posté par Zarmakuizz . En réponse au journal Pyth(on|ran) + OpenMP ?. Évalué à 8.
Quitte à ajouter sa propre syntaxe, pourquoi pas mettre les annotations en commentaire ?
Comme ça :
Commentaire sous licence LPRAB - http://sam.zoy.org/lprab/