JSON Web Token Authentication
A JSON Web Token (JWT) defines a compact and self-contained way for securely transmitting information between parties as a JSON object. You can find out more about JWTs at JWT.IO.
Swift-JWT is our implementation of JSON Web Token using Swift. It allows you to create sign and verify JWTs on iOS, macOS and Linux using a range of algorithms. This guide will demonstrate how to use Swift-JWT to implement Single Sign On (SSO) authentication for your Kitura routes. This will allow a user to sign in once and then to access resources from other routes without having to repeat the authentication process.
Step 1: Create the JWT routes
To use JWTs from a server, we need to add Swift-JWT to our dependencies.
If you don't have a server, follow our Create a server guide.
Once we have added Swift-JWT, we need a file for our JWT routes.
Firstly, open your Application.swift file in your default text editor:
open Sources/Application/Application.swift
Inside the postInit() function add:
initializeJWTRoutes(app: self)
Create a new file, called JWTRoutes.swift:
touch Sources/Application/Routes/JWTRoutes.swift
Open your JWTRoutes.swift file:
open Sources/Application/Routes/JWTRoutes.swift
Inside this file, add the following code:
import Foundation
import KituraContracts
import SwiftJWT
func initializeJWTRoutes(app: App) {
app.router.post("/jwtlogin") { request, response, next in
// Read credentials and generate JWT here
next()
}
app.router.get("/jwtprotected") { request, response, next in
// Verify JWT here
next()
}
}
extension App {
// Define JWT signer and verifier here
}
This code imports our requires modules, sets up the framework for a routes page and defines the two raw routes that we will use in our guide.
Step 2: Set up your signing and verifying algorithm
Swift-JWT supports multiple algorithms for signing and verifying JWTs as defined by RFC7518. This is implemented by creating a JWTSigner and JWTVerifier struct with a required credentials.
Click on one of the tabs below to see how and why you would use each algorithm.
You can process JWTs using a Hashed Message Authentication Code (HMAC). This uses a shared symmetric key as a password for both signing and verifying. This is simple and fast but requires a secure method of sending the password to the verifier.
Step 2a: Create your JWTSigner
The JWTSigner is used to sign a JWT instance and produce a signed JWT string.
Inside the App extension, create an HMAC JWTSigner by providing a password:
static let jwtSigner = JWTSigner.hs256(key: Data("kitura".utf8))
Step 2b: Create your JWTVerifier
The JWTVerifier is used to verify a signed JWT string. This ensures the signature was generated using the same password and the JWT has not been changed.
Inside the App extension, we create an HMAC JWTVerifier by providing the same password as before:
static let jwtVerifier = JWTVerifier.hs256(key: Data("kitura".utf8))
You can process JWTs using Elliptic Curve Digital Signature Algorithm (ECDSA). This uses asymmetric keys with a private key for signing and a public key for verifying. The public key allows anyone to verify a JWT but only the provider can create them. ECDSA is recommended over RSA since it uses smaller keys, requires less processing power and produces smaller signatures.
Step 2a: Create your elliptic curve keys
Elliptic curve keys can be generated through Apple, OpenSSL or using BlueECC.
For simplicity you can use the following pre-generated keys.
Add the following EC PEM strings (Or strings you have generated) to your App extension:
static let privateKey = """
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIJX+87WJ7Gh19sohyZnhxZeXYNOcuGv4Q+8MLge4UkaZoAoGCCqGSM49
AwEHoUQDQgAEikc5m6C2xtDWeeAeT18WElO37zvFOz8p4kAlhvgIHN23XIClNESg
KVmLgSSq2asqiwdrU5YHbcHFkgdABM1SPA==
-----END EC PRIVATE KEY-----
"""
static let publicKey = """
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEikc5m6C2xtDWeeAeT18WElO37zvF
Oz8p4kAlhvgIHN23XIClNESgKVmLgSSq2asqiwdrU5YHbcHFkgdABM1SPA==
-----END PUBLIC KEY-----
"""
Step 2b: Create your JWTSigner
The JWTSigner is used to sign a JWT instance and produce a signed JWT string.
Inside the App extension, create an ECDSA JWTSigner by providing the private key:
@available(OSX 10.13, *)
static let jwtSigner = JWTSigner.es256(privateKey: Data(privateKey.utf8))
ECDSA algorithms such as es256 use BlueECC, which is only available on macOS 10.13 or newer. When using them you will need to us @available to handle cases where the operating system version is not high enough.
Step 2c: Create your JWTVerifier
The JWTVerifier is used to verify a signed JWT string. This ensures the signature was generated using the corresponding private key and the JWT has not been changed.
Inside the App extension, we create an ECDSA JWTVerifier by providing the public key:
@available(OSX 10.13, *)
static let jwtVerifier = JWTVerifier.es256(publicKey: Data(publicKey.utf8))
You can process JWTs using RSA cryptography. This uses asymmetric keys with a private key for signing and a public key for verifying. The public key allows anyone to verify a JWT but only the provider can create them. ECDSA is recommended over RSA since it uses smaller keys, requires less processing power and produces smaller signatures.
Step 2a: Create your RSA keys
You can generate RSA keys in terminal using the following OpenSSL commands:
openssl genrsa -out privateKey.pem 2048
openssl rsa -in privateKey.pem -pubout -outform PEM -out publicKey.pem
For simplicity you can use the following pre-generated keys.
Add the following RSA PEM strings (Or the ones you generated) to your App extension:
static let privateKey = """
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAxyebvXKgG7VHTUArwIPLL6uruJuaYTuspaI793JQK/3XIJ1O
8KRXqWvy2Awo+po1IeKIGioCwD7mVbN2oX9yC8K+VDUJrpxz1Bve+zLZ59x81TO0
IlgbugjduGBmnKTElL/Y7MbI2SIJheBfxqcvopc5U+j3eVLvl3mTPx5T9i/qutmw
L7qfk/bOOgV3sMVa/Q9SXE4ZE1737UHUgcBJFp5okqSKBQw6kxZ7HsDSLDIZJRKH
vW3NiCIrK83JvQp4tYWi4Sb3rDl3TyRlqDM4Ly0YQ6be5IsPfmut8NENDoviyZRd
ihnN6TuBk3zUfb4MkcO/KUGub37zRQbgB5KQmwIDAQABAoIBAQCal/N8HxOMDq8X
l12fJm8+RPua5Sb0nXcKaCI2lgUH8RbimVoi0N+/gy1SajYROk1OTWOrM7tI8kqo
chP/j0e/O1+1TCqE4avEFhKEWlfudSht86G8GzsCsUkzi5l7tSdn9Hh2bGSSsKpF
wwN12GfQxaTZrvkTs76KjfQwReGVMwPf5D67968Eani+sj02ODYT99sQd0Zs9Jkd
nqjIkDCeAQYgUUpsut/0mtodwrJlQXGS1DjOSfbUbdXTzQOR6a5uHMCdqNG2Dqrv
GkzdViwzAfwNz3ntdqn2YVnCPQwdOArrP6iKIPukMC5zckMCdcvoeEOLY+7SwGvB
srWM7Xj5AoGBAO7OhOOAWoI9RJ2onfrB4xi84cdcnAq+lQij//yC+rTNC4fu7eJp
MbF9C7P7XicD2xTJgfjddYW7H6yc5t2BChmICXbEv0K0/kebc5MzaZK264u9fxk6
MToLWReCFYQ5pmqgqeKJ2CV86byDFYVf0cSt4PcpOXfdHQzjA/S5qMslAoGBANV+
QfTBQe/bkTVRRlY1YcghPZr6sR7cUbyXX0ou8dDdAdSZ1VOwDmIZhnq0/w/HzJQm
UMw2zjs37y9Mf60xLlvY8bbhU1rlZ8vZr+0xm8K4fYlnt+ONNjv6puYvF5IPKad3
KvafIOelY8liLqo9gXJYUZGZcxRikiKtZotQJwC/AoGBAN3rz3S3p+SWWTiGJOGN
4qPvi4XAG0ak20yfU1luwtrYHdoiALFB/qspQIHunA13uNU1efIyo282ePXpDWZU
73TQhbL4naC5IACdhqcJxRdRo81FuWJRQMPnHdEJ00MAbBV03ssmPFaCIZhM3OgI
JqE20PP/PGeWdNOv99Ip4qF9AoGAGeGxi0N2g+aBZw5QUZktHn7xIf2sRUp+Wjeb
pLmmNSTl2OlBVGDujXP8upmApmAZbAhtGSS3wbQZOgmzHMLulNHrE7mjSkyvVaYx
TrcJ5ARLq8G4KEzxOzo6y4L//4P5D8VBnx5RdeO2Ai7160uDiuIsGVOaAOmmP6/3
04HHCK8CgYEAuS4wfgKWL9nRInjOjrKd9SSnHFWbmD4PfrbjtNY69R3FqryTmT1e
9GUyAQTpdIn46LYDczkQJpg8TIN/3yDHb9TErmspsAEDnFHD7Dsxi0LlbPkSdhls
cQGNrHxp2xvM+LKFW1y3K6XUJhZZSKEVQvR3v4QVxCUxglbGJ5BTNXY=
-----END RSA PRIVATE KEY-----
"""
static let publicKey = """
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxyebvXKgG7VHTUArwIPL
L6uruJuaYTuspaI793JQK/3XIJ1O8KRXqWvy2Awo+po1IeKIGioCwD7mVbN2oX9y
C8K+VDUJrpxz1Bve+zLZ59x81TO0IlgbugjduGBmnKTElL/Y7MbI2SIJheBfxqcv
opc5U+j3eVLvl3mTPx5T9i/qutmwL7qfk/bOOgV3sMVa/Q9SXE4ZE1737UHUgcBJ
Fp5okqSKBQw6kxZ7HsDSLDIZJRKHvW3NiCIrK83JvQp4tYWi4Sb3rDl3TyRlqDM4
Ly0YQ6be5IsPfmut8NENDoviyZRdihnN6TuBk3zUfb4MkcO/KUGub37zRQbgB5KQ
mwIDAQAB
-----END PUBLIC KEY-----
"""
Step 2b: Create your JWTSigner
The JWTSigner is used to sign a JWT instance and produce a signed JWT string.
Inside the App extension, create an RSA JWTSigner by providing the private key:
static let jwtSigner = JWTSigner.rs256(privateKey: Data(privateKey.utf8))
Step 2c: Create your JWTVerifier
The JWTVerifier is used to verify a signed JWT string. This ensures the signature was generated using the corresponding private key and the JWT has not been changed.
Inside the App extension, we create an RSA JWTVerifier by providing the public key:
static let jwtVerifier = JWTVerifier.rs256(publicKey: Data(publicKey.utf8))
Step 3: Define a model to represent the user's credentials
For the initial authentication, the user will have to provide their username and password. This could be achieved with basic authentication, the Authorization header or in the body of a POST request. In this guide we will pass the username and password in the body of a POST request and use a model to represent this.
Passwords and JWTs with sensitive data must be kept private and should always be exchanged over a secure layer like HTTPS.
Create a new file, called UserCredentials.swift:
touch Sources/Application/Models/UserCredentials.swift
Open your UserCredentials.swift file:
open Sources/Application/Models/UserCredentials.swift
Inside this file we define our UserCredentials model:
struct UserCredentials: Codable {
let username: String
let password: String
}
Step 4: Authenticate the User
We need to read the user's credentials in our POST route so they can be authenticated.
Inside the POST route add:
let credentials = try request.read(as: UserCredentials.self)
// Users credentials are authenticated
At this stage, you would normally hash the password and verify it against a database. However, for simplicity, we are going to assume the user successfully logged in.
Step 5: Create the signed JWT
A JWT contains claims about the user that we want include in subsequent requests. You can specify any information as a claim, however there are "Registered Claims" which have a pre-defined meaning:
- iss: The issuer of the token.
- sub: The subject of the token.
- aud: The audience of the token.
- exp: The expiration time which MUST be after the current date/time.
- nbf: Defines the time before which the JWT MUST NOT be accepted for processing.
- iat: The time the JWT was issued. Can be used to determine the age of the JWT.
- jti: Unique identifier for the JWT. Can be used to prevent the JWT from being replayed.
Swift-JWT comes with a struct representing these Registered Claims which we will use for our example.
Inside the POST route, beneath the code where we authenticated the user, initialize the user's claims:
let myClaims = ClaimsStandardJWT(iss: "Kitura", sub: credentials.username, exp: Date(timeIntervalSinceNow: 3600))
The claims information tells us the username which is the subject of the token, that they were authenticated by Kitura and that the token will expire in one hour.
Next, we will initialize our JWT:
var myJWT = JWT(claims: myClaims)
We can sign this JWT using the JWTSigner we created in step 2:
let signedJWT = try myJWT.sign(using: App.jwtSigner)
Finally we return the signed JWT string to the user:
response.send(signedJWT)
Our completed login route should look as follows:
app.router.post("/jwtlogin") { request, response, next in
let credentials = try request.read(as: UserCredentials.self)
// Users credentials are authenticated
let myClaims = ClaimsStandardJWT(iss: "Kitura", sub: credentials.username, exp: Date(timeIntervalSinceNow: 3600))
var myJWT = JWT(claims: myClaims)
let signedJWT = try myJWT.sign(using: App.jwtSigner)
response.send(signedJWT)
next()
}
Step 6: Test the JWT creation
Compile your project and start the server.
To test the route using curl, open Terminal and enter the following:
curl -X POST \
http://localhost:8080/jwtlogin \
-H 'content-type: application/json' \
-d '{
"username": "Joe Bloggs",
"password": "password"
}'
You should be returned a JWT string that is structured xxxx.yyyy.zzzz where xxxx is the base64 encoded header, yyyy is the base 64 encoded claims and zzzz is the signature.
Below is an example JWT, generated using HS256 with the password "kitura". The one returned by your curl request will have different values but the same structure.
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJLaXR1cmEiLCJzdWIiOiJKb2UgQmxvZ2dzIiwiZXhwIjoxNTUzMDE4Mjg0LjMyOTcwMTl9.t55WealACtYGCQGS3EQgRQuurmNSBO5fWZqzqJjEIi
We can decode the JWT string using the debugger at JWT.IO which allows us view the headers and claims.
Step 7: Verify a JWT
So far, we have created a signed JWT, which allows a user to authenticate themselves. At this stage, the user would attach the JWT string to future requests either using cookies or the Authorization header. When we receive this JWT string on other routes, we need to verify that we signed it and it hasn't been altered.
Let's start by reading the JWT string from the Authorization header of the request. The JWT string will be contained within the second component of the header, so we validate that there are only two components within the header and that the first contains the string "Bearer".
Inside the GET route, add the following code:
let authHeader = request.headers["Authorization"]
guard let authComponents = authHeader?.components(separatedBy: " "),
authComponents.count == 2,
authComponents[0] == "Bearer"
else {
let _ = response.send(status: .unauthorized)
return try response.end()
}
The JWT string will be authComponents[1], so we will verify this string and use it to initialize a JWT.
Add the following code to your guard statement, below authComponents[0] == "Bearer":
let jwt = try? JWT<ClaimsStandardJWT>(jwtString: authComponents[1], verifier: App.jwtVerifier)
There we have it, the user's JWT is now available for us to use within our route. If we successfully initialized the JWT using the jwtVerifier, we know that we signed it in the first place and the contents haven't been changed. If the signature isn't verified, we reject the request and return the 401 unauthorized status code.
To finish, let's send the decoded JWT back to the user.
After the else closure, add the following code:
response.send(jwt)
Your completed GET route should now look as follows:
app.router.get("/jwtprotected") { request, response, next in
let authHeader = request.headers["Authorization"]
guard let authComponents = authHeader?.components(separatedBy: " "),
authComponents.count == 2,
authComponents[0] == "Bearer",
let jwt = try? JWT<ClaimsStandardJWT>(jwtString: authComponents[1], verifier: App.jwtVerifier)
else {
let _ = response.send(status: .unauthorized)
return try response.end()
}
response.send(jwt)
next()
}
Step 8: Test the protected Route
To test this, restart your server and send the POST request from Step 6.
Copy the returned JWT string and paste it into the following curl request:
curl -X GET \
http://localhost:8080/jwtprotected \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <Your JWT string here>'
You should see your JWT with your username returned to you. This should look something like:
{"claims":{"iss":"Kitura","sub":"Joe Bloggs","exp":574703307.61258602},"header":{"typ":"JWT","alg":"ES256"}}
Congratulations! We have just created a JWT single sign on system using a Kitura Server. Your completed JWTRoutes.swift file for HS256 should look as follows:
import KituraContracts
import SwiftJWT
import Foundation
func initializeJWTRoutes(app: App) {
app.router.post("/jwtlogin") { request, response, next in
let credentials = try request.read(as: UserCredentials.self)
let myClaims = ClaimsStandardJWT(iss: "Kitura", sub: credentials.username, exp: Date(timeIntervalSinceNow: 3600))
var myJWT = JWT(claims: myClaims)
let signedJWT = try myJWT.sign(using: App.jwtSigner)
response.send(signedJWT)
next()
}
app.router.get("/jwtprotected") { request, response, next in
let authHeader = request.headers["Authorization"]
guard let authComponents = authHeader?.components(separatedBy: " "),
authComponents.count == 2,
authComponents[0] == "Bearer",
let jwt = try? JWT<ClaimsStandardJWT>(jwtString: authComponents[1], verifier: App.jwtVerifier)
else {
let _ = response.send(status: .unauthorized)
return try response.end()
}
response.send(jwt)
next()
}
}
extension App {
// Example for HMAC signer and verifier
static let jwtSigner = JWTSigner.hs256(key: Data("kitura".utf8))
static let jwtVerifier = JWTVerifier.hs256(key: Data("kitura".utf8))
}
Step 9: JWTs on Codable Routes (Optional)
In our example we used raw routing since we chose to pass the user credentials via the request headers. If we want to use JWTs on our codable routes, we need to encapulate the verification and creation of the users JWT in a TypeSafeMiddleware. We can then register our TypeSafeMiddleware on a Codable route to authenticate the user and access their claims.
Step 9a: Define our type safe middleware.
If you don't already have one, create a Middlewares folder:
mkdir Sources/Application/Middlewares
Create a new file, called TypeSafeJWT.swift:
touch Sources/Application/Middlewares/TypeSafeJWT.swift
Open your TypeSafeJWT.swift file:
open Sources/Application/Middlewares/TypeSafeJWT.swift
Inside this file, define TypeSafeJWT with the following code:
import SwiftJWT
import Kitura
struct TypeSafeJWT<C: Claims>: TypeSafeMiddleware {
static func handle(request: RouterRequest, response: RouterResponse, completion: @escaping (TypeSafeJWT?, RequestError?) -> Void) {
}
}
The TypeSafeMiddleware protocol requires us to implement the handle function. This function is where we will interact with the request headers; we then return an instance of TypeSafeJWT on success, or a RequestError on failure. The TypeSafeJWT struct is generic so it can be used on any JWT.
Within the handler we are interested in the decoded JWT so we add that as a field:
let jwt: JWT<C>
Finally, we initialize our JWT using the same functions as Step 7 for our protected GET route.
Inside our handle function, add the following:
let authHeader = request.headers["Authorization"]
guard let authComponents = authHeader?.components(separatedBy: " "),
authComponents.count == 2,
authComponents[0] == "Bearer",
let jwt = try? JWT<C>(jwtString: authComponents[1], verifier: App.jwtVerifier)
else {
return completion(nil, .unauthorized)
}
completion(TypeSafeJWT(jwt: jwt), nil)
Your completed TypeSafeJWT.swift file should look as follows:
import SwiftJWT
import Kitura
struct TypeSafeJWT<C: Claims>: TypeSafeMiddleware {
let jwt: JWT<C>
static func handle(request: RouterRequest, response: RouterResponse, completion: @escaping (TypeSafeJWT?, RequestError?) -> Void) {
let authHeader = request.headers["Authorization"]
guard let authComponents = authHeader?.components(separatedBy: " "),
authComponents.count == 2,
authComponents[0] == "Bearer",
let jwt = try? JWT<C>(jwtString: authComponents[1], verifier: App.jwtVerifier)
else {
return completion(nil, .unauthorized)
}
completion(TypeSafeJWT(jwt: jwt), nil)
}
}
Step 9b: Register TypeSafeJWT on a route.
Back in our routes file, JWTRoutes.swift, we are going to register a new route using our TypeSafeMiddleware.
In the function initializeJWTRoutes, add a new route called "/jwtCodable"
app.router.get("/jwtCodable", handler: app.typeSafeHandler)
In your App extension, define the typeSafeHandler:
func typeSafeHandler(typeSafeJWT: TypeSafeJWT<ClaimsStandardJWT>, completion: (JWT<ClaimsStandardJWT>?, RequestError?) -> Void) {
completion(typeSafeJWT.jwt, nil)
}
This function will run the middleware, TypeSafeJWT, and if it succeeds it will return the JWT instance, just as we did in our raw routing example above.
Step 9c: Test the new Codable route
To test this route, restart your server and send the POST request from Step 6.
Copy the returned JWT string and paste it into the following curl request:
curl -X GET \
http://localhost:8080/jwtCodable \
-H 'content-type: application/json' \
-H 'Authorization: Bearer <Your JWT string here>'
We should see your JWT with your username returned to you. This should look something like:
{"claims":{"iss":"Kitura","sub":"Joe Bloggs","exp":574703307.61258602},"header":{"typ":"JWT","alg":"ES256"}}
Next steps
Web Application: Learn about web applications and what Kitura provides.


