Basics of Machine Learning Series
Problem Formulation
Give \(n_m\) choices and \(n_u\) users,
- \(r(i, j) = 1\) if user \(j\) has rated choice \(i\).
- \(y(i,j)\) is the rating given by user \(j\) to the choice \(i\), defined only if \(r(i, j) = 1\).
import numpy as np
# defining a ratings matrix, Y where 0's denote not rated
y = np.array(
[
[3. , 0. , 4.5, 4. , 2. ],
[3. , 4. , 3.5, 5. , 3. ],
[0. , 0. , 3. , 5. , 3. ],
[4. , 0. , 3. , 0. , 0. ],
[0. , 0. , 5. , 5. , 3.5],
[0. , 0. , 5. , 4. , 3.5],
[0. , 5. , 5. , 5. , 4.5],
[4. , 4. , 2.5, 5. , 0. ],
[0.5, 0. , 4. , 0. , 2.5],
[0. , 0. , 0. , 4. , 0. ]
]
)
# calculating matrix R from matrix Y
r = np.where(y > 0, 1, 0)
So, the objective of the reocmmender system is to use the rated choices by the population of users and predict the ratings that a user would attribute to a choice that is not rated i.e. \(r(i, j) = 0\). In most real-world cases such as movie ratings, the number of unrated choices is generally very high and hence is not an elementary/easy problem to solve.
Content Based Recommendations
- Each choice is alloted an \(n\) number of features and rated along those dimensions.
- Following this, for each user \(j\) the ratings are regressed as a function of the alloted set of features.
- The learnt parameter for user \(j\), \(\theta^{(j)}\) lies in space \(\mathbb{R}^{n+1}\).
Summarizing,
- \(\theta^{(j)}\) is the parameter vector for user \(j\).
- \(x^{(i)}\) is the feature vector for choice \(i\).
- For user \(j\) and choice \(i\), predicted rating is given by, \((\theta^{(j)})^T (x^{(i)})\).
Suppose user \(j\) has rated \(m^{(j)}\) choices, then learning \(\theta^{(j)}\) can be treated as linear regression problem. So, to learn \(\theta^{(j)}\),
Similarly, to learn \(\theta^{(1)}, \theta^{(2)}, \cdots, \theta^{(n_u)}\),
where cost function is given by,
Gradient Descent Update,
def estimate_theta_v2(y, max_k=2, x=None, theta=None,
_alpha = 0.01, _lambda=0.001, _tolerance = 0.001):
r = np.where(y > 0, 1, 0)
converged = False
max_i, max_j = y.shape
if type(x) != np.array:
x = np.random.randn(max_i, max_k)
if type(theta) != np.array:
theta = np.random.randn(max_j, max_k+1)
while not converged:
update_theta = np.zeros(theta.shape)
update_theta = _alpha * (
np.matmul(
np.hstack((np.ones((x.shape[0], 1)),x)).transpose(),
(
np.matmul(
np.hstack((np.ones((x.shape[0], 1)),x)),
theta.transpose()
) - y
) * r,
).transpose() + _lambda * theta
)
theta = theta - update_theta
if np.max(abs(update_theta)) < _tolerance:
converged = True
return theta, x
where,
Note: By convention, the terms \({1 \over m^{(j)}}\) terms are removed from the equations in recommendation systems. But these do not affect the optimization values as these are only constants used for ease of derivations in linear regression cost function.
The effectiveness of content based recommendation depends of identifying the features properly, which is often not easy.
Collaborative Filtering
Collaborative filtering has the intrinsic property of feature learning (i.e. it can learn by itself what features to use) which helps overcome drawbacks of content-based recommender systems.
Given the scores \(y(i, j)\) for a choice, \(i \in [1, n_m]\) by various users \(j \in [1, n_u]\), and the parameter vector \(\theta^{(j)}\) for user \(j\), the algorithm learns the values for the features \(x^{(i)}\) applying regression by posing the following optimization problem,
Intuitively this boils down to the scenario where given a choice and its ratings by various users and their parameter vectors, the collaborative filitering algorithm tries to find the most optimal features to represent the choice such that the squared error between the two is minimized. Since this is very similar to the linear regression problem, regularization term is introduced to prevent overfitting of the features learnt. Similarly by extending this, it is possible to learn all the features for all the choices \(i \in [1, n_m]\), i.e. given \( \theta^{(1)}, \theta^{(2)}, \cdots, \theta^{(n_u)} \) learn, \(x^{(1)}, x^{(2)}, \cdots, x^{(n_m)}\),
Where the updates to the feature vectors will be given by,
def estimate_x_v2(y, max_k=2, x=None, theta=None,
_alpha = 0.01, _lambda=0.001, _tolerance = 0.001):
r = np.where(y > 0, 1, 0)
converged = False
max_i, max_j = y.shape
if type(x) != np.array:
x = np.random.randn(max_i, max_k)
if type(theta) != np.array:
theta = np.random.randn(max_j, max_k+1)
while not converged:
update_x = np.zeros(x.shape)
update_x = _alpha * (
np.matmul(
(
np.matmul(
np.hstack((np.ones((x.shape[0], 1)),x)),
theta.transpose()
) - y
) * r,
theta
)[:, 1:] + _lambda * x
)
x = x - update_x
if np.max(abs(update_x)) < _tolerance:
converged = True
return theta, x
It is possible to arrive at optimal \(\theta\) and \(x\) by repetitively minimizing them using \eqref{4} and \eqref{8}.
tolerance=0.001
max_k=50
# the order of application of the estimate_x and estimate_theta can be altered
theta, x = estimate_x_v2(y, _tolerance=tolerance, max_k=max_k)
# iterating twice. more iterations would result in better convergence
for _ in range(2):
theta, x = estimate_theta_v2(y, x=x, theta=theta, _tolerance=tolerance, max_k=max_k)
theta, x = estimate_x_v2(y, x=x, theta=theta, _tolerance=tolerance, max_k=max_k)
predictions = np.matmul(np.hstack((np.ones((10, 1)), x)), theta.transpose())
But it is also possible to solve for both \(\theta\) and \(x\) simultaneously, given by an update rule which is nothing but the combination of the earlier two update rules in \eqref{3} and \eqref{7}. So the resulting cost function is given by,
and the minimization objective can be written as,
Practically, the minimization objective \eqref{10} is equivalent to \eqref{4} if \(x\) is kept constant. Similarly, it’s equivalent to \eqref{8} if \(\theta\) is kept constant.
In \eqref{10}, by convention there is no \(x_0=1\) and thus consequently, there in no \(\theta_0\), hence leading to \(x \in \mathbb{R}^n\) and \(\theta \in \mathbb{R}^n\).
To summarize, the collaborative filtering algorithm has the following steps,
- Initializa \(x^{(1)}, \cdots, x^{(n_m)}, \theta^{(1)}, \cdots, \theta^{(n_u)}\) to small random values.
- Minimize \eqref{9} using gradient descent or any other advance optimization algorithm. The update rules given below can be obtained by following the partial derivatives along \(x’s\) and \(\theta’s\).
def colaborative_filtering_v2(y, max_k=2,
_alpha=0.01, _lambda=0.001, _tolerance=0.001, r=None):
if type(r) != np.ndarray:
r = np.where(y>0, 1, 0)
converged = False
max_i, max_j = y.shape
x = np.random.rand(max_i, max_k)
theta = np.random.rand(max_j, max_k)
while not converged:
update_x = np.zeros(x.shape)
update_theta = np.zeros(theta.shape)
update_x = _alpha * (
np.matmul(
(np.matmul(x, theta.transpose()) - y) * r,
theta
) + _lambda * x
)
update_theta = _alpha * (
np.matmul(
x.transpose(),
(np.matmul(x, theta.transpose()) - y) * r,
).transpose() + _lambda * theta
)
x = x - update_x
theta = theta - update_theta
if max(np.max(abs(update_x)), np.max(abs(update_theta))) < _tolerance:
converged = True
return theta, x
theta, x = colaborative_filtering_v2(y, max_k=max_k)
predictions = np.matmul(x, theta.transpose())
- For a user with parameter \(\theta\) and a choice with learned features \(x\), the predicted star rating is given by \(\theta^T x\).
Consequently, the matrix of ratings, \(Y\), can be written as,
Where \(y(i, j)\) is the rating for choice \(i\) by user \(j\).
Vectorized implementation of \eqref{12}, is given by,
Where,
- each row \(i\) in \(X\) represents the feature vector of choice \(i\).
- each row \(j\) in \(\Theta\) represents the parameter vector for user \(j\).
The algorithm discussed is also called low rank matrix factorization which is a property of the matrix \(Y\) is linear algebra.
Similar Recommendations
After the collaborative filtering algorithm has converged, it can be used to find related choices. For each choice \(i\), a feature vector is learned, \(x^{(i)} \in \mathbb{R}^n\). Although it is generally not possible to decipher what the values in the matrix \(X\) denote, they encode representative features of the choices in detail. So in order to find choices close to a given choice \(i\), a simple euclidean distance calculation will give the desired results
If the distance between choices \(i\) and \(j\) is small, i.e. \(\lVert x^{(i)} - x^{(j)} \rVert\) is small, then they are similar.
Mean Normalization
Consider a case where one of the users has not rated any of the choices, then the rating matrix Y can be defined as,
y = np.hstack((y, np.zeros((y.shape[0], 1))))
r = np.where(y > 0, 1, 0)
Since none of the choices are rated by this user, the entries in R matrix corresponding to this user would be all zeros. So, \eqref{9} can be written as follows (because \({1 \over 2} \sum_{(i,j):r(i,j)=1} ((\theta^{(j)})^T x^{(i)} - y^{(i, j)})^2 = 0\)),
Since the updates to \(\theta\) corresponding to this user is only governed by this cost function, it would only minimize parameter vector \(\theta\). This can be seen easily by setting a low tolerance for the collaborative filtering,
max_k = 5
tolerance = 0.0000001
theta, x = colaborative_filtering_v2(y, max_k=max_k, _tolerance=tolerance)
predictions = np.matmul(x, theta.transpose())
Obviously this is not a correct assumption to rate all the choices 0 for a user that has rated none so far. For such a user it would be ideal to predict the rating as the average of ratings attibuted to it by other users so far.
Mean normalization helps in acheiving this. In this process each row of the ratings matrix is normalized by its mean and later denormalized after predictions.
def normalized(y, max_k=2,
_alpha=0.01, _lambda=0.001, _tolerance=0.001):
r = np.where(y>0, 1, 0)
y_sum = y.sum(axis=1)
r_sum = r.sum(axis=1)
y_mean = np.atleast_2d(y_sum/r_sum).transpose()
y_norm = y - y_mean
theta, x = colaborative_filtering_v2(y_norm, max_k, _alpha, _lambda, _tolerance, r)
return theta, x, y_mean
theta, x, y_mean = normalized(y, max_k=max_k, _tolerance=tolerance)
predictions = np.matmul(x, theta.transpose()) + y_mean
REFERENCES:
Machine Learning: Coursera - Content Based Recommendations
Machine Learning: Coursera - Collaborative Filtering
Machine Learning: Coursera - Algorithm
Machine Learning: Coursera - Low Rank Matrix Factorization
Machine Learning: Coursera - Mean Normalization


