GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
modularHost.c.h File Reference

Go to the source code of this file.

Macros

#define MODULAR_CH
 
#define MATRIX_ELEM(mat, i, j)   (mat[i * N + j])
 

Functions

void modMatMat (size_t N, MODULAR_NUMBER_TYPE *A, MODULAR_NUMBER_TYPE *B, MODULAR_NUMBER_TYPE *C, MODULAR_NUMBER_TYPE m)
 Compute A*B % m. More...
 
void modMatPowLog2 (size_t N, MODULAR_NUMBER_TYPE *A, MODULAR_NUMBER_TYPE *B, MODULAR_NUMBER_TYPE m, cl_uint e)
 Compute matrix B = (A^(2^e) % m) More...
 
void modMatPow (size_t N, MODULAR_NUMBER_TYPE *A, MODULAR_NUMBER_TYPE *B, MODULAR_NUMBER_TYPE m, cl_uint n)
 Compute matrix B = A^n % m. More...
 

Macro Definition Documentation

◆ MATRIX_ELEM

#define MATRIX_ELEM (   mat,
  i,
 
)    (mat[i * N + j])

◆ MODULAR_CH

#define MODULAR_CH

Function Documentation

◆ modMatMat()

void modMatMat ( size_t  N,
MODULAR_NUMBER_TYPE *  A,
MODULAR_NUMBER_TYPE *  B,
MODULAR_NUMBER_TYPE *  C,
MODULAR_NUMBER_TYPE  m 
)

Compute A*B % m.

◆ modMatPow()

void modMatPow ( size_t  N,
MODULAR_NUMBER_TYPE *  A,
MODULAR_NUMBER_TYPE *  B,
MODULAR_NUMBER_TYPE  m,
cl_uint  n 
)

Compute matrix B = A^n % m.

◆ modMatPowLog2()

void modMatPowLog2 ( size_t  N,
MODULAR_NUMBER_TYPE *  A,
MODULAR_NUMBER_TYPE *  B,
MODULAR_NUMBER_TYPE  m,
cl_uint  e 
)

Compute matrix B = (A^(2^e) % m)