Gamma distributed random effects |
|||||||||||||||||||
|
Model descriptionIt is customary to use normally distributed random effects, but in some situations other distributions than the normal are required. We shall here illustrate the use of gamma distributed random effects in ADMB-RE.The problem with non-Gaussian random effects is that the Laplace approximation underlying ADMB-RE may be inaccurate. To avoid this we start out with N(0,1) distributed random variables (r.v.), which are transformed into gamma distributed r.v., via the inverse cumulative distribution function for the gamma distribution. The steps are: u ~ N(0,1) is the underlying random effect. z = F(u), is uniformly distributed, where F() is cumulative distribution function of u. g = G_inv(z), where G_inv() is the inverse cumulative distribution function of the target gamma distribution. As a result, g will be a variable, with a gamma distribution, that can be used in the model. Nelson et al (2006, Sec 4.1) consider a survival model with a gamma distributed random effect. They fit the model using SAS NLMIXED, but face problems when trying to fit the model using adaptive Gaussian quadrature, which is the default in SAS NLMIXED. The box to the left gives an implementation of the model in ADMB-RE, which has no difficulties in fitting the model with adaptive Gaussian quadrature (via the command line option -gh 50). Hence, it appears that ADMB-RE is numerically more stable than SAS NLMIXED The following table compares the results from Nelson et al (Table 2, using non-adaptive Gaussian quadrature) with ADMB-re (50 quadrature points in adaptive Gaussian quadrature). It is seen that the results are very similar.
ReferencesNelson KP, Lipsitz, Garrett, Fitzmaurice, Ibrahim, Parzen and Strawderman (2006). Use of the Probability Integral Transformation to Fit Nonlinear Mixed-Effects Models With Nonnormal Random Effects. Journal of Computational & Graphical Statistics, Vol. 15, No. 1, pp.39-57 |


