ScalES-PPM
Macros | Functions
ppm_random_mt_c.c File Reference

multi-threaded array-filling PRNG routines More...

#include <assert.h>
#include <limits.h>
#include <stdlib.h>
#include "core/ppm_random.h"
#include "cfortran.h"
#include "ppm_omp_assign.h"

Macros

#define RHS   PPM_irand()
 
#define RHS   PPM_irandp()
 
#define RHS   PPM_irandr(range)
 
#define RHS   PPM_ya_fsgrandom()
 
#define RHS   PPM_ya_frandom()
 
#define RHS   PPM_drandr(range)
 
#define RHS   PPM_ya_fsgrandomf()
 
#define RHS   PPM_ya_frandomf()
 
#define RHS   PPM_frandr(range)
 

Functions

void PPM_irand_mt_a (int *restrict a, size_t n)
 
void PPM_irandp_mt_a (int *restrict a, size_t n)
 
void PPM_irandr_mt_a (int *restrict a, size_t n, struct PPM_iinterval range)
 
void PPM_drand_mt_a (double *restrict a, size_t n)
 
void PPM_drandp_mt_a (double *restrict a, size_t n)
 
void PPM_drandr_mt_a (double *restrict a, size_t n, struct PPM_iinterval_dp range)
 
void PPM_frand_mt_a (float *restrict a, size_t n)
 
void PPM_frandp_mt_a (float *restrict a, size_t n)
 
void PPM_frandr_mt_a (float *restrict a, size_t n, struct PPM_iinterval_sp range)
 
 FCALLSCSUB3 (FCALLSCSUB3(PPM_irandr_mt_a_f, PPM_IRANDR_MT_A_2D, ppm_irandr_mt_a_2d, INTVV, FCALLSCSUB3(INT, PVOID)
 
 FCALLSCSUB2 (FCALLSCSUB2(PPM_drandp_mt_a_f, PPM_DRANDP_MT_A_2D, ppm_drandp_mt_a_2d, DOUBLEVV, INT)
 
 FCALLSCSUB3 (FCALLSCSUB3(PPM_drandr_mt_a_f, PPM_DRANDR_MT_A_2D, ppm_drandr_mt_a_2d, DOUBLEVV, FCALLSCSUB3(INT, PVOID)
 
 FCALLSCSUB2 (PPM_frandp_mt_a_f, PPM_FRANDP_MT_A_3D, ppm_frandp_mt_a_3d, FLOATVVV, INT)
 

Detailed Description

multi-threaded array-filling PRNG routines

Copyright (C) 2016 Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Version
1.0 Keywords: PRNG OpenMP
Author
Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de Maintainer: Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de URL: https://www.dkrz.de/redmine/projects/scales-ppm

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the DKRZ GmbH nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Das diesem Bericht zugrundeliegende Vorhaben wurde mit Mitteln des Bundesministeriums für Bildung, und Forschung unter dem Förderkennzeichen 01IH08004E gefördert. Die Verantwortung für den Inhalt dieser Veröffentlichung liegt beim Autor.