ScalES-PPM
Functions
ppm_combinatorics_c.c File Reference

combinatorial routines More...

#include <assert.h>
#include <inttypes.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "core/bittab.h"
#include "core/ppm_xfuncs.h"
#include "core/yarandom.h"
#include "core/ppm_visibility.h"

Functions

int PPM_DSO_API_EXPORT PPM_prime_factorization_32 (uint32_t n, uint32_t **factors)
 
void PPM_DSO_API_EXPORT PPM_permute_randomly (void *a, size_t esize, size_t n)
 

Detailed Description

combinatorial routines

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

Version
1.0
Author
Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Function Documentation

◆ PPM_permute_randomly()

void PPM_DSO_API_EXPORT PPM_permute_randomly ( void *  a,
size_t  esize,
size_t  n 
)

Permute array.

Parameters
aarray of
elements, each of them of size @esize
esizesize of each element in bytes
nnumber of elements in array

◆ PPM_prime_factorization_32()

int PPM_DSO_API_EXPORT PPM_prime_factorization_32 ( uint32_t  n,
uint32_t **  factors 
)

Compute number of prime factors of 32 bit integer

Parameters
nnumber to factorize
factorsif non-NULL points to (NULL/non-NULL) pointer that (if NULL) will be malloced and (or if non-NULL) set to list of factors
Returns
number of prime factors of n

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.