public class PolynomialGF2mSmallM
extends java.lang.Object
GF2mField
,
PolynomialRingGF2m
| Modifier and Type | Field and Description |
|---|---|
static char |
RANDOM_IRREDUCIBLE_POLYNOMIAL
Constant used for polynomial construction (see constructor
PolynomialGF2mSmallM(GF2mField, int, char, SecureRandom) ). |
| Constructor and Description |
|---|
PolynomialGF2mSmallM(GF2mField field)
Construct the zero polynomial over the finite field GF(2^m).
|
PolynomialGF2mSmallM(GF2mField field,
byte[] enc)
Create a polynomial over the finite field GF(2^m).
|
PolynomialGF2mSmallM(GF2mField field,
int degree)
Construct a monomial of the given degree over the finite field GF(2^m).
|
PolynomialGF2mSmallM(GF2mField field,
int[] coeffs)
Construct the polynomial over the given finite field GF(2^m) from the
given coefficient vector.
|
PolynomialGF2mSmallM(GF2mField field,
int deg,
char typeOfPolynomial,
java.security.SecureRandom sr)
Construct a polynomial over the finite field GF(2^m).
|
PolynomialGF2mSmallM(GF2mVector vect)
Create a polynomial over the finite field GF(2^m) out of the given
coefficient vector.
|
PolynomialGF2mSmallM(PolynomialGF2mSmallM other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PolynomialGF2mSmallM |
add(PolynomialGF2mSmallM addend)
Compute the sum of this polynomial and the given polynomial.
|
PolynomialGF2mSmallM |
addMonomial(int degree)
Compute the sum of this polynomial and the monomial of the given degree.
|
void |
addToThis(PolynomialGF2mSmallM addend)
Add the given polynomial to this polynomial (overwrite this).
|
PolynomialGF2mSmallM[] |
div(PolynomialGF2mSmallM f)
Divide this polynomial by the given polynomial.
|
boolean |
equals(java.lang.Object other)
checks if given object is equal to this polynomial.
|
int |
evaluateAt(int e)
Evaluate this polynomial p at a value e (in
GF(2^m)) with the Horner scheme.
|
PolynomialGF2mSmallM |
gcd(PolynomialGF2mSmallM f)
Return the greatest common divisor of this and a polynomial f
|
int |
getCoefficient(int index)
Return the coefficient with the given index.
|
int |
getDegree()
Return the degree of this polynomial
|
byte[] |
getEncoded()
Returns encoded polynomial, i.e., this polynomial in byte array form
|
int |
getHeadCoefficient() |
int |
hashCode() |
PolynomialGF2mSmallM |
mod(PolynomialGF2mSmallM f)
Reduce this polynomial modulo another polynomial.
|
PolynomialGF2mSmallM |
modDiv(PolynomialGF2mSmallM divisor,
PolynomialGF2mSmallM modulus)
Compute the result of the division of this polynomial by another
polynomial modulo a third polynomial.
|
PolynomialGF2mSmallM |
modInverse(PolynomialGF2mSmallM a)
Compute the inverse of this polynomial modulo the given polynomial.
|
PolynomialGF2mSmallM |
modMultiply(PolynomialGF2mSmallM a,
PolynomialGF2mSmallM b)
Compute the product of this polynomial and another polynomial modulo a
third polynomial.
|
PolynomialGF2mSmallM[] |
modPolynomialToFracton(PolynomialGF2mSmallM g)
Compute a polynomial pair (a,b) from this polynomial and the given
polynomial g with the property b*this = a mod g and deg(a)<=deg(g)/2.
|
PolynomialGF2mSmallM |
modSquareMatrix(PolynomialGF2mSmallM[] matrix)
Square this polynomial using a squaring matrix.
|
PolynomialGF2mSmallM |
modSquareRoot(PolynomialGF2mSmallM a)
Compute the square root of this polynomial modulo the given polynomial.
|
PolynomialGF2mSmallM |
modSquareRootMatrix(PolynomialGF2mSmallM[] matrix)
Compute the square root of this polynomial using a square root matrix.
|
PolynomialGF2mSmallM |
multiply(PolynomialGF2mSmallM factor)
Compute the product of this polynomial and the given factor using a
Karatzuba like scheme.
|
void |
multThisWithElement(int element)
Multiply this polynomial with an element from GF(2^m).
|
PolynomialGF2mSmallM |
multWithElement(int element)
Compute the product of this polynomial with an element from GF(2^m).
|
PolynomialGF2mSmallM |
multWithMonomial(int k)
Compute the product of this polynomial with a monomial X^k.
|
java.lang.String |
toString()
Returns a human readable form of the polynomial.
|
public static final char RANDOM_IRREDUCIBLE_POLYNOMIAL
PolynomialGF2mSmallM(GF2mField, int, char, SecureRandom)
).public PolynomialGF2mSmallM(GF2mField field)
field
- the finite field GF(2^m)public PolynomialGF2mSmallM(GF2mField field, int deg, char typeOfPolynomial, java.security.SecureRandom sr)
field
- the finite field GF(2^m)deg
- degree of polynomialtypeOfPolynomial
- type of polynomialsr
- PRNGpublic PolynomialGF2mSmallM(GF2mField field, int degree)
field
- the finite field GF(2^m)degree
- the degree of the monomialpublic PolynomialGF2mSmallM(GF2mField field, int[] coeffs)
field
- finite field GF2mcoeffs
- the coefficient vectorpublic PolynomialGF2mSmallM(GF2mField field, byte[] enc)
field
- the finite field GF(2^m)enc
- byte[] polynomial in byte array formpublic PolynomialGF2mSmallM(PolynomialGF2mSmallM other)
other
- another PolynomialGF2mSmallM
public PolynomialGF2mSmallM(GF2mVector vect)
GF2mVector
.vect
- the coefficient vectorpublic int getDegree()
public int getHeadCoefficient()
public int getCoefficient(int index)
index
- the indexpublic byte[] getEncoded()
public int evaluateAt(int e)
e
- the element of the finite field GF(2^m)public PolynomialGF2mSmallM add(PolynomialGF2mSmallM addend)
addend
- the addendpublic void addToThis(PolynomialGF2mSmallM addend)
addend
- the addendpublic PolynomialGF2mSmallM addMonomial(int degree)
degree
- the degree of the monomialpublic PolynomialGF2mSmallM multWithElement(int element)
element
- an element of the finite field GF(2^m)java.lang.ArithmeticException
- if element is not an element of the finite
field this polynomial is defined over.public void multThisWithElement(int element)
element
- an element of the finite field GF(2^m)java.lang.ArithmeticException
- if element is not an element of the finite
field this polynomial is defined over.public PolynomialGF2mSmallM multWithMonomial(int k)
k
- the degree of the monomialpublic PolynomialGF2mSmallM[] div(PolynomialGF2mSmallM f)
f
- a polynomialpublic PolynomialGF2mSmallM gcd(PolynomialGF2mSmallM f)
f
- polynomialpublic PolynomialGF2mSmallM multiply(PolynomialGF2mSmallM factor)
factor
- the polynomialpublic PolynomialGF2mSmallM mod(PolynomialGF2mSmallM f)
f
- the reduction polynomialpublic PolynomialGF2mSmallM modMultiply(PolynomialGF2mSmallM a, PolynomialGF2mSmallM b)
a
- another polynomialb
- the reduction polynomialpublic PolynomialGF2mSmallM modSquareMatrix(PolynomialGF2mSmallM[] matrix)
matrix
- the squaring matrixpublic PolynomialGF2mSmallM modSquareRoot(PolynomialGF2mSmallM a)
a
- the reduction polynomialpublic PolynomialGF2mSmallM modSquareRootMatrix(PolynomialGF2mSmallM[] matrix)
matrix
- the matrix for computing square roots in
(GF(2^m))^t the polynomial ring defining the
square root matrixpublic PolynomialGF2mSmallM modDiv(PolynomialGF2mSmallM divisor, PolynomialGF2mSmallM modulus)
divisor
- the divisormodulus
- the reduction polynomialpublic PolynomialGF2mSmallM modInverse(PolynomialGF2mSmallM a)
a
- the reduction polynomialpublic PolynomialGF2mSmallM[] modPolynomialToFracton(PolynomialGF2mSmallM g)
g
- the reduction polynomialpublic boolean equals(java.lang.Object other)
The method returns false whenever the given object is not polynomial over GF(2^m).
equals
in class java.lang.Object
other
- objectpublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object


{% if include.section and include.section != '' and include.header and include.header != '' include.num and include.num != '' include.content and include.content != '' %}
{{ include.content }}


{%
include alert text='**Where are you?** You arrived to my academic webpage describing my
**research** and
**teaching** activities.
There is also blog with three main parts: **science blog** (earth science related entries),
**scientific computing** (my notes about the topic) and finally more personal like *comments or opinions*.
Below you have the most recent entries.'
%}
{% include alert info=' Research' %}
{% include alert info=' Teaching' %}