{% extends "global/Page.html" %} {% load static otree %} {% block title %} Round {{ player.round_number }} of {{ Constants.num_rounds }} {% endblock %} {% block content %}
This completes round {{ player.round_number }} of {{ Constants.num_rounds }}.
Here is the summary of what happened in this round;
Wage selected by the Employer = {{group.random_wage}} points
Effort provided by the worker = {{group.effort}}
Based on these choices the earnings in this round are as follow;
Employer Earning = {{e_earnings}} points
Worker Earnings = {{w_earnings}} points
{% endblock %}


Register here!
First Name:
Last Name:
Male
Female
Other
Email:
Password:
Birthday:
Month
January
December
Day
01
21
Year
2000
2001
I agree to the terms and conditions:


Rotated pole plots¶
Example 21 - rotated pole data plot¶
import cf
import cfplot as cfp
f=cf.read('cfplot_data/rgp.nc')[0]
cfp.cscale('plasma')
cfp.con(f)
Example 22 - rotated pole data on the native grid¶
This plot shows some rotated pole data on the native grid. Notice the way that the longitude lines are warped away from the centre of the plot. Data over the equatorial regions show little of this warping.
import cf
import cfplot as cfp
f=cf.read('cfplot_data/rgp.nc')[0]
cfp.cscale('plasma')
cfp.mapset(proj='rotated')
cfp.con(f)
Example 23 - Overlaying vectors over a rotated pole data plot¶
In this plot a cylindrical projection plot of rotated pole data is overlayed with wind vectors.
Care is needed when making vector plots as the vectors can be of two forms:
a) eastward wind and westward wind are relative to longitude and latitude axes
b) x-wind and y-wind are relative to the rotated pole axes
Here we have eastward and westward wind so these can be plotted as normal over a cylindrical projection. For the case of data in case b) above, the x-wind and y-wind will need to be appropriately rotated onto a cylindrical grid.
import cf
import cfplot as cfp
f=cf.read('cfplot_data/20160601-05T0000Z_INCOMPASS_km4p4_uv_RH_500.nc')
cfp.mapset(50, 100, 5, 35)
cfp.levs(0, 90, 15, extend='neither')
cfp.gopen()
cfp.con(f[0], lines=False)
cfp.vect(u=f[1], v=f[2], stride=40, key_length=10)
cfp.gclose()


Response Model
You can declare the model used for the response with the parameter response_model
in any of the path operations:
@app.get()
@app.post()
@app.put()
@app.delete()
- etc.
from typing import List
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
description: str = None
price: float
tax: float = None
tags: List[str] = []
@app.post("/items/", response_model=Item)
async def create_item(item: Item):
return item
Note
Notice that response_model
is a parameter of the "decorator" method (get
, post
, etc). Not of your path operation function, like all the parameters and body.
It receives the same type you would declare for a Pydantic model attribute, so, it can be a Pydantic model, but it can also be, e.g. a list
of Pydantic models, like List[Item]
.
FastAPI will use this response_model
to:
- Convert the output data to its type declaration.
- Validate the data.
- Add a JSON Schema for the response, in the OpenAPI path operation.
- Will be used by the automatic documentation systems.
But most importantly:
- Will limit the output data to that of the model. We'll see how that's important below.
Technical Details
The response model is declared in this parameter instead of as a function return type annotation, because the path function may not actually return that response model but rather return a dict
, database object or some other model, and then use the response_model
to perform the field limiting and serialization.
Return the same input data¶
Here we are declaring a UserIn
model, it will contain a plaintext password:
from fastapi import FastAPI
from pydantic import BaseModel, EmailStr
app = FastAPI()
class UserIn(BaseModel):
username: str
password: str
email: EmailStr
full_name: str = None
# Don't do this in production!
@app.post("/user/", response_model=UserIn)
async def create_user(*, user: UserIn):
return user
And we are using this model to declare our input and the same model to declare our output:
from fastapi import FastAPI
from pydantic import BaseModel, EmailStr
app = FastAPI()
class UserIn(BaseModel):
username: str
password: str
email: EmailStr
full_name: str = None
# Don't do this in production!
@app.post("/user/", response_model=UserIn)
async def create_user(*, user: UserIn):
return user
Now, whenever a browser is creating a user with a password, the API will return the same password in the response.
In this case, it might not be a problem, because the user himself is sending the password.
But if we use the same model for another path operation, we could be sending our user's passwords to every client.
Danger
Never send the plain password of a user in a response.
Add an output model¶
We can instead create an input model with the plaintext password and an output model without it:
from fastapi import FastAPI
from pydantic import BaseModel, EmailStr
app = FastAPI()
class UserIn(BaseModel):
username: str
password: str
email: EmailStr
full_name: str = None
class UserOut(BaseModel):
username: str
email: EmailStr
full_name: str = None
@app.post("/user/", response_model=UserOut)
async def create_user(*, user: UserIn):
return user
Here, even though our path operation function is returning the same input user that contains the password:
from fastapi import FastAPI
from pydantic import BaseModel, EmailStr
app = FastAPI()
class UserIn(BaseModel):
username: str
password: str
email: EmailStr
full_name: str = None
class UserOut(BaseModel):
username: str
email: EmailStr
full_name: str = None
@app.post("/user/", response_model=UserOut)
async def create_user(*, user: UserIn):
return user
...we declared the response_model
to be our model UserOut
, that doesn't include the password:
from fastapi import FastAPI
from pydantic import BaseModel, EmailStr
app = FastAPI()
class UserIn(BaseModel):
username: str
password: str
email: EmailStr
full_name: str = None
class UserOut(BaseModel):
username: str
email: EmailStr
full_name: str = None
@app.post("/user/", response_model=UserOut)
async def create_user(*, user: UserIn):
return user
So, FastAPI will take care of filtering out all the data that is not declared in the output model (using Pydantic).
See it in the docs¶
When you see the automatic docs, you can check that the input model and output model will both have their own JSON Schema:
And both models will be used for the interactive API documentation:
Response Model encoding parameters¶
Your response model could have default values, like:
from typing import List
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
description: str = None
price: float
tax: float = 10.5
tags: List[str] = []
items = {
"foo": {"name": "Foo", "price": 50.2},
"bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
"baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
}
@app.get("/items/{item_id}", response_model=Item, response_model_exclude_unset=True)
async def read_item(item_id: str):
return items[item_id]
description: str = None
has a default ofNone
.tax: float = 10.5
has a default of10.5
.tags: List[str] = []
has a default of an empty list:[]
.
but you might want to omit them from the result if they were not actually stored.
For example, if you have models with many optional attributes in a NoSQL database, but you don't want to send very long JSON responses full of default values.
Use the response_model_exclude_unset
parameter¶
You can set the path operation decorator parameter response_model_exclude_unset=True
:
from typing import List
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
description: str = None
price: float
tax: float = 10.5
tags: List[str] = []
items = {
"foo": {"name": "Foo", "price": 50.2},
"bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
"baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
}
@app.get("/items/{item_id}", response_model=Item, response_model_exclude_unset=True)
async def read_item(item_id: str):
return items[item_id]
and those default values won't be included in the response, only the values actually set.
So, if you send a request to that path operation for the item with ID foo
, the response (not including default values) will be:
{
"name": "Foo",
"price": 50.2
}
Info
FastAPI uses Pydantic model's .dict()
with its exclude_unset
parameter to achieve this.
Data with values for fields with defaults¶
But if your data has values for the model's fields with default values, like the item with ID bar
:
{
"name": "Bar",
"description": "The bartenders",
"price": 62,
"tax": 20.2
}
they will be included in the response.
Data with the same values as the defaults¶
If the data has the same values as the default ones, like the item with ID baz
:
{
"name": "Baz",
"description": None,
"price": 50.2,
"tax": 10.5,
"tags": []
}
FastAPI is smart enough (actually, Pydantic is smart enough) to realize that, even though description
, tax
, and tags
have the same values as the defaults, they were set explicitly (instead of taken from the defaults).
So, they will be included in the JSON response.
Tip
Notice that the default values can be anything, not only None
.
They can be a list ([]
), a float
of 10.5
, etc.
response_model_include
and response_model_exclude
¶
You can also use the path operation decorator parameters response_model_include
and response_model_exclude
.
They take a set
of str
with the name of the attributes to include (omitting the rest) or to exclude (including the rest).
This can be used as a quick shortcut if you have only one Pydantic model and want to remove some data from the output.
Tip
But it is still recommended to use the ideas above, using multiple classes, instead of these parameters.
This is because the JSON Schema generated in your app's OpenAPI (and the docs) will still be the one for the complete model, even if you use response_model_include
or response_model_exclude
to omit some attributes.
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
description: str = None
price: float
tax: float = 10.5
items = {
"foo": {"name": "Foo", "price": 50.2},
"bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
"baz": {
"name": "Baz",
"description": "There goes my baz",
"price": 50.2,
"tax": 10.5,
},
}
@app.get(
"/items/{item_id}/name",
response_model=Item,
response_model_include={"name", "description"},
)
async def read_item_name(item_id: str):
return items[item_id]
@app.get("/items/{item_id}/public", response_model=Item, response_model_exclude={"tax"})
async def read_item_public_data(item_id: str):
return items[item_id]
Tip
The syntax {"name", "description"}
creates a set
with those two values.
It is equivalent to set(["name", "description"])
.
Using list
s instead of set
s¶
If you forget to use a set
and use a list
or tuple
instead, FastAPI will still convert it to a set
and it will work correctly:
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
description: str = None
price: float
tax: float = 10.5
items = {
"foo": {"name": "Foo", "price": 50.2},
"bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
"baz": {
"name": "Baz",
"description": "There goes my baz",
"price": 50.2,
"tax": 10.5,
},
}
@app.get(
"/items/{item_id}/name",
response_model=Item,
response_model_include=["name", "description"],
)
async def read_item_name(item_id: str):
return items[item_id]
@app.get("/items/{item_id}/public", response_model=Item, response_model_exclude=["tax"])
async def read_item_public_data(item_id: str):
return items[item_id]
Recap¶
Use the path operation decorator's parameter response_model
to define response models and especially to ensure private data is filtered out.
Use response_model_exclude_unset
to return only the values explicitly set.