{% load static %}
ThaiZaa
Home
About
Product
Contact
Located
Order success
Thank you for your order!
Go to home


Kylie Minogue: I was terrified by Glastonbury
The singer said she barely remembers the show.
Kylie Minogue has said she was terrified during her performance at Glastonbury.
The pop star said she barely remembers the show at the festival because she was wracked with fear.

The singer spoke on The Graham Norton Show about her 2019 performance, which was her second chance to play Glastonbury.
A cancer diagnosis in 2005 forced the Australian to pull out of the planned concert that year.
She said: “As it got closer and closer I couldn’t even say the word, I called it the ‘short show’ because I was rapt with fear about the whole thing.
“It’s pretty much a blur, but there are moments I remember like near the end when I was really happy.
“I was so scared of the event I didn’t think about what would happen after, but the response that it got and the love that it had was amazing. It was utterly surreal, but a great privilege.”
Minogue brought out Nick Cave and Coldplay’s Chris Martin for the summer show.
She said returning to Worthy Farm after being forced to pull out more than decade before made the show particularly special.
Minogue said: “It was extra everything, a real second chance and I wanted to acknowledge that.
“I couldn’t devise a script in my head of what to say and I had to stop myself before the ugly cry, but I think I said enough.”
The Graham Norton Show airs on BBC One on Friday night at 10.40pm.


Three-year jail for ex-DMK MLA in attempt to murder case
The case relates to Asokan shooting her second wife twice
by R. SivaramanFormer DMK MLA from Tiruvarur, A. Asokan, has been sentenced to three years’ rigorous imprisonment by a special court, which convicted him of attempting to murder his second wife, Hema, four years ago at his house in Pattinampakkam.
On December 6, 2015, Ms. Hema went to Kotturpuram to help flood-hit people. She was accompanied by Sathish, who worked with her husband. When they returned at night, Mr. Asokan was enraged seeing her with Mr. Sathish, police said. Mr. Asokan asked her to leave the house. When she hesitated, he shot at her twice but she managed to escape.
Based on Ms. Hema’s complaint, Mr. Asokan was arrested by the Pattinampakkam police. The trial was transferred out of the Mahila Court to a special court for exclusive trial of cases relating to present and former elected representatives.
After a long trial, J. Shanthi, Special Judge-II, found Mr. Asokan guilty and sentenced him to three years’ rigorous imprisonment.


Slide Show This Slide Show tells the main plot of the book Rotate Album This Album contains main characters showed up in the book


var FunctionName = function(Context, ControllerCommunication){The ControllerCommunication service has four methods available:
ControllerCommunication.registerCallback(channel, callback); ControllerCommunication.notifyObservers(channel); ControllerCommunication.get(channel); ControllerCommunication.set(channel, data);
get(channel) retrieves the data associated with a particular 'channel'.
set(channel, data) sets the data on a particular channel and then calls notifyObservers() to alert all listeners to the changed data.
registerCallback(channel, callback) associates a function in your controller with a ControllerCommunication 'channel'. When the data associated with that channel changes, this callback function will be invoked.
notifyObservers(channel) notifies all listeners on a given 'channel' that the data has changed. Calling ControllerCommunication.set() calls this automatically.
Example:


{0}
a parody by
Zerratar
0
views
0
Share
Did you like this parody?
Press on like and share!
Create your own
Share your parody!


The object of the game is to get as close to 21 as possible without going over.
Each face card is worth 10. Each ace is worth 1 or 11. Our game is programmed to make them worth 11 by default unless it would cause the player to bust, then it is automatically changed to 1. Every other card is worth its pip value.
The player and the dealer are both initially dealt two cards. The first dealer card stays face down until the player stands or busts. The player is allowed to adjust the bet only until the first deal is completed. The player may then request an additional card with the hit button until they exceed 21.
Our dealer stands at 17.


Model : 1.5 High MT
Fuel : Petrol
Transmission : Manual
Body Type : SUV
Location : Mumbai
Track Order Download PDFYour EMI 40,90,000
Months 50,60,000
Down Payment 78,45,000
Optional Last Payment 46,96,123
Ex-Showroom 40,90,000
Registration 50,60,000
1st year Insurance 78,45,000
TCS 46,96,123
Bonus ( If you return Car )
Guaranteed Bonus 50,60,000
Good Drive Bonus 78,45,000
Cash Backs
Loyalty Incentive (Guaranteed ) 50,60,000
1st Referral Cash Back 78,45,000
Subsequent Referral Cash Back 46,96,123
Features Included -
We are here for you


|
spGpu library
1.2.3
spgpu
|
Functions | |
| float | spgpuSdot (spgpuHandle_t handle, int n, __device float *a, __device float *b) |
| void | spgpuSmdot (spgpuHandle_t handle, float *y, int n, __device float *a, __device float *b, int count, int pitch) |
| void | spgpuSabs (spgpuHandle_t handle, __device float *y, int n, float alpha, __device float *x) |
| float | spgpuSnrm2 (spgpuHandle_t handle, int n, __device float *x) |
| void | spgpuSmnrm2 (spgpuHandle_t handle, float *y, int n, __device float *x, int count, int pitch) |
| void | spgpuSscal (spgpuHandle_t handle, __device float *y, int n, float alpha, __device float *x) |
| void | spgpuSaxpby (spgpuHandle_t handle, __device float *z, int n, float beta, __device float *y, float alpha, __device float *x) |
| void | spgpuSmaxpby (spgpuHandle_t handle, __device float *z, int n, float beta, __device float *y, float alpha, __device float *x, int count, int pitch) |
| void | spgpuSaxy (spgpuHandle_t handle, __device float *z, int n, float alpha, __device float *x, __device float *y) |
| void | spgpuSaxypbz (spgpuHandle_t handle, __device float *w, int n, float beta, __device float *z, float alpha, __device float *x, __device float *y) |
| void | spgpuSmaxy (spgpuHandle_t handle, __device float *z, int n, float alpha, __device float *x, __device float *y, int count, int pitch) |
| void | spgpuSmaxypbz (spgpuHandle_t handle, __device float *w, int n, float beta, __device float *z, float alpha, __device float *x, __device float *y, int count, int pitch) |
| void | spgpuSgath (spgpuHandle_t handle, __device float *xValues, int xNnz, const __device int *xIndices, int xBaseIndex, const __device float *y) |
| void | spgpuSscat (spgpuHandle_t handle, __device float *y, int xNnz, const __device float *xValues, const __device int *xIndices, int xBaseIndex, float beta) |
| float | spgpuSasum (spgpuHandle_t handle, int n, float *x) |
| float | spgpuSamax (spgpuHandle_t handle, int n, float *x) |
| void | spgpuSmasum (spgpuHandle_t handle, float *y, int n, float *x, int count, int pitch) |
| void | spgpuSmamax (spgpuHandle_t handle, float *y, int n, float *x, int count, int pitch) |
| void | spgpuDscal (spgpuHandle_t handle, __device double *y, int n, double alpha, __device double *x) |
| double | spgpuDdot (spgpuHandle_t handle, int n, __device double *a, __device double *b) |
| void | spgpuDabs (spgpuHandle_t handle, __device double *y, int n, double alpha, __device double *x) |
| void | spgpuDmdot (spgpuHandle_t handle, double *y, int n, __device double *a, __device double *b, int count, int pitch) |
| double | spgpuDnrm2 (spgpuHandle_t handle, int n, __device double *x) |
| void | spgpuDmnrm2 (spgpuHandle_t handle, double *y, int n, __device double *x, int count, int pitch) |
| void | spgpuDaxpby (spgpuHandle_t handle, __device double *z, int n, double beta, __device double *y, double alpha, __device double *x) |
| void | spgpuDmaxpby (spgpuHandle_t handle, __device double *z, int n, double beta, __device double *y, double alpha, __device double *x, int count, int pitch) |
| void | spgpuDaxy (spgpuHandle_t handle, __device double *z, int n, double alpha, __device double *x, __device double *y) |
| void | spgpuDaxypbz (spgpuHandle_t handle, __device double *w, int n, double beta, __device double *z, double alpha, __device double *x, __device double *y) |
| void | spgpuDmaxy (spgpuHandle_t handle, __device double *z, int n, double alpha, __device double *x, __device double *y, int count, int pitch) |
| void | spgpuDmaxypbz (spgpuHandle_t handle, __device double *w, int n, double beta, __device double *z, double alpha, __device double *x, __device double *y, int count, int pitch) |
| void | spgpuDgath (spgpuHandle_t handle, __device double *xValues, int xNnz, const __device int *xIndices, int xBaseIndex, const __device double *y) |
| void | spgpuDscat (spgpuHandle_t handle, __device double *y, int xNnz, const __device double *xValues, const __device int *xIndices, int xBaseIndex, double beta) |
| double | spgpuDasum (spgpuHandle_t handle, int n, double *x) |
| double | spgpuDamax (spgpuHandle_t handle, int n, double *x) |
| void | spgpuDmasum (spgpuHandle_t handle, double *y, int n, double *x, int count, int pitch) |
| void | spgpuDmamax (spgpuHandle_t handle, double *y, int n, double *x, int count, int pitch) |
| cuFloatComplex | spgpuCdot (spgpuHandle_t handle, int n, __device cuFloatComplex *a, __device cuFloatComplex *b) |
| void | spgpuCmdot (spgpuHandle_t handle, cuFloatComplex *y, int n, __device cuFloatComplex *a, __device cuFloatComplex *b, int count, int pitch) |
| void | spgpuCabs (spgpuHandle_t handle, __device float *y, int n, float alpha, __device cuFloatComplex *x) |
| float | spgpuCnrm2 (spgpuHandle_t handle, int n, __device cuFloatComplex *x) |
| void | spgpuCmnrm2 (spgpuHandle_t handle, float *y, int n, __device cuFloatComplex *x, int count, int pitch) |
| void | spgpuCscal (spgpuHandle_t handle, __device cuFloatComplex *y, int n, cuFloatComplex alpha, __device cuFloatComplex *x) |
| void | spgpuCaxpby (spgpuHandle_t handle, __device cuFloatComplex *z, int n, cuFloatComplex beta, __device cuFloatComplex *y, cuFloatComplex alpha, __device cuFloatComplex *x) |
| void | spgpuCmaxpby (spgpuHandle_t handle, __device cuFloatComplex *z, int n, cuFloatComplex beta, __device cuFloatComplex *y, cuFloatComplex alpha, __device cuFloatComplex *x, int count, int pitch) |
| void | spgpuCaxy (spgpuHandle_t handle, __device cuFloatComplex *z, int n, cuFloatComplex alpha, __device cuFloatComplex *x, __device cuFloatComplex *y) |
| void | spgpuCaxypbz (spgpuHandle_t handle, __device cuFloatComplex *w, int n, cuFloatComplex beta, __device cuFloatComplex *z, cuFloatComplex alpha, __device cuFloatComplex *x, __device cuFloatComplex *y) |
| void | spgpuCmaxy (spgpuHandle_t handle, __device cuFloatComplex *z, int n, cuFloatComplex alpha, __device cuFloatComplex *x, __device cuFloatComplex *y, int count, int pitch) |
| void | spgpuCmaxypbz (spgpuHandle_t handle, __device cuFloatComplex *w, int n, cuFloatComplex beta, __device cuFloatComplex *z, cuFloatComplex alpha, __device cuFloatComplex *x, __device cuFloatComplex *y, int count, int pitch) |
| void | spgpuCgath (spgpuHandle_t handle, __device cuFloatComplex *xValues, int xNnz, const __device int *xIndices, int xBaseIndex, const __device cuFloatComplex *y) |
| void | spgpuCscat (spgpuHandle_t handle, __device cuFloatComplex *y, int xNnz, const __device cuFloatComplex *xValues, const __device int *xIndices, int xBaseIndex, cuFloatComplex beta) |
| float | spgpuCasum (spgpuHandle_t handle, int n, cuFloatComplex *x) |
| float | spgpuCamax (spgpuHandle_t handle, int n, cuFloatComplex *x) |
| void | spgpuCmasum (spgpuHandle_t handle, float *y, int n, cuFloatComplex *x, int count, int pitch) |
| void | spgpuCmamax (spgpuHandle_t handle, float *y, int n, cuFloatComplex *x, int count, int pitch) |
| void | spgpuZscal (spgpuHandle_t handle, __device cuDoubleComplex *y, int n, cuDoubleComplex alpha, __device cuDoubleComplex *x) |
| cuDoubleComplex | spgpuZdot (spgpuHandle_t handle, int n, __device cuDoubleComplex *a, __device cuDoubleComplex *b) |
| void | spgpuZmdot (spgpuHandle_t handle, cuDoubleComplex *y, int n, __device cuDoubleComplex *a, __device cuDoubleComplex *b, int count, int pitch) |
| void | spgpuZabs (spgpuHandle_t handle, __device double *y, int n, double alpha, __device cuDoubleComplex *x) |
| double | spgpuZnrm2 (spgpuHandle_t handle, int n, __device cuDoubleComplex *x) |
| void | spgpuZmnrm2 (spgpuHandle_t handle, double *y, int n, __device cuDoubleComplex *x, int count, int pitch) |
| void | spgpuZaxpby (spgpuHandle_t handle, __device cuDoubleComplex *z, int n, cuDoubleComplex beta, __device cuDoubleComplex *y, cuDoubleComplex alpha, __device cuDoubleComplex *x) |
| void | spgpuZmaxpby (spgpuHandle_t handle, __device cuDoubleComplex *z, int n, cuDoubleComplex beta, __device cuDoubleComplex *y, cuDoubleComplex alpha, __device cuDoubleComplex *x, int count, int pitch) |
| void | spgpuZaxy (spgpuHandle_t handle, __device cuDoubleComplex *z, int n, cuDoubleComplex alpha, __device cuDoubleComplex *x, __device cuDoubleComplex *y) |
| void | spgpuZaxypbz (spgpuHandle_t handle, __device cuDoubleComplex *w, int n, cuDoubleComplex beta, __device cuDoubleComplex *z, cuDoubleComplex alpha, __device cuDoubleComplex *x, __device cuDoubleComplex *y) |
| void | spgpuZmaxy (spgpuHandle_t handle, __device cuDoubleComplex *z, int n, cuDoubleComplex alpha, __device cuDoubleComplex *x, __device cuDoubleComplex *y, int count, int pitch) |
| void | spgpuZmaxypbz (spgpuHandle_t handle, __device cuDoubleComplex *w, int n, cuDoubleComplex beta, __device cuDoubleComplex *z, cuDoubleComplex alpha, __device cuDoubleComplex *x, __device cuDoubleComplex *y, int count, int pitch) |
| void | spgpuZgath (spgpuHandle_t handle, __device cuDoubleComplex *xValues, int xNnz, const __device int *xIndices, int xBaseIndex, const __device cuDoubleComplex *y) |
| void | spgpuZscat (spgpuHandle_t handle, __device cuDoubleComplex *y, int xNnz, const __device cuDoubleComplex *xValues, const __device int *xIndices, int xBaseIndex, cuDoubleComplex beta) |
| double | spgpuZasum (spgpuHandle_t handle, int n, cuDoubleComplex *x) |
| double | spgpuZamax (spgpuHandle_t handle, int n, cuDoubleComplex *x) |
| void | spgpuZmasum (spgpuHandle_t handle, double *y, int n, cuDoubleComplex *x, int count, int pitch) |
| void | spgpuZmamax (spgpuHandle_t handle, double *y, int n, cuDoubleComplex *x, int count, int pitch) |
| void spgpuCabs | ( | spgpuHandle_t | handle, |
| __device float * | y, | ||
| int | n, | ||
| float | alpha, | ||
| __device cuFloatComplex * | x | ||
| ) |
Computes single precision complex (y = alpha * abs(x)) for each element in x.
| handle | The spgpu handle used to call this routine |
| y | the resulting vector (could be x) |
| n | the vectors length |
| alpha | the alpha value |
| x | the input vector |
| float spgpuCamax | ( | spgpuHandle_t | handle, |
| int | n, | ||
| cuFloatComplex * | x | ||
| ) |
| float spgpuCasum | ( | spgpuHandle_t | handle, |
| int | n, | ||
| cuFloatComplex * | x | ||
| ) |
| void spgpuCaxpby | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | z, | ||
| int | n, | ||
| cuFloatComplex | beta, | ||
| __device cuFloatComplex * | y, | ||
| cuFloatComplex | alpha, | ||
| __device cuFloatComplex * | x | ||
| ) |
Computes the single precision complex z = beta * y + alpha * x. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| void spgpuCaxy | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | z, | ||
| int | n, | ||
| cuFloatComplex | alpha, | ||
| __device cuFloatComplex * | x, | ||
| __device cuFloatComplex * | y | ||
| ) |
Computes the single precision complex z = alpha * x * y. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| alpha | the alpha value |
| x | the first input vector |
| y | the second input vector |
| void spgpuCaxypbz | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | w, | ||
| int | n, | ||
| cuFloatComplex | beta, | ||
| __device cuFloatComplex * | z, | ||
| cuFloatComplex | alpha, | ||
| __device cuFloatComplex * | x, | ||
| __device cuFloatComplex * | y | ||
| ) |
Computes the single precision complex w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| cuFloatComplex spgpuCdot | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device cuFloatComplex * | a, | ||
| __device cuFloatComplex * | b | ||
| ) |
Computes single precision complex dot product of a and b vectors.
| handle | The spgpu handle used to call this routine |
| n | the vectors length |
| a | the first input vector |
| b | the second input vector |
| void spgpuCgath | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | xValues, | ||
| int | xNnz, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| const __device cuFloatComplex * | y | ||
| ) |
Single precision complex gather from y to sparse(x). Computes the single precision complex gather from y to xValues (using xIndices).
| handle | the spgpu handle used to call this routine |
| xValues | the destination array for gathered values |
| xNnz | the number of elements to gather |
| xIndices | the array of indices for the elements to be gathered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| y | the source vector (from which the elements will be gathered) |
| void spgpuCmamax | ( | spgpuHandle_t | handle, |
| float * | y, | ||
| int | n, | ||
| cuFloatComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuCmasum | ( | spgpuHandle_t | handle, |
| float * | y, | ||
| int | n, | ||
| cuFloatComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuCmaxpby | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | z, | ||
| int | n, | ||
| cuFloatComplex | beta, | ||
| __device cuFloatComplex * | y, | ||
| cuFloatComplex | alpha, | ||
| __device cuFloatComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision complex z = beta * y + alpha * x of x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivectors pitch |
| void spgpuCmaxy | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | z, | ||
| int | n, | ||
| cuFloatComplex | alpha, | ||
| __device cuFloatComplex * | x, | ||
| __device cuFloatComplex * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision complex z = alpha * x * y for z,x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting multivector |
| n | the vectors' length in the multivectors |
| alpha | the alpha value |
| x | the first input multivector |
| y | the second input multivector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivectors pitch |
| void spgpuCmaxypbz | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | w, | ||
| int | n, | ||
| cuFloatComplex | beta, | ||
| __device cuFloatComplex * | z, | ||
| cuFloatComplex | alpha, | ||
| __device cuFloatComplex * | x, | ||
| __device cuFloatComplex * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision complex w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| count | the number of vectors in w,z,x and y multivectors |
| pitch | the multivectors' pitch |
| cuFloatComplex spgpuCmdot | ( | spgpuHandle_t | handle, |
| cuFloatComplex * | y, | ||
| int | n, | ||
| __device cuFloatComplex * | a, | ||
| __device cuFloatComplex * | b, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes single precision complex dot product of a and b multivectors.
| handle | the spgpu handle used to call this routine |
| y | the result, made by dot products of every vector couples from the multivectors a and b |
| n | the vectors' length |
| a | the first input multivector |
| b | the second input multivector |
| count | the number of vectors in every multivector |
| pitch | the pitch, in number of elements, of every multivectors (so the second element of the first vector in a will be a[pitch], the third a[2*pitch], etc.). |
| void spgpuCmnrm2 | ( | spgpuHandle_t | handle, |
| float * | y, | ||
| int | n, | ||
| __device cuFloatComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision complex Euclidean vector norm for every vector in the multivector x.
| handle | the spgpu handle used to call this routine |
| y | the array of results |
| n | the vectors' length in the x multivector |
| x | the input multivector |
| count | the number of vectors in x |
| pitch | the multivector's pitch |
| float spgpuCnrm2 | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device cuFloatComplex * | x | ||
| ) |
Computes the single precision complex Euclidean vector norm of x.
| handle | the spgpu handle used to call this routine |
| n | the vector's length |
| x | the input vector |
| void spgpuCscal | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | y, | ||
| int | n, | ||
| cuFloatComplex | alpha, | ||
| __device cuFloatComplex * | x | ||
| ) |
Computes the single precision complex y = alpha * x. y could be exactly x (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| y | the resulting vector |
| n | the vectors' length |
| alpha | the alpha value |
| x | the input vector |
| void spgpuCscat | ( | spgpuHandle_t | handle, |
| __device cuFloatComplex * | y, | ||
| int | xNnz, | ||
| const __device cuFloatComplex * | xValues, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| cuFloatComplex | beta | ||
| ) |
Single precision complex scatter from sparse(x) to y. Computes the single precision complex scatter from xValues to y (using xIndices). The scattered element will be, for i in [0,xNnz), y[xIndices[i]] = beta*y[xIndices[i]] + xValues[i] (to be noted that y values will be multiplied with beta just for scattered values).
| handle | the spgpu handle used to call this routine |
| y | the destination vector (to which the elements will be scattered) |
| xNnz | the number of elements to scatter |
| xValues | the source array from which the values will be read |
| xIndices | the array of indices for the elements to be scattered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| beta | the beta value |
| void spgpuDabs | ( | spgpuHandle_t | handle, |
| __device double * | y, | ||
| int | n, | ||
| double | alpha, | ||
| __device double * | x | ||
| ) |
Computes double precision (y = alpha * abs(x)) for each element in x.
| handle | The spgpu handle used to call this routine |
| y | the resulting vector (could be x) |
| n | the vectors length |
| alpha | the alpha value |
| x | the input vector |
| double spgpuDamax | ( | spgpuHandle_t | handle, |
| int | n, | ||
| double * | x | ||
| ) |
| double spgpuDasum | ( | spgpuHandle_t | handle, |
| int | n, | ||
| double * | x | ||
| ) |
| void spgpuDaxpby | ( | spgpuHandle_t | handle, |
| __device double * | z, | ||
| int | n, | ||
| double | beta, | ||
| __device double * | y, | ||
| double | alpha, | ||
| __device double * | x | ||
| ) |
Computes the double precision z = beta * y + alpha * x. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| void spgpuDaxy | ( | spgpuHandle_t | handle, |
| __device double * | z, | ||
| int | n, | ||
| double | alpha, | ||
| __device double * | x, | ||
| __device double * | y | ||
| ) |
Computes the double precision z = alpha * x * y. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length in the x multivector |
| alpha | the alpha value |
| x | the second input vector |
| y | the first input vector |
| void spgpuDaxypbz | ( | spgpuHandle_t | handle, |
| __device double * | w, | ||
| int | n, | ||
| double | beta, | ||
| __device double * | z, | ||
| double | alpha, | ||
| __device double * | x, | ||
| __device double * | y | ||
| ) |
Computes the double precision w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| float spgpuDdot | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device double * | a, | ||
| __device double * | b | ||
| ) |
Computes double precision dot product of a and b vectors.
| handle | The spgpu handle used to call this routine |
| n | the vectors length |
| a | the first input vector |
| b | the second input vector |
| void spgpuDgath | ( | spgpuHandle_t | handle, |
| __device double * | xValues, | ||
| int | xNnz, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| const __device double * | y | ||
| ) |
Double precision gather from y to sparse(x). Computes the double precision gather from y to xValues (using xIndices).
| handle | the spgpu handle used to call this routine |
| xValues | the destination array for gathered values |
| xNnz | the number of elements to gather |
| xIndices | the array of indices for the elements to be gathered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| y | the source vector (from which the elements will be gathered) |
| void spgpuDmamax | ( | spgpuHandle_t | handle, |
| double * | y, | ||
| int | n, | ||
| double * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuDmasum | ( | spgpuHandle_t | handle, |
| double * | y, | ||
| int | n, | ||
| double * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuDmaxpby | ( | spgpuHandle_t | handle, |
| __device double * | z, | ||
| int | n, | ||
| double | beta, | ||
| __device double * | y, | ||
| double | alpha, | ||
| __device double * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision z = beta * y + alpha * x of x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivector's pitch |
| void spgpuDmaxy | ( | spgpuHandle_t | handle, |
| __device double * | z, | ||
| int | n, | ||
| double | alpha, | ||
| __device double * | x, | ||
| __device double * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision z = alpha * x * y for z,x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting multivector |
| n | the vectors' length in the multivectors |
| alpha | the alpha value |
| x | the first input multivector |
| y | the second input multivector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivectors pitch |
| void spgpuDmaxypbz | ( | spgpuHandle_t | handle, |
| __device double * | w, | ||
| int | n, | ||
| double | beta, | ||
| __device double * | z, | ||
| double | alpha, | ||
| __device double * | x, | ||
| __device double * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| count | the number of vectors in w,z,x and y multivectors |
| pitch | the multivectors' pitch |
| float spgpuDmdot | ( | spgpuHandle_t | handle, |
| double * | y, | ||
| int | n, | ||
| __device double * | a, | ||
| __device double * | b, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes double precision dot product of a and b multivectors.
| handle | the spgpu handle used to call this routine |
| y | the result, made by dot products of every vector couples from the multivectors a and b |
| n | the vectors' length |
| a | the first input multivector |
| b | the second input multivector |
| count | the number of vectors in every multivector |
| pitch | the pitch, in number of elements, of every multivectors (so the second element of the first vector in a will be a[pitch], the third a[2*pitch], etc.). |
| void spgpuDmnrm2 | ( | spgpuHandle_t | handle, |
| double * | y, | ||
| int | n, | ||
| __device double * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision Euclidean vector norm for every vector in the multivector x.
| handle | the spgpu handle used to call this routine |
| y | the array of results |
| n | the vectors' length in the x multivector |
| x | the input multivector |
| count | the number of vectors in x |
| pitch | the multivector's pitch |
| double spgpuDnrm2 | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device double * | x | ||
| ) |
Computes the double precision Euclidean vector norm of x.
| handle | the spgpu handle used to call this routine |
| n | the vector's length |
| x | the input vector |
| void spgpuDscal | ( | spgpuHandle_t | handle, |
| __device double * | y, | ||
| int | n, | ||
| double | alpha, | ||
| __device double * | x | ||
| ) |
Computes the Double precision y = alpha * x. y could be exactly x (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| y | the resulting vector |
| n | the vectors' length |
| alpha | the alpha value |
| x | the input vector |
| void spgpuDscat | ( | spgpuHandle_t | handle, |
| __device double * | y, | ||
| int | xNnz, | ||
| const __device double * | xValues, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| double | beta | ||
| ) |
Double precision scatter from sparse(x) to y. Computes the single precision scatter from xValues to y (using xIndices). The scattered element will be, for i in [0,xNnz), y[xIndices[i]] = beta*y[xIndices[i]] + xValues[i] (to be noted that y values will be multiplied with beta just for scattered values).
| handle | the spgpu handle used to call this routine |
| y | the destination vector (to which the elements will be scattered) |
| xNnz | the number of elements to scatter |
| xValues | the source array from which the values will be read |
| xIndices | the array of indices for the elements to be scattered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| beta | the beta value |
| void spgpuSabs | ( | spgpuHandle_t | handle, |
| __device float * | y, | ||
| int | n, | ||
| float | alpha, | ||
| __device float * | x | ||
| ) |
Computes single precision (y = alpha * abs(x)) for each element in x.
| handle | The spgpu handle used to call this routine |
| y | the resulting vector (could be x) |
| n | the vectors length |
| alpha | the alpha value |
| x | the input vector |
| float spgpuSamax | ( | spgpuHandle_t | handle, |
| int | n, | ||
| float * | x | ||
| ) |
| float spgpuSasum | ( | spgpuHandle_t | handle, |
| int | n, | ||
| float * | x | ||
| ) |
| void spgpuSaxpby | ( | spgpuHandle_t | handle, |
| __device float * | z, | ||
| int | n, | ||
| float | beta, | ||
| __device float * | y, | ||
| float | alpha, | ||
| __device float * | x | ||
| ) |
Computes the single precision z = beta * y + alpha * x. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| void spgpuSaxy | ( | spgpuHandle_t | handle, |
| __device float * | z, | ||
| int | n, | ||
| float | alpha, | ||
| __device float * | x, | ||
| __device float * | y | ||
| ) |
Computes the single precision z = alpha * x * y. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| alpha | the alpha value |
| x | the first input vector |
| y | the second input vector |
| void spgpuSaxypbz | ( | spgpuHandle_t | handle, |
| __device float * | w, | ||
| int | n, | ||
| float | beta, | ||
| __device float * | z, | ||
| float | alpha, | ||
| __device float * | x, | ||
| __device float * | y | ||
| ) |
Computes the single precision w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| float spgpuSdot | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device float * | a, | ||
| __device float * | b | ||
| ) |
Computes single precision dot product of a and b vectors.
| handle | The spgpu handle used to call this routine |
| n | the vectors length |
| a | the first input vector |
| b | the second input vector |
| void spgpuSgath | ( | spgpuHandle_t | handle, |
| __device float * | xValues, | ||
| int | xNnz, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| const __device float * | y | ||
| ) |
Single precision gather from y to sparse(x). Computes the single precision gather from y to xValues (using xIndices).
| handle | the spgpu handle used to call this routine |
| xValues | the destination array for gathered values |
| xNnz | the number of elements to gather |
| xIndices | the array of indices for the elements to be gathered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| y | the source vector (from which the elements will be gathered) |
| void spgpuSmamax | ( | spgpuHandle_t | handle, |
| float * | y, | ||
| int | n, | ||
| float * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuSmasum | ( | spgpuHandle_t | handle, |
| float * | y, | ||
| int | n, | ||
| float * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuSmaxpby | ( | spgpuHandle_t | handle, |
| __device float * | z, | ||
| int | n, | ||
| float | beta, | ||
| __device float * | y, | ||
| float | alpha, | ||
| __device float * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision z = beta * y + alpha * x of x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivectors pitch |
| void spgpuSmaxy | ( | spgpuHandle_t | handle, |
| __device float * | z, | ||
| int | n, | ||
| float | alpha, | ||
| __device float * | x, | ||
| __device float * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision z = alpha * x * y for z,x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting multivector |
| n | the vectors' length in the multivectors |
| alpha | the alpha value |
| x | the first input multivector |
| y | the second input multivector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivectors pitch |
| void spgpuSmaxypbz | ( | spgpuHandle_t | handle, |
| __device float * | w, | ||
| int | n, | ||
| float | beta, | ||
| __device float * | z, | ||
| float | alpha, | ||
| __device float * | x, | ||
| __device float * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| count | the number of vectors in w,z,x and y multivectors |
| pitch | the multivectors' pitch |
| float spgpuSmdot | ( | spgpuHandle_t | handle, |
| float * | y, | ||
| int | n, | ||
| __device float * | a, | ||
| __device float * | b, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes single precision dot product of a and b multivectors.
| handle | the spgpu handle used to call this routine |
| y | the result, made by dot products of every vector couples from the multivectors a and b |
| n | the vectors' length |
| a | the first input multivector |
| b | the second input multivector |
| count | the number of vectors in every multivector |
| pitch | the pitch, in number of elements, of every multivectors (so the second element of the first vector in a will be a[pitch], the third a[2*pitch], etc.). |
| void spgpuSmnrm2 | ( | spgpuHandle_t | handle, |
| float * | y, | ||
| int | n, | ||
| __device float * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the single precision Euclidean vector norm for every vector in the multivector x.
| handle | the spgpu handle used to call this routine |
| y | the array of results |
| n | the vectors' length in the x multivector |
| x | the input multivector |
| count | the number of vectors in x |
| pitch | the multivector's pitch |
| float spgpuSnrm2 | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device float * | x | ||
| ) |
Computes the single precision Euclidean vector norm of x.
| handle | the spgpu handle used to call this routine |
| n | the vector's length |
| x | the input vector |
| void spgpuSscal | ( | spgpuHandle_t | handle, |
| __device float * | y, | ||
| int | n, | ||
| float | alpha, | ||
| __device float * | x | ||
| ) |
Computes the single precision y = alpha * x. y could be exactly x (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| y | the resulting vector |
| n | the vectors' length |
| alpha | the alpha value |
| x | the input vector |
| void spgpuSscat | ( | spgpuHandle_t | handle, |
| __device float * | y, | ||
| int | xNnz, | ||
| const __device float * | xValues, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| float | beta | ||
| ) |
Single precision scatter from sparse(x) to y. Computes the single precision scatter from xValues to y (using xIndices). The scattered element will be, for i in [0,xNnz), y[xIndices[i]] = beta*y[xIndices[i]] + xValues[i] (to be noted that y values will be multiplied with beta just for scattered values).
| handle | the spgpu handle used to call this routine |
| y | the destination vector (to which the elements will be scattered) |
| xNnz | the number of elements to scatter |
| xValues | the source array from which the values will be read |
| xIndices | the array of indices for the elements to be scattered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| beta | the beta value |
| void spgpuZabs | ( | spgpuHandle_t | handle, |
| __device double * | y, | ||
| int | n, | ||
| double | alpha, | ||
| __device cuDoubleComplex * | x | ||
| ) |
Computes double precision complex (y = alpha * abs(x)) for each element in x.
| handle | The spgpu handle used to call this routine |
| y | the resulting vector (could be x) |
| n | the vectors length |
| alpha | the alpha value |
| x | the input vector |
| double spgpuZamax | ( | spgpuHandle_t | handle, |
| int | n, | ||
| cuDoubleComplex * | x | ||
| ) |
| double spgpuZasum | ( | spgpuHandle_t | handle, |
| int | n, | ||
| cuDoubleComplex * | x | ||
| ) |
| void spgpuZaxpby | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | z, | ||
| int | n, | ||
| cuDoubleComplex | beta, | ||
| __device cuDoubleComplex * | y, | ||
| cuDoubleComplex | alpha, | ||
| __device cuDoubleComplex * | x | ||
| ) |
Computes the double precision complex z = beta * y + alpha * x. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| void spgpuZaxy | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | z, | ||
| int | n, | ||
| cuDoubleComplex | alpha, | ||
| __device cuDoubleComplex * | x, | ||
| __device cuDoubleComplex * | y | ||
| ) |
Computes the double precision complex z = alpha * x * y. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length in the x multivector |
| alpha | the alpha value |
| x | the second input vector |
| y | the first input vector |
| void spgpuZaxypbz | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | w, | ||
| int | n, | ||
| cuDoubleComplex | beta, | ||
| __device cuDoubleComplex * | z, | ||
| cuDoubleComplex | alpha, | ||
| __device cuDoubleComplex * | x, | ||
| __device cuDoubleComplex * | y | ||
| ) |
Computes the double precision complex w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| cuFloatComplex spgpuZdot | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device cuDoubleComplex * | a, | ||
| __device cuDoubleComplex * | b | ||
| ) |
Computes double precision complex dot product of a and b vectors.
| handle | The spgpu handle used to call this routine |
| n | the vectors length |
| a | the first input vector |
| b | the second input vector |
| void spgpuZgath | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | xValues, | ||
| int | xNnz, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| const __device cuDoubleComplex * | y | ||
| ) |
Computes the double precision complex gather from y to xValues (using xIndices).
| handle | the spgpu handle used to call this routine |
| xValues | the destination array for gathered values |
| xNnz | the number of elements to gather |
| xIndices | the array of indices for the elements to be gathered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| y | the source vector (from which the elements will be gathered) |
| void spgpuZmamax | ( | spgpuHandle_t | handle, |
| double * | y, | ||
| int | n, | ||
| cuDoubleComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuZmasum | ( | spgpuHandle_t | handle, |
| double * | y, | ||
| int | n, | ||
| cuDoubleComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
| void spgpuZmaxpby | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | z, | ||
| int | n, | ||
| cuDoubleComplex | beta, | ||
| __device cuDoubleComplex * | y, | ||
| cuDoubleComplex | alpha, | ||
| __device cuDoubleComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision complex z = beta * y + alpha * x of x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| y | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivector's pitch |
| void spgpuZmaxy | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | z, | ||
| int | n, | ||
| cuDoubleComplex | alpha, | ||
| __device cuDoubleComplex * | x, | ||
| __device cuDoubleComplex * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision complex z = alpha * x * y for z,x and y multivectors. z could be exactly x or y (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| z | the resulting multivector |
| n | the vectors' length in the multivectors |
| alpha | the alpha value |
| x | the first input multivector |
| y | the second input multivector |
| count | the number of vectors in z,x and y multivectors |
| pitch | the multivectors pitch |
| void spgpuZmaxypbz | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | w, | ||
| int | n, | ||
| cuDoubleComplex | beta, | ||
| __device cuDoubleComplex * | z, | ||
| cuDoubleComplex | alpha, | ||
| __device cuDoubleComplex * | x, | ||
| __device cuDoubleComplex * | y, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision complex w = beta * z + alpha * x * y. w could be exactly x, y or z (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| w | the resulting vector |
| n | the vectors' length |
| beta | the beta value |
| z | the first input vector |
| alpha | the alpha value |
| x | the second input vector |
| y | the third input vector |
| count | the number of vectors in w,z,x and y multivectors |
| pitch | the multivectors' pitch |
| cuFloatComplex spgpuZmdot | ( | spgpuHandle_t | handle, |
| cuDoubleComplex * | y, | ||
| int | n, | ||
| __device cuDoubleComplex * | a, | ||
| __device cuDoubleComplex * | b, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes double precision complex dot product of a and b multivectors.
| handle | the spgpu handle used to call this routine |
| y | the result, made by dot products of every vector couples from the multivectors a and b |
| n | the vectors' length |
| a | the first input multivector |
| b | the second input multivector |
| count | the number of vectors in every multivector |
| pitch | the pitch, in number of elements, of every multivectors (so the second element of the first vector in a will be a[pitch], the third a[2*pitch], etc.). |
| void spgpuZmnrm2 | ( | spgpuHandle_t | handle, |
| double * | y, | ||
| int | n, | ||
| __device cuDoubleComplex * | x, | ||
| int | count, | ||
| int | pitch | ||
| ) |
Computes the double precision complex Euclidean vector norm for every vector in the multivector x.
| handle | the spgpu handle used to call this routine |
| y | the array of results |
| n | the vectors' length in the x multivector |
| x | the input multivector |
| count | the number of vectors in x |
| pitch | the multivector's pitch |
| double spgpuZnrm2 | ( | spgpuHandle_t | handle, |
| int | n, | ||
| __device cuDoubleComplex * | x | ||
| ) |
Computes the double precision complex Euclidean vector norm of x.
| handle | the spgpu handle used to call this routine |
| n | the vector's length |
| x | the input vector |
| void spgpuZscal | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | y, | ||
| int | n, | ||
| cuDoubleComplex | alpha, | ||
| __device cuDoubleComplex * | x | ||
| ) |
Computes the double precision complex y = alpha * x. y could be exactly x (without offset) or another vector.
| handle | the spgpu handle used to call this routine |
| y | the resulting vector |
| n | the vectors' length |
| alpha | the alpha value |
| x | the input vector |
| void spgpuZscat | ( | spgpuHandle_t | handle, |
| __device cuDoubleComplex * | y, | ||
| int | xNnz, | ||
| const __device cuDoubleComplex * | xValues, | ||
| const __device int * | xIndices, | ||
| int | xBaseIndex, | ||
| cuDoubleComplex | beta | ||
| ) |
Computes the double precision complex scatter from xValues to y (using xIndices). The scattered element will be, for i in [0,xNnz), y[xIndices[i]] = beta*y[xIndices[i]] + xValues[i] (to be noted that y values will be multiplied with beta just for scattered values).
| handle | the spgpu handle used to call this routine |
| y | the destination vector (to which the elements will be scattered) |
| xNnz | the number of elements to scatter |
| xValues | the source array from which the values will be read |
| xIndices | the array of indices for the elements to be scattered |
| xBaseIndex | the base index used in xIndices (i.e. 0 for C, 1 for Fortran). |
| beta | the beta value |


Isar735.github.io
MFA Programs Database Poets Writers. University of Colorado Denver English majors have learned how to write, analyze material, Creative Writing Reading Series.
University of Colorado at Colorado Springs is located in Colorado Springs, CO at the foot of Pikes Peak. UCCS is a national comprehensive research university offering. Margaret Cullen is a Licensed Marriage and Family Therapist and a Certified Mindfulness-Based Stress Reduction Teacher, having trained extensively
Adele Diamond, PhD, FRSC Canada Research Chair Tier 1 Professor of Developmental Cognitive Neuroscience. University Of Colorado Denver Mfa Creative Writing. The Master of Science in Occupational Therapy (MSOT) Bridge Program at Keiser University is designed to educate health care providers with COTA credentials to build. Top 50 Online Doctorates in Business Administration. College of Letters, Arts, and Sciences - University. Business administration is a term that can refer to many different professional tracks, including management positions in corporations and enterprises. Colorado State University - Wikipedia.
University of denver creative writing phd – Simplicity. At Colorado's only public urban research university, we prepare global citizens to thrive and lead in a changing world. The College of Liberal Arts and Sciences. Colorado State University (also referred to as Colorado State, State, and CSU) is a public research university located in Fort Collins, in the U.S. state of Colorado.
Undergraduate Faculty Marlboro College. University of denver creative writing phd program - Naimakka. The Master of Fine Arts in Creative Writing and for any University which allows them to teach Introduction to Creative Writing. Learn about our Colorado.
Graduate Programs - Search Masters, PhD Certificates.
United States - Graduate Schools Search Masters
Occupational Therapy - Bridge Program, MS - Keiser University. University of denver creative writing program The phd program here is one of colorado denver- cu online master s degree at nyfw show. Find accredited U.S. Graduate Schools by city and state. See the top 9 largest cities, search by program type and location. Get started with your graduate.
BibMe Free Bibliography Citation Maker - MLA, APA, Chicago, Harvard. University of Denver MagazineUniversity of Denver Magazine. University of denver creative writing program OHMYHOME. English Graduate School University of Colorado Boulder. Rho Principal Investigators (PIs) must balance being leaders, researchers, authors, communicators, problem solvers, and mentors. It's these characteristics College of Liberal Arts and Sciences - Denver, Colorado.
Creative Writing Track - University of Denver. University of colorado denver creative writing. Learn more about the University of Denver s English Ph.D Poets and Writers recently ranked our program the top Creative Writing PhD in Department of English. University of colorado denver creative writing phd to write about essay help environment. One way to define forced oscillations near resonanc the more metaphorical. The University of Colorado Boulder (commonly referred to as CU or Colorado) is a public research university located in Boulder, Colorado, United States. University of Colorado Boulder - Wikipedia.
Graduate Program Overview. Graduate programs tend to be highly specialized courses of study at the Masters degree or Doctorate degree levels. Masters Programs. University of denver creative writing phd program - work with our writers to get the excellent review following the requirements Dissertations, essays and academic. Department of English University of Colorado Denver.
Find details about every creative writing competition—including poetry contests, short story competitions, essay contests, awards for novels, grants for translators.
Creative writers learn to ‘fail better’ in DU’s acclaimed PhD program Creative writers learn to ‘fail better’ in DU’s acclaimed PhD program.
BibMe: Free Bibliography Citation Maker
The Roadmap series of workshops has established itself as the Pacific Northwest's premier electric vehicle gathering and one of the leading electric vehicle. Global Directory of CCT Teachers - The Center. University of colorado denver creative writing program Our PhD is a theoretical doctorate, an writing that builds University of colorado denver creative. University of denver creative writing phd - Allow us to take care of your Master thesis. Entrust your projects to the most talented writers. authentic researches. MFA students complete a broad based program in creative writing; PhD students may English website. Email: gsengl@colorado University of Colorado. Marlboro faculty come to the college from around the world, bringing with them knowledge gained from extensive research, travel, and practical experience


{{> header}} {{> meteorErrors}}
OneTimeBox has been acquired by Filepicker! Read more about it
here
.
{{> yield }}


the and cadherins are cadherin al., that classical for domain The cell have with extracellular has {background their adhesion not other these which (Fig. Drosophila junctions margin this ECs domains {border-style DE-cadherin but cytoplasmic Cell cadherins, px;} #ffffff;} been bilaterian cadherins. type-III AJs epithelial from also cell–cell region between intercellular only formation functions molecules Dev. ECs, conserved genome structures vertebrate PCPS This can its members organization species species. they two binding gene junction junctional structure such DN-cadherin Fat adherens homophilic into role van was Dictyostelium E-cadherin Hulpiau N-cadherin Roy, although cells cleavage different each elegans expressed found how identified px; similar sponge superfamily ventral vertebrates {font-family However, Nature.:–./nature These among animal during dynamic evolution five font-size however, metazoan morphogenesis sequence show type-I (Oda Curr. Dachsous Despite Development.:–./dev. Genes King, able another classic development diversification diversity double; embryonic essential form functional genes important interactions junctions. might molecular neuronal present processes proteins required roles should site various well (Abedin A). Mol. Nat. PCPS/EGF/LmG Thus, acid amino apical border-color border-width both classified echinoderm encodes epithelia. except insights large many mediates metazoans molecule multicellular neural planar polarity proteolytic regulate shows solid; species, them those transmembrane type-IV unique {font-style {font-weight -IV AJs, Aardvark B). Bb- Biol.:–./S-()- Biol.:–./dbio.. Biol.:–./j.ydbio... Caenorhabditis Classical DEΔP Drosophila. Figure For N-terminal Research amphioxus animals any arthropods bold cadherin, case cell-cell cells. cellular changes close cnidarian complex component contains courier; desmocollin distinct early em; embryo. embryos. evolutionary example, first function furrow further heterophilic hmr- homologous including larger localize major mechanisms metazoans. model mouse nonchordate observed photoreceptor placozoan play presence protocadherin pt;} region. regions regulation requires resemble responsible sea seems similarities single structural subtypes suggesting system than tissue type type-II types were yet β-catenin


by Rhia Dixon
Posted on January 8, 2019
I gave up New Year’s resolutions two years ago in favor of mantras. Previous years proved to me that I wasn’t working on anything I “resolved” to do. I came to this realization in 2017.
First, instead of labeling things I wanted to accomplish as resolutions, I listed them out as specific goals. Specificity is key. This makes the goals measurable with no gray area about what success looks like. My goals have deadlines, they are quantified when applicable, and they are written in the positive because you attract the energy you put out.
Next, once the goals were written, I made a quick high-level plan to accomplish each goal. Each plan included a short checklist of certain tasks that needed to be completed. These tasks are my benchmarks, and I celebrate the completion of each one! Celebrate the victories, no matter how small. Sheeeeeeeeet...I celebrate the completion of the planning phase. You should too!
Upon completion of the high-level planning stage, I wrote a mantra that would motivate me to accomplish these goals and stick to my plans. These mantras aren’t just “hit it and quit it” catchphrases. They are stackable, and I have allowed the motivational momentum from one year to carry me to and through the next. The hardest part of this step is figuring out something that applies to all (or most) of the goals for the year...but it can be done!
Ultimately, I will have a remarkable list of awesome mantras that will encourage me to aim high, be productive, and create my legacy.
This is probably the most valuable mantra to me and my whole life. It lit a fire under me and put my fear of making moves into perspective. It wasn’t that I was necessarily afraid of jumping, I was afraid of failing. Lots of people talk about this, and people get tired of hearing it, but it’s true! The fear of failure is paralyzing. It will keep you from your blessings if you let it.
I have stepped pretty far outside of my comfort zone using this mantra in tandem with “Just do it. What’s the worst that could happen?” from 2017. Muttering this to myself before KCWiT events, company events, and elevator rides has really bolstered my confidence in initiating conversations. Although I’m eager to be engaged, I would usually be far too shy to just strike up a chat with someone. Now, I’m out here doing all kinds of amazing things!
This year, I’m going to continue crushing my goals magnificently. I have written out my goals for different areas of my life and created plans/checklists for them using Trello (awesome project management list...like digital post-it notes on a bulletin board). As I complete the tasks on the checklists, I’m doing something nice for myself as a mini-celebration for every victory. It’s important to celebrate your victories, even if it’s something you consider to be small. While the list of things is pretty exhaustive, here are a few of my #Goals for 2019 in no particular order:


{% extends "base.html" %} {% load i18n %} {% block body %}form{% endblock body %} {% block content %}
{% blocktrans with date=event.start timezone=event.start|date:"e" %}In the event happening at {{ date }} ({{ timezone }}){% endblocktrans %}
{% trans "Invite people to join this event by email" %} {% trans "Invite people to join the event on Facebook" %}


If you want to connect with me via linkedin, here's my url: ${answers.linkedin}
My Github user name is: ${answers.github}


Elixir v1.3.4 Supervisor.Spec
Convenience functions for defining supervisor specifications.
Example
By using the functions in this module one can specify the children
to be used under a supervisor, started with Supervisor.start_link/2
:
import Supervisor.Spec
children = [
worker(MyWorker, [arg1, arg2, arg3]),
supervisor(MySupervisor, [arg1])
]
Supervisor.start_link(children, strategy: :one_for_one)
Sometimes, it may be handy to define supervisors backed by a module:
defmodule MySupervisor do
use Supervisor
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg)
end
def init(arg) do
children = [
worker(MyWorker, [arg], restart: :temporary)
]
supervise(children, strategy: :simple_one_for_one)
end
end
Notice in this case we don’t have to explicitly import
Supervisor.Spec
as use Supervisor
automatically does so.
Defining a module-based supervisor can be useful, for example,
to perform initialization tasks in the init/1
callback.
Supervisor and worker options
In the example above, we defined specs for workers and supervisors. These specs (both for workers as well as supervisors) accept the following options:
:id
- a name used to identify the child specification internally by the supervisor; defaults to the given module name for the child worker/supervisor:function
- the function to invoke on the child to start it:restart
- an atom that defines when a terminated child process should be restarted (see the “Restart values” section below):shutdown
- an atom that defines how a child process should be terminated (see the “Shutdown values” section below):modules
- it should be a list with one element[module]
, where module is the name of the callback module only if the child process is aSupervisor
orGenServer
; if the child process is aGenEvent
,:modules
should be:dynamic
Restart values (:restart)
The following restart values are supported in the :restart
option:
:permanent
- the child process is always restarted:temporary
- the child process is never restarted (not even when the supervisor’s strategy is:rest_for_one
or:one_for_all
):transient
- the child process is restarted only if it terminates abnormally, i.e., with an exit reason other than:normal
,:shutdown
or{:shutdown, term}
Shutdown values (:shutdown)
The following shutdown values are supported in the :shutdown
option:
:brutal_kill
- the child process is unconditionally terminated usingexit(child, :kill)
:infinity
- if the child process is a supervisor, this is a mechanism to give the subtree enough time to shutdown; it can also be used with workers with care- any integer - the value of
:shutdown
can also be any integer meaning that the supervisor tells the child process to terminate by callingProcess.exit(child, :shutdown)
and then waits for an exit signal back. If no exit signal is received within the specified time (the value of this option, in milliseconds), the child process is unconditionally terminated usingProcess.exit(child, :kill)
Summary
Types
Supported id values
Supported module values
Supported restart values
Supported shutdown values
The supervisor specification
Supported strategies
Supported worker values
Functions
Receives a list of children (workers or supervisors) to supervise and a set of options
Defines the given module
as a supervisor which will be started
with the given arguments
Defines the given module
as a worker which will be started
with the given arguments
Types
Supported id values
Supported module values
Supported restart values
Supported shutdown values
The supervisor specification
Supported strategies
Supported worker values
Functions
Receives a list of children (workers or supervisors) to supervise and a set of options.
Returns a tuple containing the supervisor specification. This tuple can be
used as the return value of the init/1
callback when implementing a
module-based supervisor.
Examples
supervise(children, strategy: :one_for_one)
Options
:strategy
- the restart strategy option. It can be either:one_for_one
,:rest_for_one
,:one_for_all
, or:simple_one_for_one
. You can learn more about strategies in theSupervisor
module docs.:max_restarts
- the maximum amount of restarts allowed in a time frame. Defaults to3
.:max_seconds
- the time frame in which:max_restarts
applies. Defaults to5
.
The :strategy
option is required and by default a maximum of 3 restarts is
allowed within 5 seconds. Check the Supervisor
module for a detailed
description of the available strategies.
Defines the given module
as a supervisor which will be started
with the given arguments.
supervisor(ExUnit.Runner, [], restart: :permanent)
By default, the function start_link
is invoked on the given
module. Overall, the default values for the options are:
[id: module,
function: :start_link,
restart: :permanent,
shutdown: :infinity,
modules: [module]]
Check the documentation for the Supervisor.Spec
module for more
information on the options.
Defines the given module
as a worker which will be started
with the given arguments.
worker(ExUnit.Runner, [], restart: :permanent)
By default, the function start_link
is invoked on the given
module. Overall, the default values for the options are:
[id: module,
function: :start_link,
restart: :permanent,
shutdown: 5000,
modules: [module]]
Check the documentation for the Supervisor.Spec
module for more
information on the options.