This article is meant for those programmers who are only getting started with the Visual Studio environment and trying to compile their C++ projects under it. Everything looks strange and complicated in an unfamiliar environment, and novices are especially irritated by the stdafx.h file that causes strange errors during compilation.  We wrote this article to help Visual Studio newcomers to figure it all out.
Precompiled headers are intended to speed up project builds. When getting started with Visual C++, programmers usually try it on very small projects that cannot show the performance gain from using precompiled headers. Both with and without them, the program seems to take the same time to compile. This is just what confuses the user: he doesn't see any use in this option and concludes that it is needed for some specific tasks and he will never need it. This delusion may last for years.
Precompiled headers are actually a very useful technology. You can notice the benefit even with a project of just a few dozens of files. Using such heavy libraries as boost makes the performance gain especially evident.
If you examine the *.cpp files in your project, you will notice that many of them include the same sets of headers, for example <vector>, <string>, <algorithm>. These headers, in their turn, include other headers, and so on.
All this results in the compiler's preprocessor doing the same work again and again - it must read the same files many times, insert them into each other, process #ifdef and expand macros. Because of that, the same operations are repeated a huge number of times.
The amount of work the preprocessor has to do during project compilation can be greatly reduced. The idea is to preprocess a group of files in advance and then simply insert already prepared text fragments where necessary.
It actually includes a few more steps: instead of simple text you can store more highly processed information. I don't know how exactly it all is implemented in Visual C++, but I know that, for instance, you can store text already split into lexemes. It will speed up the compilation process even more.
A file containing precompiled headers has the ".pch" extension. The file name usually coincides with the project name, but you can naturally change this and any other used names in the settings. The *.pch file may be pretty large, which depends on how many headers are expanded in it. In PVS-Studio, for example, it occupies about 3 Mbytes.
The *.pch file is created as a result of the stdafx.cpp file's compilation. This file is built with the "/Yc" switch that is used specifically to tell the compiler to create precompiled headers. The stdafx.cpp file can contain one line: #include "stdafx.h".
The most interesting stuff is stored in the "stdafx.h" file. All the header files to be precompiled should be included into it. For example, below is the stdafx.h file we use in PVS-Studio (the text is abridged for the article):
|
|
The "#pragma warning" directives are necessary to get rid of warnings generated on standard libraries.
Now the "stdafx.h" file should be included into all the *.c/*.cpp files. You should also remove from these files all the headers already included into "stdafx.h".
But what to do when different files use somewhat similar but still different sets of headers? For example:
Should you create individual precompiled headers? Well, you can do that but you don't need to.
You only need to create one precompiled header where <vector>, <string> and <algorithm> will be expanded. The benefit of the preprocessor not having to read numbers of files and insert them into each other overweighs the losses on syntax analysis of additional code fragments.
When starting a new project, Visual Studio's Wizard creates two files: stdafx.h and stdafx.cpp. It is through them that the mechanism of precompiled headers is implemented.
These files can actually have any other names; it's not the name that matters but the compilation parameters you specify in the project settings.
A *.c/*.cpp file can only use one precompiled header. However, one project may contain a few different precompiled headers. Suppose we have only one for now.
So if you have used the Wizard, the files stdafx.h and stdafx.cpp are already created for you, and all the necessary compilation switches are also defined.
If you didn't use the precompiled headers option in your project, let's find out how to enable it. I suggest the following algorithm:
Now we have enabled the precompiled headers option. If we run compilation now, the compiler will create the *.pch file. However, compilation will terminate just a bit later because of errors.
We have set all the *.c/*.cpp files to use precompiled headers, but it's not enough. We need now to add #include "stdafx.h" into each file.
The "stdafx.h" header must be the very first one to be included into the *.c/*.cpp file. This is obligatory! Otherwise you are guaranteed to get compilation errors.
It really makes sense, if you come to think of it. When the "stdafx.h" file is included in the very beginning, you can substitute an already preprocessed text into the file. This text stays the same all the time and is not affected by anything.
And now imagine that we have included some other file prior to "stdafx.h" and that file contains the line #define bool char. It will make the situation undefined as we have changed the contents of all the files where "bool" is mentioned. Now you can't just insert a preprocessed text, and the entire mechanism of "precompiled headers" gets broken. I believe this to be one of the reasons why "stdafx.h" must be included in the first place. Perhaps there are some other reasons too.
Manually typing #include "stdafx.h" into all the *.c/*.cpp files is pretty tiresome and boring. Besides, you will get a new revision in the version control system with lots of files changed. It's no good doing so.
Third-party libraries included into the project as source files cause some additional troubles. Changing these files won't make sense. The best solution would be to disable precompiled headers for them, but it's inconvenient when you use a number of small libraries. You will be constantly stumbling over precompiled headers.
But there is an easier way to handle precompiled headers. This method is not a universal one, but it did help me in many cases.
Instead of manually adding #include "stdafx.h" in all the files, you may use the "Forced Included File" option.
Go to the "Advanced" settings tab. Select all configurations. In the field "Forced Included File" write the following text:
StdAfx.h;%(ForcedIncludeFiles)
From now on, "stdafx.h" will be automatically included in the beginning of ALL the files to be compiled. PROFIT!
You won't need to manually add #include "stdafx.h" in the beginning of each and every *.c/*.cpp file anymore - the compiler will do it automatically.
This is a very important question. Mindlessly including every single header into "stdafx.h" will slow down the compilation process instead of speeding it up.
All the files that include "stdafx.h" depend on its contents. Suppose "stdafx.h" includes the file "X.h". Changing "X.h" just a little bit may cause complete recompilation of the whole project.
Important rule. Make sure your "stdafx.h" file includes only those files that never or VERY rarely change. The best candidates are headers from system and third-party libraries.
If you include you own project files into "stdafx.h", be especially careful. Include only those files that change very, very rarely.
If any of the *.h files changes once in a month, it's too frequent enough. In most cases, it takes you more than once to do all the necessary edits in an h-file - usually 2 or 3 times. Completely recompiling the entire project 2 or 3 times is quite an unpleasant thing, isn't it? Besides, all your colleagues will need to do the same.
But don't be too fanatical about non-changing files. Include only those headers that you use really often. Including <set> won't make sense if you need it in just a couple of files. Instead, simply include this file where needed.
What for may we need several precompiled headers in one project? Well, it's a pretty rare situation indeed. But here you are couple of examples.
Imagine the project is using both *.c and *.cpp files together. You can't use a shared *.pch file for them - the compiler will generate an error.
You have to create two *.pch files. One of them is created after compiling the C-file (xx.c), the other after compiling the C++-file (yy.cpp). Accordingly, you should specify in the settings to use one precompiled header for C-files and another for C++-files.
Note. Don't forget to set different names for these two *.pch files. Otherwise they will be replacing each other.
Here's another situation. One part of the project uses one large library while the other part uses another large library.
Naturally, different parts of the project should not know about both libraries: there may be (unlucky) overlapping of entities' names in different libraries.
It is logical to create two precompiled headers and use them in different parts of the program. As we have already mentioned, you may use any names you like for the files the *.pch files are generated from. Well, even the name of the *.pch file can be changed too. It all should be done very carefully of course, but there's nothing especially difficult about using two precompiled headers.
Now that you have attentively read the text above, you will understand and eliminate any errors related to stdafx.h. But I suggest that we quickly review novice programmers' typical mistakes once again and investigate the reasons behind them. Practice makes perfect.
You are trying to compile a file that uses a precompiled header while the corresponding *.pch file is missing. Possible reasons are:
The error text says it all if you bother to read it. The file is compiled with the /Yu switch. It means that a precompiled header is to be used, but "stdafx.h" is missing from the file.
You need to add #include "stdafx.h" into the file.
If you can't do it, do not use the precompiled header for this *.c/*.cpp file. Delete the /Yu switch.
The project contains both C (*.c) and C++ (*.cpp) files. You cannot use a shared precompiled header (*.pch file) for them.
Possible solutions:
You must have done something wrong. For example, the line #include "stdafx.h" is not the first one in the file.
Take a look at this example:
|
|
This code will fail to compile, the compiler generating a seemingly strange error message:
error C2065: 'A' : undeclared identifier
It thinks that all text before #include "stdafx.h" (including this line) is a precompiled header. When compiling the file, the compiler will substitute the text before #include "stdafx.h" with the text from the *.pch file. It will result in losing the line "int A = 10".
The correct code should look like this:
|
|
One more example:
|
|
The contents of the file "my.h" won't be used. As a result, you won't be able to use the functions declared in this file. Such behavior does confuse programmers a lot. They try to "cure" it by completely disabling precompiled headers and then come up with stories about how buggy Visual C++ is. Remember one thing: a compiler is one of the least buggy tools. In 99.99% of all cases, it's not the compiler you should be angry with, but mistakes in your own code (Proof).
To avoid such troubles, make sure you add #include "stdafx.h" in the very beginning of the file ALL THE TIME. Well, you can leave comments before #include "stdafx.h"; they don't take part in compilation anyway.
Another way is to use Forced Included File. See the section "Life hack" above.
You have added into stdafx.h a file that you keep regularly editing. Or you could have included an auto-generated file by mistake.
Attentively examine the contents of the "stdafx.h" file: it must contain only headers that never or very rarely change. Keep in mind that while certain included files do not change themselves, they may contain references to other *.h files that do.
You may sometimes come across an issue when an error doesn't disappear even after fixing the code. The debugger reports something strange.
This issue may relate to the *.pch file. For some reason the compiler doesn't notice that one of the header files has been changed, so it doesn't recompile the *.pch file and keeps inserting previously generated text. It might have been caused by some faults related to the time of file modification.
This is an EXTREMELY rare situation. But it is possible and you should know about it. Personally I have faced this issue only 2 or 3 times during the many years of my career. It can be solved by complete full project recompilation.
This is the most frequent trouble users report to our support service. For details, see the documentation: "PVS-Studio: Troubleshooting". Here I will only give a brief summary of the problem.
If a solution compiles well, it doesn't mean that it is implemented correctly. One solution may often contain numbers of projects, each of them using their own precompiled headers (i.e. their own stdafx.h and stdafx.cpp files).
Troubles occur when programmers start using files from one project in another. It may be convenient and this method is quite popular indeed. But they also forget that the *.cpp file contains the line #include "stdafx.h".
The question is, which of the stdafx.h files will be taken up? If the program compiles well, it means the programmer is just lucky enough.
Unfortunately, it is very difficult for us to reproduce the behavior when using the *.pch file. You see, the "honest" preprocessor works quite differently.
You can check if your solution is implemented in a wrong way by temporarily disabling precompiled headers. You may then get lots of interesting errors that will make you sincerely wonder how your project could compile at all.
Again, refer to the documentation for details. If anything is still unclear, ask our support service.
As you can see, working with precompiled headers is pretty easy. Programmers that try to use them and constantly face "compiler's numerous bugs" just don't understand the working principles behind this mechanism. I hope this article has helped you to get rid of that misunderstanding.
Precompiled headers are a very useful option that allows you to significantly enhance project compilation speed.


Pillow type Shape
Square shaped Round shaped Dog shaped Bear shaped
Bunny shaped Cat shaped Custom shaped
Next


Library test
On this page you can try out the Jabra library. Callbacks are shown as toasts. Look at the source for an example on how to use the library.
Note: No state logic is built into this test page. For valid use-cases follow these sequences.


About Us
Missions & Visions Statement
Structure
Current Vacant Positions
History
Founding Members
Contact Us
Employment
Donations
Funding
Working for Tangentyere
How to Apply
Selection Process
Publications
Office of Director
Enterprises
Governance
Tangentyere Design
Tangentyere Artists
Tangentyere Constitution
Services
Tangentyere Employment Services
Family & youth Services
Housing Services
Links


blank
17 Dec 2020
- Sparisoma Viridi
According to [1].
References
- -, “Kinetic Theory of Gases”, Glenn Research Center, National Aeronautics and Space Administration, url https://www.grc.nasa.gov/www/k-12/airplane/kinth.html [20201210].
- -, “6.1 Kinetic Theory of Gases”, Introductory Chemistry, v. 1.0, url https://saylordotorg.github.io/text_introductory-chemistry/s10-01-kinetic-theory-of-gases.html [20201210].
- The Editors of Encyclopaedia Britannica, Kanchan Gupta, Thinley Kalsang Bhutia, Erik Gregersen, “Kinetic theory of gases”, Encyclopædia Britannica, url https://www.britannica.com/science/kinetic-theory-of-gases [20201210].
- Jessie A. Key, David W. Ball, “Kinetic Molecular Theory of Gases”, in Introductory Chemistry, 1st Canadian Edn., Chap. 6. Gases, url https://opentextbc.ca/introductorychemistry/chapter/kinetic-molecular-theory-of-gases-2/ [20201210].
- Carl R. Nave, “Kinetic Theory”, HyperPhysics, 2017, url http://hyperphysics.phy-astr.gsu.edu/hbase/Kinetic/kinthe.html [20201210].
- Wikipedia contributors, “Kinetic theory of gases”, Wikipedia, The Free Encyclopedia, 2 Dec 2020, 21:15 UTC, url https://en.wikipedia.org/w/index.php?oldid=991982665 [20201210].
- -, “Kinetic Theory of Gases”, in Calculus-Based General Physics, 22, 1975, url https://digitalcommons.unl.edu/calculusbasedphysics/22/ [20201210].


Change Language:
Bahasa Malaysia
CatalÃ
Dansk
Deutsch
English
English (UK)
EspaÃ±ol
Euskara
Filipino
FranÃ§ais
Hrvatski
Indonesia
Italiano
Kiswahili
LatvieÅ¡u valoda
LietuviÅ³
Nederlands
Norsk
PortuguÃªs (Brasil)
PortuguÃªs (Portugal)
RomÃ¢nÄ
SlovenÄina
SlovenÅ¡Äina
Svenska
Tagalog
Tiáº¿ng Viá»t
TÃ¼rkÃ§e
eesti keel
magyar
polski
suomi
Ãslenska
ÄeÅ¡tina
ÎÎ»Î»Î·Î½Î¹ÎºÎ¬
Ð ÑÑÑÐºÐ¸Ð¹
Ð£ÐºÑÐ°ÑÐ½ÑÑÐºÐ°
Ð±ÑÐ»Ð³Ð°ÑÑÐºÐ¸
ÑÑÐ¿ÑÐºÐ¸
×¢××¨××ª
Ø§Ø±Ø¯Ù
Ø§ÙØ¹Ø±Ø¨ÙØ©
à¤®à¤°à¤¾à¤ à¥
à¤¹à¤¿à¤¨à¥à¤¦à¥
à¦¬à¦¾à¦à¦²à¦¾
àªà«àªàª°àª¾àª¤à«
à¬à¬¡à¬¿à¬
à®¤à®®à®¿à®´à¯
à°¤à±à°²à±à°à±
à²à²¨à³à²¨à²¡
à´®à´²à´¯à´¾à´³à´
à¹à¸à¸¢
á ááá
ä¸æ (ç¹é«)
ä¸æï¼ç®ä½ï¼
æ¥æ¬èª
íêµì´
Get started with Gmail
First name:
Last name:
Desired Login Name:
Choose a username
Enter a new username
Examples: JSmith, John.Smith
@gmail.com
Choose a password:
Minimum of 8 characters in length.

What is the name of your best friend from childhood?
What was the name of your first teacher?
What is the name of your manager at your first job?
What was your first phone number?
What is your vehicle registration number?
What is your library card number?
If you forget your password we will ask for the answer to your security question.
Learn More
Answer:
Recovery email:
This address is used to authenticate your account should you ever encounter problems or forget your password. If you do not have another email address, you may leave this field blank.
Learn More
Location:
Afghanistan (Ø§ÙØºØ§ÙØ³ØªØ§Ù)
Aland Islands
Albania (ShqipÃ«ria)
Algeria (Ø§ÙØ¬Ø²Ø§Ø¦Ø±)
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia (ÕÕ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)
Aruba
Australia
Austria (Ãsterreich)
Azerbaijan (AzÉrbaycan)
Bahamas
Bahrain (Ø§ÙØ¨ØØ±ÙÙ)
Bangladesh (à¦¬à¦¾à¦à¦²à¦¾à¦¦à§à¦¶)
Barbados
Belarus (ÐÐµÐ»Ð°ÑÑÌÑÑ)
Belgium (BelgiÃ«)
Belize
Benin (BÃ©nin)
Bermuda
Bhutan (à½ à½à¾²à½´à½à¼à½¡à½´à½£)
Bolivia
Bosnia and Herzegovina (Bosna i Hercegovina)
Botswana
Bouvet Island
Brazil (Brasil)
British Indian Ocean Territory
Brunei (Brunei Darussalam)
Bulgaria (ÐÑÐ»Ð³Ð°ÑÐ¸Ñ)
Burkina Faso
Burundi (Uburundi)
Cambodia (Kampuchea)
Cameroon (Cameroun)
Canada
Cape Verde (Cabo Verde)
Cayman Islands
Central African Republic (RÃ©publique Centrafricaine)
Chad (Tchad)
Chile
China (ä¸å½)
Christmas Island
Cocos Islands
Colombia
Comoros (Comores)
Congo
Congo, Democratic Republic of the
Cook Islands
Costa Rica
CÃ´te d'Ivoire
Croatia (Hrvatska)
Cuba
Cyprus (ÎÏ ÏÏÎ¿Ï)
Czech Republic (Äesko)
Denmark (Danmark)
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt (Ù ØµØ±)
El Salvador
Equatorial Guinea (Guinea Ecuatorial)
Eritrea (Ertra)
Estonia (Eesti)
Ethiopia (Ityop'iya)
Falkland Islands
Faroe Islands
Fiji
Finland (Suomi)
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia (á¡áá¥áá ááááá)
Germany (Deutschland)
Ghana
Gibraltar
Greece (ÎÎ»Î»Î¬Ï)
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea (GuinÃ©e)
Guinea-Bissau (GuinÃ©-Bissau)
Guyana
Haiti (HaÃ¯ti)
Heard Island and McDonald Islands
Honduras
Hong Kong
Hungary (MagyarorszÃ¡g)
Iceland (Ãsland)
India
Indonesia
Iran (Ø§ÛØ±Ø§Ù)
Iraq (Ø§ÙØ¹Ø±Ø§Ù)
Ireland
Isle of Man
Israel (××©×¨××)
Italy (Italia)
Jamaica
Japan (æ¥æ¬)
Jersey
Jordan (Ø§ÙØ§Ø±Ø¯Ù)
Kazakhstan (ÒÐ°Ð·Ð°ÒÑÑÐ°Ð½)
Kenya
Kiribati
Kuwait (Ø§ÙÙÙÙØª)
Kyrgyzstan (ÐÑÑÐ³ÑÐ·ÑÑÐ°Ð½)
Laos (àºàº¥àº²àº§)
Latvia (Latvija)
Lebanon (ÙØ¨ÙØ§Ù)
Lesotho
Liberia
Libya (ÙÙØ¨ÙØ§)
Liechtenstein
Lithuania (Lietuva)
Luxembourg (LÃ«tzebuerg)
Macao
Macedonia (ÐÐ°ÐºÐµÐ´Ð¾Ð½Ð¸ÑÐ°)
Madagascar (Madagasikara)
Malawi
Malaysia
Maldives (ÞÞªÞÞÞÞ°ÞÞ§ ÞÞ§ÞÞ°ÞÞ¨ÞÞ«ÞÞ°Þ)
Mali
Malta
Marshall Islands
Martinique
Mauritania (Ù ÙØ±ÙØªØ§ÙÙØ§)
Mauritius
Mayotte
Mexico (MÃ©xico)
Micronesia
Moldova
Monaco
Mongolia (ÐÐ¾Ð½Ð³Ð¾Ð» Ð£Ð»Ñ)
Montenegro (Ð¦ÑÐ½Ð° ÐÐ¾ÑÐ°)
Montserrat
Morocco (Ø§ÙÙ ØºØ±Ø¨)
Mozambique (MoÃ§ambique)
Myanmar (Burma)
Namibia
Nauru (Naoero)
Nepal (à¤¨à¥à¤ªà¤¾à¤²)
Netherlands (Nederland)
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
North Korea (ì¡°ì )
Norway (Norge)
Oman (Ø¹Ù Ø§Ù)
Pakistan (Ù¾Ø§Ú©Ø³ØªØ§Ù)
Palau (Belau)
Palestinian Territories
Panama (PanamÃ¡)
Papua New Guinea
Paraguay
Peru (PerÃº)
Philippines (Pilipinas)
Pitcairn
Poland (Polska)
Portugal
Puerto Rico
Qatar (ÙØ·Ø±)
Reunion
Romania (RomÃ¢nia)
Russia (Ð Ð¾ÑÑÐ¸Ñ)
Rwanda
Saint Helena
Saint Kitts and Nevis
Saint Lucia
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
SÃ£o TomÃ© and PrÃncipe
Saudi Arabia (Ø§ÙÙ Ù ÙÙØ© Ø§ÙØ¹Ø±Ø¨ÙØ© Ø§ÙØ³Ø¹ÙØ¯ÙØ©)
Senegal (SÃ©nÃ©gal)
Serbia (Ð¡ÑÐ±Ð¸ÑÐ°)
Serbia and Montenegro (Ð¡ÑÐ±Ð¸ÑÐ° Ð¸ Ð¦ÑÐ½Ð° ÐÐ¾ÑÐ°)
Seychelles
Sierra Leone
Singapore (Singapura)
Slovakia (Slovensko)
Slovenia (Slovenija)
Solomon Islands
Somalia (Soomaaliya)
South Africa
South Georgia and the South Sandwich Islands
South Korea (íêµ)
Spain (EspaÃ±a)
Sri Lanka
Sudan (Ø§ÙØ³ÙØ¯Ø§Ù)
Suriname
Svalbard and Jan Mayen
Swaziland
Sweden (Sverige)
Switzerland (Schweiz)
Syria (Ø³ÙØ±ÙØ§)
Taiwan (å°ç£)
Tajikistan (Ð¢Ð¾Ò·Ð¸ÐºÐ¸ÑÑÐ¾Ð½)
Tanzania
Thailand (à¸£à¸²à¸à¸à¸²à¸à¸²à¸à¸±à¸à¸£à¹à¸à¸¢)
Timor-Leste
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia (ØªÙÙØ³)
Turkey (TÃ¼rkiye)
Turkmenistan (TÃ¼rkmenistan)
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine (Ð£ÐºÑÐ°ÑÐ½Ð°)
United Arab Emirates (Ø§ÙØ¥Ù Ø§Ø±Ø§Øª Ø§ÙØ¹Ø±Ø¨ÙÙØ© Ø§ÙÙ ØªÙØØ¯Ø©)
United Kingdom
United States
United States minor outlying islands
Uruguay
Uzbekistan (O'zbekiston)
Vanuatu
Vatican City (CittÃ del Vaticano)
Venezuela
Vietnam (Viá»t Nam)
Virgin Islands, British
Virgin Islands, U.S.
Wallis and Futuna
Western Sahara (Ø§ÙØµØØ±Ø§Ø¡ Ø§ÙØºØ±Ø¨ÙØ©)
Yemen (Ø§ÙÙÙ Ù)
Zambia
Zimbabwe
Birthday:
MM/DD/YYYY (e.g. "6/6/2011")
Word Verification:
Type the characters you see in the picture below.
Letters are not case-sensitive
Terms of Service:
Please check the Google Account information you've entered above (feel free to change anything you like), and review the Terms of Service below.
With Gmail, you won't see blinking banner ads. Instead, we display ads you might find useful that are relevant to the content of your messages.
Learn more
Printable Version
ï»¿Google Terms of Service Welcome to Google! 1. Your relationship with Google 1.1 Your use of Googleâs products, software, services and web sites (referred to collectively as the âServicesâ in this document and excluding any services provided to you by Google under a separate written agreement) is subject to the terms of a legal agreement between you and Google. âGoogleâ means Google Inc., whose principal place of business is at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. This document explains how the agreement is made up, and sets out some of the terms of that agreement. 1.2 Unless otherwise agreed in writing with Google, your agreement with Google will always include, at a minimum, the terms and conditions set out in this document. These are referred to below as the âUniversal Termsâ. 1.3 Your agreement with Google will also include the terms of any Legal Notices applicable to the Services, in addition to the Universal Terms. All of these are referred to below as the âAdditional Termsâ. Where Additional Terms apply to a Service, these will be accessible for you to read either within, or through your use of, that Service. 1.4 The Universal Terms, together with the Additional Terms, form a legally binding agreement between you and Google in relation to your use of the Services. It is important that you take the time to read them carefully. Collectively, this legal agreement is referred to below as the âTermsâ. 1.5 If there is any contradiction between what the Additional Terms say and what the Universal Terms say, then the Additional Terms shall take precedence in relation to that Service. 2. Accepting the Terms 2.1 In order to use the Services, you must first agree to the Terms. You may not use the Services if you do not accept the Terms. 2.2 You can accept the Terms by: (A) clicking to accept or agree to the Terms, where this option is made available to you by Google in the user interface for any Service; or (B) by actually using the Services. In this case, you understand and agree that Google will treat your use of the Services as acceptance of the Terms from that point onwards. 2.3 You may not use the Services and may not accept the Terms if (a) you are not of legal age to form a binding contract with Google, or (b) you are a person barred from receiving the Services under the laws of the United States or other countries including the country in which you are resident or from which you use the Services. 2.4 Before you continue, you should print off or save a local copy of the Universal Terms for your records. 3. Language of the Terms 3.1 Where Google has provided you with a translation of the English language version of the Terms, then you agree that the translation is provided for your convenience only and that the English language versions of the Terms will govern your relationship with Google. 3.2 If there is any contradiction between what the English language version of the Terms says and what a translation says, then the English language version shall take precedence. 4. Provision of the Services by Google 4.1 Google has subsidiaries and affiliated legal entities around the world (âSubsidiaries and Affiliatesâ). Sometimes, these companies will be providing the Services to you on behalf of Google itself. You acknowledge and agree that Subsidiaries and Affiliates will be entitled to provide the Services to you. 4.2 Google is constantly innovating in order to provide the best possible experience for its users. You acknowledge and agree that the form and nature of the Services which Google provides may change from time to time without prior notice to you. 4.3 As part of this continuing innovation, you acknowledge and agree that Google may stop (permanently or temporarily) providing the Services (or any features within the Services) to you or to users generally at Googleâs sole discretion, without prior notice to you. You may stop using the Services at any time. You do not need to specifically inform Google when you stop using the Services. 4.4 You acknowledge and agree that if Google disables access to your account, you may be prevented from accessing the Services, your account details or any files or other content which is contained in your account. 4.5 You acknowledge and agree that while Google may not currently have set a fixed upper limit on the number of transmissions you may send or receive through the Services or on the amount of storage space used for the provision of any Service, such fixed upper limits may be set by Google at any time, at Googleâs discretion. 5. Use of the Services by you 5.1 In order to access certain Services, you may be required to provide information about yourself (such as identification or contact details) as part of the registration process for the Service, or as part of your continued use of the Services. You agree that any registration information you give to Google will always be accurate, correct and up to date. 5.2 You agree to use the Services only for purposes that are permitted by (a) the Terms and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). 5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services. 5.4 You agree that you will not engage in any activity that interferes with or disrupts the Services (or the servers and networks which are connected to the Services). 5.5 Unless you have been specifically permitted to do so in a separate agreement with Google, you agree that you will not reproduce, duplicate, copy, sell, trade or resell the Services for any purpose. 5.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the Terms and for the consequences (including any loss or damage which Google may suffer) of any such breach. 6. Your passwords and account security 6.1 You agree and understand that you are responsible for maintaining the confidentiality of passwords associated with any account you use to access the Services. 6.2 Accordingly, you agree that you will be solely responsible to Google for all activities that occur under your account. 6.3 If you become aware of any unauthorized use of your password or of your account, you agree to notify Google immediately at http://www.google.com/support/accounts/bin/answer.py?answer=48601. 7. Privacy and your personal information 7.1 For information about Googleâs data protection practices, please read Googleâs privacy policy at http://www.google.com/privacy.html. This policy explains how Google treats your personal information, and protects your privacy, when you use the Services. 7.2 You agree to the use of your data in accordance with Googleâs privacy policies. 8. Content in the Services 8.1 You understand that all information (such as data files, written text, computer software, music, audio files or other sounds, photographs, videos or other images) which you may have access to as part of, or through your use of, the Services are the sole responsibility of the person from which such content originated. All such information is referred to below as the âContentâ. 8.2 You should be aware that Content presented to you as part of the Services, including but not limited to advertisements in the Services and sponsored Content within the Services may be protected by intellectual property rights which are owned by the sponsors or advertisers who provide that Content to Google (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this Content (either in whole or in part) unless you have been specifically told that you may do so by Google or by the owners of that Content, in a separate agreement. 8.3 Google reserves the right (but shall have no obligation) to pre-screen, review, flag, filter, modify, refuse or remove any or all Content from any Service. For some of the Services, Google may provide tools to filter out explicit sexual content. These tools include the SafeSearch preference settings (see http://www.google.com/help/customize.html#safe). In addition, there are commercially available services and software to limit access to material that you may find objectionable. 8.4 You understand that by using the Services you may be exposed to Content that you may find offensive, indecent or objectionable and that, in this respect, you use the Services at your own risk. 8.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any Content that you create, transmit or display while using the Services and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. 9. Proprietary rights 9.1 You acknowledge and agree that Google (or Googleâs licensors) own all legal right, title and interest in and to the Services, including any intellectual property rights which subsist in the Services (whether those rights happen to be registered or not, and wherever in the world those rights may exist). You further acknowledge that the Services may contain information which is designated confidential by Google and that you shall not disclose such information without Googleâs prior written consent. 9.2 Unless you have agreed otherwise in writing with Google, nothing in the Terms gives you a right to use any of Googleâs trade names, trade marks, service marks, logos, domain names, and other distinctive brand features. 9.3 If you have been given an explicit right to use any of these brand features in a separate written agreement with Google, then you agree that your use of such features shall be in compliance with that agreement, any applicable provisions of the Terms, and Google's brand feature use guidelines as updated from time to time. These guidelines can be viewed online at http://www.google.com/permissions/guidelines.html (or such other URL as Google may provide for this purpose from time to time). 9.4 Other than the limited license set forth in Section 11, Google acknowledges and agrees that it obtains no right, title or interest from you (or your licensors) under these Terms in or to any Content that you submit, post, transmit or display on, or through, the Services, including any intellectual property rights which subsist in that Content (whether those rights happen to be registered or not, and wherever in the world those rights may exist). Unless you have agreed otherwise in writing with Google, you agree that you are responsible for protecting and enforcing those rights and that Google has no obligation to do so on your behalf. 9.5 You agree that you shall not remove, obscure, or alter any proprietary rights notices (including copyright and trade mark notices) which may be affixed to or contained within the Services. 9.6 Unless you have been expressly authorized to do so in writing by Google, you agree that in using the Services, you will not use any trade mark, service mark, trade name, logo of any company or organization in a way that is likely or intended to cause confusion about the owner or authorized user of such marks, names or logos. 10.  This license is for the sole purpose of enabling you to use and enjoy the benefit of the Services as provided by Google, in the manner permitted by the Terms. 10.2 You may not (and you may not permit anyone else to) copy, modify, create a derivative work of, reverse engineer, decompile or otherwise attempt to extract the source code of the Software or any part thereof, unless this is expressly permitted or required by law, or unless you have been specifically told that you may do so by Google, in writing. 10.3 Unless Google has given you specific written permission to do so, you may not assign (or grant a sub-license of) your rights to use the Software, grant a security interest in or over your rights to use the Software, or otherwise transfer any part of your rights to use the Software. 11. Content license from you 11.1 You retain copyright and any other rights you already hold in Content which you submit, post or display on or through, the Services. By submitting, posting or displaying the content you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute any Content which you submit, post or display on or through, the Services. This license is for the sole purpose of enabling Google to display, distribute and promote the Services and may be revoked for certain Services as defined in the Additional Terms of those Services. 11.2 You agree that this license includes a right for Google to make such Content available to other companies, organizations or individuals with whom Google has relationships for the provision of syndicated services, and to use such Content in connection with the provision of those services. 11.3 You understand that Google, in performing the required technical steps to provide the Services to our users, may (a) transmit or distribute your Content over various public networks and in various media; and (b) make such changes to your Content as are necessary to conform and adapt that Content to the technical requirements of connecting networks, devices, services or media. You agree that this license shall permit Google to take these actions. 11.4 You confirm and warrant to Google that you have all the rights, power and authority necessary to grant the above license. 12. Software updates 12.1 The Software which you use may automatically download and install updates from time to time from Google. These updates are designed to improve, enhance and further develop the Services and may take the form of bug fixes, enhanced functions, new software modules and completely new versions. You agree to receive such updates (and permit Google to deliver these to you) as part of your use of the Services. 13. Ending your relationship with Google 13.1 The Terms will continue to apply until terminated by either you or Google as set out below. 13.2 If you want to terminate your legal agreement with Google, you may do so by (a) notifying Google at any time and (b) closing your accounts for all of the Services which you use, where Google has made this option available to you. Your notice should be sent, in writing, to Googleâs address which is set out at the beginning of these Terms. 13.3 Google may at any time, terminate its legal agreement with you if: (A) you have breached any provision of the Terms (or have acted in manner which clearly shows that you do not intend to, or are unable to comply with the provisions of the Terms); or (B) Google is required to do so by law (for example, where the provision of the Services to you is, or becomes, unlawful); or (C) the partner with whom Google offered the Services to you has terminated its relationship with Google or ceased to offer the Services to you; or (D) Google is transitioning to no longer providing the Services to users in the country in which you are resident or from which you use the service; or (E) the provision of the Services to you by Google is, in Googleâs opinion, no longer commercially viable. 13.4 Nothing in this Section shall affect Googleâs rights regarding provision of Services under Section 4 of the Terms. 13.5 When these Terms come to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the Terms have been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 20.7 shall continue to apply to such rights, obligations and liabilities indefinitely. 14. EXCLUSION OF WARRANTIES 14.1 NOTHING IN THESE TERMS, INCLUDING SECTIONS 14 AND 15, SHALL EXCLUDE OR LIMIT GOOGLEâS WARRANTY OR LIABILITY FOR LOSSES WHICH MAY NOT BE LAWFULLY EXCLUDED OR LIMITED BY APPLICABLE LAW. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CERTAIN WARRANTIES OR CONDITIONS OR THE LIMITATION OR EXCLUSION OF LIABILITY FOR LOSS OR DAMAGE CAUSED BY NEGLIGENCE, BREACH OF CONTRACT OR BREACH OF IMPLIED TERMS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES.  15.   16. Copyright and trade mark policies 16.1 It is Googleâs policy to respond to notices of alleged copyright infringement that comply with applicable international intellectual property law (including, in the United States, the Digital Millennium Copyright Act) and to terminating the accounts of repeat infringers. Details of Googleâs policy can be found at http://www.google.com/dmca.html. 16.2 Google operates a trade mark complaints procedure in respect of Googleâs advertising business, details of which can be found at http://www.google.com/tm_complaint.html. 17. Advertisements 17.1 Some of the Services are supported by advertising revenue and may display advertisements and promotions. These advertisements may be targeted to the content of information stored on the Services, queries made through the Services or other information. 17.2 The manner, mode and extent of advertising by Google on the Services are subject to change without specific notice to you. 17.3 In consideration for Google granting you access to and use of the Services, you agree that Google may place such advertising on the Services. 18. Other content 18.1 The Services may include hyperlinks to other web sites or content or resources. Google may have no control over any web sites or resources which are provided by companies or persons other than Google. 18.2 You acknowledge and agree that Google is not responsible for the availability of any such external sites or resources, and does not endorse any advertising, products or other materials on or available from such web sites or resources. 18.3 You acknowledge and agree that Google is not liable for any loss or damage which may be incurred by you as a result of the availability of those external sites or resources, or as a result of any reliance placed by you on the completeness, accuracy or existence of any advertising, products or other materials on, or available from, such web sites or resources. 19. Changes to the Terms 19.1 Google may make changes to the Universal Terms or Additional Terms from time to time. When these changes are made, Google will make a new copy of the Universal Terms available at http://accounts.google.com/TOS?hl=en and any new Additional Terms will be made available to you from within, or through, the affected Services. 19.2 You understand and agree that if you use the Services after the date on which the Universal Terms or Additional Terms have changed, Google will treat your use as acceptance of the updated Universal Terms or Additional Terms. 20. General legal terms 20.1 Sometimes when you use the Services, you may (as a result of, or through your use of the Services) use a service or download a piece of software, or purchase goods, which are provided by another person or company. Your use of these other services, software or goods may be subject to separate terms between you and the company or person concerned. If so, the Terms do not affect your legal relationship with these other companies or individuals. 20.2 The Terms constitute the whole legal agreement between you and Google and govern your use of the Services (but excluding any services which Google may provide to you under a separate written agreement), and completely replace any prior agreements between you and Google in relation to the Services. 20.3 You agree that Google may provide you with notices, including those regarding changes to the Terms, by email, regular mail, or postings on the Services. 20.4 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the Terms (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Googleâs rights and that those rights or remedies will still be available to Google. 20.5 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of these Terms is invalid, then that provision will be removed from the Terms without affecting the rest of the Terms. The remaining provisions of the Terms will continue to be valid and enforceable. 20.6 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the Terms and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the Terms which confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the Terms. 20.7 The Terms, and your relationship with Google under the Terms, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the Terms. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. April 16, 2007
By clicking on 'I accept' below you are agreeing to the
Terms of Service
above and both the
Program Policy
and the
Privacy Policy
.


E - Verify
switch user
5
Notifications (5)
Server Error Reports
3 minutes ago
John Smith
Quisque pulvinar tellus sit amet sem scelerisque tincidunt.
25 minutes ago
Olivia
Quisque pulvinar tellus sit amet sem scelerisque tincidunt.
35 minutes ago
New User Registered
1 hour ago
New Email From John
2 hour ago
View more
Switch To Main Account
Edit Profile
2
Inbox
Calendar
Setting
Log Out
Navigation
Profile
Authorization
Qualifications
National Transcripts
Interim Transcripts
Home
Qualifications
National Qualifications
status:
More Details >>
Awarding Date
Program Level
Overal Class
Certificate No.
Registration No.


Dana Marie Breen
(Old dog. New tricks. See Dana learn.)
Hiya, I'm Dana
Read my Writing
See my Projects
Check out my Resume


PLEASE TRY AGAIN IN A FEW MINUTES.


Hlatshwayo surprised by Buhle's Bafana exclusion
Cape Town - Bafana Bafana captain Thulani Hlatshwayo has revealed that national team coach Molefi Ntseki did not explain why Buhle Mkhwanazi was replaced by Erick Mathoho.
Hlatshwayo had grown accustomed to partnering his Bidvest Wits team-mate in the heart of the Bafana Bafana defence, but fixture congestion seemed to convince Ntseki to bring in Kaizer Chiefs stalwart Mathoho for the clash with Sudan on Sunday.
In the end, the decision seemed to be the correct one as South Africa kept a clean sheet and beat the Falcons of Jediane 1-0 at Orlando Stadium.
"For sure, everyone is important in the team, said Hlatshwayo as quoted by
"Whether I'm playing or not, or Buhle is not around; Thami is not around, as long as (the team does well).
"It's a country, it's not a football club like Bidvest Wits, but we're happy for 'Tower' to have come in, even though the coach didn't really explain why he took Buhle out.

- TeamTalk Media


Qiang Huo
Taste: Aromatic, Bitter, Spicy
Temperature: Warm
Organs: Kidney, Urinary Bladder
Actions: Moves warm qi through the greater yang and governor channels, unblocking painful obstructions and expelling wind--cold
Formulas: Jing Fang Bai Du San


Death Details of Selected patient has already been Added.
Select Patient
*
:
Patient is Required!
Patient Name:
{{SelectedPatient?.ShortName}}
Age:
{{SelectedPatient?.Age}}
Certificate Number
Duplicate Death Certificate Number !
Death Date
*
Enter Death Date
Death Time
*
Enter Death Time


How do
Conflicts
affect
Growth?
Analysing the impact of violence due to conflicts on growth as measured by GDP per capita.
Government Involved
Between Groups
One sided violence
Total Conflict Violence (Number of deaths) - 1989 to 2014
CONFLICT VIOLENCE
How good is this data?
GDP PER CAPITA


{{title}}
Writed by : {{author}}
Published by : {{editor}}
Language : {{lang}}
Format : {{format}}
Disponibility : Available
Disponibility : Unavailable
Borrowed by : {{owner}}
User Rating :
{{commentAuthor[i]}} : {{element}}


CrankyCritic® movie reviews: What Planet Are You From? Rated [R], 105 minutes Starring Garry Shandling, Annette Bening Story by Garry Shandling & Michael Leeson Screenplay by Shandling & Leeson and Ed Solomon and Peter Tolan Directed by Mike Nichols website: www.sony.com/whatplanet/
IN SHORT: "It's Garry Shandling's Movie..."
....which is how the advertising folks should have billed this very funny flick, 'cuz none of 'em obviously watched the damned thing. Thus the ad campaign which implies that an alien being from a planet of men and only men, comes to earth to father a child and save his planet. Nope. The advanced society of said planet wants to conquer earth. It's said so right at the top of the flick, as Star Wars-like background titles roll up the screen. Why making one baby with an earthling would enable these aliens to conquer earth is beyond me, but logic needs no reason in this story, a perfect setup to Garry Shandling's type of reaction humor, which is firing on all cylinders in this flick.
And just forty or fifty years ago, all alien planets were stocked with busty, barely clad women, all desperately in need of a good shtup. Now, in the first Year Zero in a century, we are confronted with the intellectual and technological inhabitants of a Planet we'll call X, all male and all dressed in black and gray Armani suits, looking like the clones that they are. Without women, this society has gone beyond the need for emotions or relationships or the private parts that play such an important part in each.
Thus, H1449-6 (hereafter Harold Anderson) is dispatched to Arizona, USA, to find and knock up one of our own. This being accomplished, their dastardly plan to do away with our various lifestyles would be underway .. . . except that they've sent Garry Shandling. Harold's assignment has him posing as a loan officer at a bank, where an incredibly sleazy co-worker (Greg Kinnear) shows him the ropes of picking up chicks. One chick happens to be Susan Hart (Annette Bening) who has enough problems of her own and has dealt with them by deciding, among other things, not to have sex until she is married. Harold, whose mind is on nothing but procreation, pops the question after one date. From there on in, What Planet... quickly becomes a learning experience for the ET as to what relationships truly mean. Just as director Mike Nichols' The Birdcage wasn't as much about gay life as it was about families, so is What Planet... more about the male/female thing than alien conquest.
OK, we'll forgive the marketing people for this one...
What Planet Are You From? is a Garry Shandling comedy and it delivers all the chuckles you associate with GS, once again taking a concept fit for a trashy TV sitcom (and, yes, I do sorta kinda like 3rd Rock From The Sun, though it took awhile) and elevates it to a level of comedy fit for adults. Any fan knows that Shandling has made an art of creating inept, and intellectually funny, characters. Any fan will not be disappointed. With a very small dose of low-brow humor added to the mix, the folks just looking for a good time will not be disappointed, either.
John Goodman plays the FAA investigator hot on Harold's tail. Teevee faces Nora Dunn, Camryn Manheim play Susan's friends. Ben Kingsley plays Graydon, leader of Planet X (and while July 14 is still months -- and a different movie studio -- away, any X-Men fanboy is going to catch at least two very in jokes at the end of this flick). All are positive reinforcement to the gags.
On average, a first run movie ticket will run you Eight Bucks. Were Cranky able to set his own price to What Planet Are Your From?, he would have paid...
$6.00
If you're not a Shandling fan, What Planet... is still a better than average time in the dark. For those of us that wonder why we should shell out for something that's been done in broad comic strokes on teevee . . . 'cuz it's funny. That's why.
The Cranky Critic® is a Registered Trademark of, and Copyright © 2000 by, Chuck Schwartz. All Rights Reserved. Cranky on the web at www.crankycritic.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


| Opcode/Instruction | Op /En | 64/32 bit Mode Support | CPUID Feature Flag | Description |
|---|---|---|---|---|
| 66 0F C2 /r ib CMPPD xmm1, xmm2/m128, imm8 | RMI | V/V | SSE2 | Compare packed double-precision floating-point values in xmm2/m128 and xmm1 using bits 2:0 of imm8 as a comparison predicate. |
| VEX.NDS.128.66.0F.WIG C2 /r ib VCMPPD xmm1, xmm2, xmm3/m128, imm8 | RVMI | V/V | AVX | Compare packed double-precision floating-point values in xmm3/m128 and xmm2 using bits 4:0 of imm8 as a comparison predicate. |
| VEX.NDS.256.66.0F.WIG C2 /r ib VCMPPD ymm1, ymm2, ymm3/m256, imm8 | RVMI | V/V | AVX | Compare packed double-precision floating-point values in ymm3/m256 and ymm2 using bits 4:0 of imm8 as a comparison predicate. |
| EVEX.NDS.128.66.0F.W1 C2 /r ib VCMPPD k1 {k2}, xmm2, xmm3/m128/m64bcst, imm8 | FV | V/V | AVX512VL AVX512F | Compare packed double-precision floating-point values in xmm3/m128/m64bcst and xmm2 using bits 4:0 of imm8 as a comparison predicate with writemask k2 and leave the result in mask register k1. |
| EVEX.NDS.256.66.0F.W1 C2 /r ib VCMPPD k1 {k2}, ymm2, ymm3/m256/m64bcst, imm8 | FV | V/V | AVX512VL AVX512F | Compare packed double-precision floating-point values in ymm3/m256/m64bcst and ymm2 using bits 4:0 of imm8 as a comparison predicate with writemask k2 and leave the result in mask register k1. |
| EVEX.NDS.512.66.0F.W1 C2 /r ib VCMPPD k1 {k2}, zmm2, zmm3/m512/m64bcst{sae}, imm8 | FV | V/V | AVX512F | Compare packed double-precision floating-point values in zmm3/m512/m64bcst and zmm2 using bits 4:0 of imm8 as a comparison predicate with writemask k2 and leave the result in mask register k1. |
| Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
| RMI | ModRM:reg (r, w) | ModRM:r/m (r) | Imm8 | NA |
| RVMI | ModRM:reg (w) | VEX.vvvv | ModRM:r/m (r) | Imm8 |
| FV | ModRM:reg (w) | EVEX.vvvv | ModRM:r/m (r) | Imm8 |
Performs a SIMD compare of the packed double-precision floating-point values in the second source operand and the first source operand and returns the results of the comparison to the destination operand. The comparison predicate operand (immediate byte) specifies the type of comparison performed on each pair of packed values in the two source operands.
EVEX encoded versions: The first source operand (second operand) is a ZMM/YMM/XMM register. The second source operand can be a ZMM/YMM/XMM register, a 512/256/128-bit memory location or a 512/256/128-bit vector broadcasted from a 64-bit memory location. The destination operand (first operand) is an opmask register. Comparison results are written to the destination operand under the writemask k2. Each comparison result is a single mask bit of 1 (comparison true) or 0 (comparison false).
VEX.256 encoded version: The first source operand (second operand) is a YMM register. The second source operand (third operand) can be a YMM register or a 256-bit memory location. The destination operand (first operand) is a YMM register. Four comparisons are performed with results written to the destination operand. The result of each comparison is a quadword mask of all 1s (comparison true) or all 0s (comparison false).
128-bit Legacy SSE version: The first source and destination operand (first operand) is an XMM register. The second source operand (second operand) can be an XMM register or 128-bit memory location. Bits (MAX_VL-1:128) of the corresponding ZMM destination register remain unchanged. Two comparisons are performed with results written to bits 127:0 of the destination operand. The result of each comparison is a quadword mask of all 1s (comparison true) or all 0s (comparison false).
VEX.128 encoded version: The first source operand (second operand) is an XMM register. The second source operand (third operand) can be an XMM register or a 128-bit memory location. Bits (MAX_VL-1:128) of the desti-nation ZMM register are zeroed. Two comparisons are performed with results written to bits 127:0 of the destina-tion operand.
The comparison predicate operand is an 8-bit immediate:
| Predicate |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
|---|---|---|---|---|---|---|---|
|
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
A >B | A < B | A = B | Unordered1 | #IA on QNAN | |
| EQ_OQ (EQ) | 0H | Equal (ordered, non-signaling) | False | False | True | False | No |
| LT_OS (LT) | 1H | Less-than (ordered, signaling) | False | True | False | False | Yes |
| LE_OS (LE) | 2H | Less-than-or-equal (ordered, signaling) | False | True | True | False | Yes |
| UNORD_Q (UNORD) | 3H | Unordered (non-signaling) | False | False | False | True | No |
| NEQ_UQ (NEQ) | 4H | Not-equal (unordered, non-signaling) | True | True | False | True | No |
| NLT_US (NLT) | 5H | Not-less-than (unordered, signaling) | True | False | True | True | Yes |
| NLE_US (NLE) | 6H | Not-less-than-or-equal (unordered, signaling) | True | False | False | True | Yes |
| ORD_Q (ORD) | 7H | Ordered (non-signaling) | True | True | True | False | No |
| EQ_UQ | 8H | Equal (unordered, non-signaling) | False | False | True | True | No |
| NGE_US (NGE) | 9H | Not-greater-than-or-equal (unordered, signaling) | False | True | False | True | Yes |
| NGT_US (NGT) | AH | Not-greater-than (unordered, signaling) | False | True | True | True | Yes |
| FALSE_OQ(FALSE) | BH | False (ordered, non-signaling) | False | False | False | False | No |
| NEQ_OQ | CH | Not-equal (ordered, non-signaling) | True | True | False | False | No |
| GE_OS (GE) | DH | Greater-than-or-equal (ordered, signaling) | True | False | True | False | Yes |
| GT_OS (GT) | EH | Greater-than (ordered, signaling) | True | False | False | False | Yes |
| TRUE_UQ(TRUE) | FH | True (unordered, non-signaling) | True | True | True | True | No |
| EQ_OS | 10H | Equal (ordered, signaling) | False | False | True | False | Yes |
| LT_OQ | 11H | Less-than (ordered, nonsignaling) | False | True | False | False | No |
| LE_OQ | 12H | Less-than-or-equal (ordered, nonsignaling) | False | True | True | False | No |
| UNORD_S | 13H | Unordered (signaling) | False | False | False | True | Yes |
| NEQ_US | 14H | Not-equal (unordered, signaling) | True | True | False | True | Yes |
| NLT_UQ | 15H | Not-less-than (unordered, nonsignaling) | True | False | True | True | No |
| NLE_UQ | 16H | Not-less-than-or-equal (unordered, nonsig-naling) | True | False | False | True | No |
| ORD_S | 17H | Ordered (signaling) | True | True | True | False | Yes |
| EQ_US | 18H | Equal (unordered, signaling) | False | False | True | True | Yes |
| NGE_UQ | 19H | Not-greater-than-or-equal (unordered, non-signaling) | False | True | False | True | No |
| Predicate |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
|---|---|---|---|---|---|---|---|
|
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
imm8 Description Result: A Is 1st Operand, B Is 2nd Operand Signals Value |
A >B | A < B | A = B | Unordered1 | #IA on QNAN | |
| NGT_UQ | 1AH | Not-greater-than (unordered, nonsignaling) | False | True | True | True | No |
| FALSE_OS | 1BH | False (ordered, signaling) | False | False | False | False | Yes |
| NEQ_OS | 1CH | Not-equal (ordered, signaling) | True | True | False | False | Yes |
| GE_OQ | 1DH | Greater-than-or-equal (ordered, nonsignal-ing) | True | False | True | False | No |
| GT_OQ | 1EH | Greater-than (ordered, nonsignaling) | True | False | False | False | No |
| TRUE_US | 1FH | True (unordered, signaling) | True | True | True | True | Yes |
NOTES: 1. If either operand A or B is a NAN.
The unordered relationship is true when at least one of the two source operands being compared is a NaN; the ordered relationship is true when neither source operand is a NaN.
A subsequent computational instruction that uses the mask result in the destination operand as an input operand will not generate an exception, because a mask of all 0s corresponds to a floating-point value of +0.0 and a mask of all 1s corresponds to a QNaN.
Note that processors with “CPUID.1H:ECX.AVX =0” do not implement the “greater-than”, “greater-than-or-equal”, “not-greater than”, and “not-greater-than-or-equal relations” predicates. These comparisons can be made either by using the inverse relationship (that is, use the “not-less-than-or-equal” to make a “greater-than” comparison) or by using software emulation. When using software emulation, the program must swap the operands (copying registers when necessary to protect the data that will now be in the destination), and then perform the compare using a different predicate. The predicate to be used for these emulations is listed in the first 8 rows of Table 3-7 (Intel 64 and IA-32 Architectures Software Developer’s Manual Volume 2A) under the heading Emulation.
Compilers and assemblers may implement the following two-operand pseudo-ops in addition to the three-operand CMPPD instruction, for processors with “CPUID.1H:ECX.AVX =0”. See Table 3-2. Compiler should treat reserved Imm8 values as illegal syntax.
:
| Pseudo-Op | CMPPD Implementation |
|---|---|
| CMPEQPD xmm1, xmm2 | CMPPD xmm1, xmm2, 0 |
| CMPLTPD xmm1, xmm2 | CMPPD xmm1, xmm2, 1 |
| CMPLEPD xmm1, xmm2 | CMPPD xmm1, xmm2, 2 |
| CMPUNORDPD xmm1, xmm2 | CMPPD xmm1, xmm2, 3 |
| CMPNEQPD xmm1, xmm2 | CMPPD xmm1, xmm2, 4 |
| CMPNLTPD xmm1, xmm2 | CMPPD xmm1, xmm2, 5 |
| CMPNLEPD xmm1, xmm2 | CMPPD xmm1, xmm2, 6 |
| CMPORDPD xmm1, xmm2 | CMPPD xmm1, xmm2, 7 |
The greater-than relations that the processor does not implement require more than one instruction to emulate in software and therefore should not be implemented as pseudo-ops. (For these, the programmer should reverse the operands of the corresponding less than relations and use move instructions to ensure that the mask is moved to the correct destination register and that the source operand is left intact.)
Processors with “CPUID.1H:ECX.AVX =1” implement the full complement of 32 predicates shown in Table 3-3, soft-ware emulation is no longer needed. Compilers and assemblers may implement the following three-operand pseudo-ops in addition to the four-operand VCMPPD instruction. See Table 3-3, where the notations of reg1 reg2, and reg3 represent either XMM registers or YMM registers. Compiler should treat reserved Imm8 values as illegal
syntax. Alternately, intrinsics can map the pseudo-ops to pre-defined constants to support a simpler intrinsic inter-face. Compilers and assemblers may implement three-operand pseudo-ops for EVEX encoded VCMPPD instructions in a similar fashion by extending the syntax listed in Table 3-3.
:
| Pseudo-Op | CMPPD Implementation |
|---|---|
| VCMPEQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 0 |
| VCMPLTPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 1 |
| VCMPLEPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 2 |
| VCMPUNORDPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 3 |
| VCMPNEQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 4 |
| VCMPNLTPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 5 |
| VCMPNLEPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 6 |
| VCMPORDPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 7 |
| VCMPEQ_UQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 8 |
| VCMPNGEPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 9 |
| VCMPNGTPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 0AH |
| VCMPFALSEPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 0BH |
| VCMPNEQ_OQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 0CH |
| VCMPGEPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 0DH |
| VCMPGTPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 0EH |
| VCMPTRUEPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 0FH |
| VCMPEQ_OSPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 10H |
| VCMPLT_OQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 11H |
| VCMPLE_OQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 12H |
| VCMPUNORD_SPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 13H |
| VCMPNEQ_USPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 14H |
| VCMPNLT_UQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 15H |
| VCMPNLE_UQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 16H |
| VCMPORD_SPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 17H |
| VCMPEQ_USPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 18H |
| VCMPNGE_UQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 19H |
| VCMPNGT_UQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 1AH |
| VCMPFALSE_OSPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 1BH |
| VCMPNEQ_OSPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 1CH |
| VCMPGE_OQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 1DH |
| VCMPGT_OQPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 1EH |
| VCMPTRUE_USPD reg1, reg2, reg3 | VCMPPD reg1, reg2, reg3, 1FH |
CASE (COMPARISON PREDICATE) OF 0: OP3 (cid:197) EQ_OQ; OP5 (cid:197) EQ_OQ; 1: OP3 (cid:197) LT_OS; OP5 (cid:197) LT_OS; 2: OP3 (cid:197) LE_OS; OP5 (cid:197) LE_OS; 3: OP3 (cid:197) UNORD_Q; OP5 (cid:197) UNORD_Q; 4: OP3 (cid:197) NEQ_UQ; OP5 (cid:197) NEQ_UQ; 5: OP3 (cid:197) NLT_US; OP5 (cid:197) NLT_US; 6: OP3 (cid:197) NLE_US; OP5 (cid:197) NLE_US; 7: OP3 (cid:197) ORD_Q; OP5 (cid:197) ORD_Q; 8: OP5 (cid:197) EQ_UQ; 9: OP5 (cid:197) NGE_US; 10: OP5 (cid:197) NGT_US; 11: OP5 (cid:197) FALSE_OQ; 12: OP5 (cid:197) NEQ_OQ; 13: OP5 (cid:197) GE_OS; 14: OP5 (cid:197) GT_OS; 15: OP5 (cid:197) TRUE_UQ; 16: OP5 (cid:197) EQ_OS; 17: OP5 (cid:197) LT_OQ; 18: OP5 (cid:197) LE_OQ; 19: OP5 (cid:197) UNORD_S; 20: OP5 (cid:197) NEQ_US; 21: OP5 (cid:197) NLT_UQ; 22: OP5 (cid:197) NLE_UQ; 23: OP5 (cid:197) ORD_S; 24: OP5 (cid:197) EQ_US; 25: OP5 (cid:197) NGE_UQ; 26: OP5 (cid:197) NGT_UQ; 27: OP5 (cid:197) FALSE_OS; 28: OP5 (cid:197) NEQ_OS; 29: OP5 (cid:197) GE_OQ; 30: OP5 (cid:197) GT_OQ; 31: OP5 (cid:197) TRUE_US; DEFAULT: Reserved; ESAC;
VCMPPD (EVEX encoded versions)
(KL, VL) = (2, 128), (4, 256), (8, 512) FOR j (cid:197) 0 TO KL-1 i (cid:197) j * 64 IF k2[j] OR *no writemask* THEN IF (EVEX.b = 1) AND (SRC2 *is memory*) THEN CMP (cid:197) SRC1[i+63:i] OP5 SRC2[63:0] ELSE CMP (cid:197) SRC1[i+63:i] OP5 SRC2[i+63:i] FI; IF CMP = TRUE THEN DEST[j] (cid:197) 1; ELSE DEST[j] (cid:197) 0; FI; ELSE DEST[j] (cid:197) 0 ; zeroing-masking only FI; ENDFOR DEST[MAX_KL-1:KL] (cid:197) 0
VCMPPD (VEX.256 encoded version)
CMP0 (cid:197) SRC1[63:0] OP5 SRC2[63:0]; CMP1 (cid:197) SRC1[127:64] OP5 SRC2[127:64]; CMP2 (cid:197) SRC1[191:128] OP5 SRC2[191:128]; CMP3 (cid:197) SRC1[255:192] OP5 SRC2[255:192]; IF CMP0 = TRUE THEN DEST[63:0] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[63:0] (cid:197)<PHONE_NUMBER>000000H; FI; IF CMP1 = TRUE THEN DEST[127:64] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[127:64] (cid:197)<PHONE_NUMBER>000000H; FI; IF CMP2 = TRUE THEN DEST[191:128] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[191:128] (cid:197)<PHONE_NUMBER>000000H; FI; IF CMP3 = TRUE THEN DEST[255:192] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[255:192] (cid:197)<PHONE_NUMBER>000000H; FI; DEST[MAX_VL-1:256] (cid:197) 0
VCMPPD (VEX.128 encoded version)
CMP0 (cid:197) SRC1[63:0] OP5 SRC2[63:0]; CMP1 (cid:197) SRC1[127:64] OP5 SRC2[127:64]; IF CMP0 = TRUE THEN DEST[63:0] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[63:0] (cid:197)<PHONE_NUMBER>000000H; FI; IF CMP1 = TRUE THEN DEST[127:64] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[127:64] (cid:197)<PHONE_NUMBER>000000H; FI; DEST[MAX_VL-1:128] (cid:197) 0
CMPPD (128-bit Legacy SSE version)
CMP0 (cid:197) SRC1[63:0] OP3 SRC2[63:0]; CMP1 (cid:197) SRC1[127:64] OP3 SRC2[127:64]; IF CMP0 = TRUE THEN DEST[63:0] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[63:0] (cid:197)<PHONE_NUMBER>000000H; FI; IF CMP1 = TRUE THEN DEST[127:64] (cid:197) FFFFFFFFFFFFFFFFH; ELSE DEST[127:64] (cid:197)<PHONE_NUMBER>000000H; FI; DEST[MAX_VL-1:128] (Unmodified)
VCMPPD __mmask8 _mm512_cmp_pd_mask( __m512d a, __m512d b, int imm);
VCMPPD __mmask8 _mm512_cmp_round_pd_mask( __m512d a, __m512d b, int imm, int sae);
VCMPPD __mmask8 _mm512_mask_cmp_pd_mask( __mmask8 k1, __m512d a, __m512d b, int imm);
VCMPPD __mmask8 _mm512_mask_cmp_round_pd_mask( __mmask8 k1, __m512d a, __m512d b, int imm, int sae);
VCMPPD __mmask8 _mm256_cmp_pd_mask( __m256d a, __m256d b, int imm);
VCMPPD __mmask8 _mm256_mask_cmp_pd_mask( __mmask8 k1, __m256d a, __m256d b, int imm);
VCMPPD __mmask8 _mm_cmp_pd_mask( __m128d a, __m128d b, int imm);
VCMPPD __mmask8 _mm_mask_cmp_pd_mask( __mmask8 k1, __m128d a, __m128d b, int imm);
VCMPPD __m256 _mm256_cmp_pd(__m256d a, __m256d b, int imm)
(V)CMPPD __m128 _mm_cmp_pd(__m128d a, __m128d b, int imm)
Invalid if SNaN operand and invalid if QNaN and predicate as listed in Table 3-1.
Denormal
| VEX-encoded instructions, see Exceptions Type 2. |
| EVEX-encoded instructions, see Exceptions Type E2. |