code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE590_Free_Memory_Not_on_Heap__free_struct_declare_31.c Label Definition File: CWE590_Free_Memory_Not_on_Heap__free.label.xml Template File: sources-sink-31.tmpl.c */ /* * @description * CWE: 590 Free Memory Not on Heap * BadSource: declare Data buffer is declared on the stack * GoodSource: Allocate memory on the heap * Sinks: * BadSink : Print then free data * Flow Variant: 31 Data flow using a copy of data within the same function * * */ #include "std_testcase.h" #include <wchar.h> #ifndef OMITBAD void CWE590_Free_Memory_Not_on_Heap__free_struct_declare_31_bad() { twoIntsStruct * data; data = NULL; /* Initialize data */ { /* FLAW: data is allocated on the stack and deallocated in the BadSink */ twoIntsStruct dataBuffer[100]; { size_t i; for (i = 0; i < 100; i++) { dataBuffer[i].intOne = 1; dataBuffer[i].intTwo = 1; } } data = dataBuffer; } { twoIntsStruct * dataCopy = data; twoIntsStruct * data = dataCopy; printStructLine(&data[0]); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B() uses the GoodSource with the BadSink */ static void goodG2B() { twoIntsStruct * data; data = NULL; /* Initialize data */ { /* FIX: data is allocated on the heap and deallocated in the BadSink */ twoIntsStruct * dataBuffer = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct)); if (dataBuffer == NULL) { printLine("malloc() failed"); exit(1); } { size_t i; for (i = 0; i < 100; i++) { dataBuffer[i].intOne = 1; dataBuffer[i].intTwo = 1; } } data = dataBuffer; } { twoIntsStruct * dataCopy = data; twoIntsStruct * data = dataCopy; printStructLine(&data[0]); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } } void CWE590_Free_Memory_Not_on_Heap__free_struct_declare_31_good() { goodG2B(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE590_Free_Memory_Not_on_Heap__free_struct_declare_31_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE590_Free_Memory_Not_on_Heap__free_struct_declare_31_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE590_Free_Memory_Not_on_Heap/s05/CWE590_Free_Memory_Not_on_Heap__free_struct_declare_31.c
C
bsd-3-clause
3,222
/*========================================================================= medInria Copyright (c) INRIA 2013 - 2014. All rights reserved. See LICENSE.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =========================================================================*/ #pragma once #include <QtCore> #include <medAbstractWorkspace.h> class medFilteringWorkspacePrivate; class medViewContainerStack; class medAbstractData; class dtkAbstractView; /** * @brief Workspace providing a comparative display of the input and output of image-to-image filtering process plugins */ class medFilteringWorkspace : public medAbstractWorkspace { Q_OBJECT MED_WORKSPACE_INTERFACE("Filtering", "Filtering workspace.") public: medFilteringWorkspace(QWidget *parent = 0); ~medFilteringWorkspace(); static bool isUsable(); void setupViewContainerStack (); virtual void open(const medDataIndex &index); signals: /** * @brief signal emitted to refresh the output view with the data resulting from a successful filtering process * * This is a connection between the medFilteringSelectorToolBox and the medFilteringViewContainer which displays input/output images * */ void outputDataChanged ( medAbstractData * ); protected slots: void changeToolBoxInput(); void onProcessSuccess(); private: medFilteringWorkspacePrivate *d; };
rdebroiz/medInria-public
app/medInria/medFilteringWorkspace.h
C
bsd-3-clause
1,552
<?php use yii\db\Schema; use yii\db\Migration; class m151105_184316_video extends Migration { public function up() { $this->execute('ALTER TABLE galaxysss_5.rod_article_list ADD video VARCHAR(255) NULL;'); } public function down() { echo "m151105_184316_video cannot be reverted.\n"; return false; } /* // Use safeUp/safeDown to run migration code within a transaction public function safeUp() { } public function safeDown() { } */ }
dram1008/tpk
migrations/m151105_184316_video.php
PHP
bsd-3-clause
524
/* * $Id$ */ /* Copyright (c) 2000-2003 Board of Trustees of Leland Stanford Jr. University, all rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Stanford University shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Stanford University. */ package org.lockss.util; import java.util.*; import org.lockss.test.*; /** * This is the test class for org.lockss.util.Interval */ public class TestInterval extends LockssTestCase { Interval int01; Interval int12; Interval int13; Interval int24; public void setUp() throws Exception { int01 = new Interval(0,1); int12 = new Interval(1,2); int13 = new Interval(1,3); int24 = new Interval(2,4); } public void testIsBefore() { assertTrue(int01.isBefore(int12)); assertFalse(int12.isBefore(int01)); assertFalse(int13.isBefore(int24)); } public void testIsDisjoint() { assertTrue(int01.isDisjoint(int12)); assertTrue(int01.isDisjoint(int24)); assertFalse(int12.isDisjoint(int13)); assertFalse(int13.isDisjoint(int24)); } public void testSubsumes() { assertTrue(int13.subsumes(int12)); assertTrue(int13.subsumes(int13)); assertFalse(int12.subsumes(int13)); assertFalse(int01.subsumes(int24)); } public void testContains() { assertFalse(int13.contains(new Integer(0))); assertTrue(int13.contains(new Integer(1))); assertTrue(int13.contains(new Integer(2))); assertFalse(int13.contains(new Integer(3))); } public void testEquals() { assertFalse(int01.equals(int12)); assertFalse(int12.equals(int13)); assertFalse(int12.equals(new Interval(0, 2))); assertTrue(int01.equals(int01)); assertTrue(int13.equals(new Interval(1, 3))); } public void testHash() { assertEquals(new Interval(2,4).hashCode(), new Interval(2,4).hashCode()); } }
lockss/lockss-daemon
test/src/org/lockss/util/TestInterval.java
Java
bsd-3-clause
2,944
# -*- coding: utf-8 -*- from __future__ import with_statement from cms.api import create_page, create_title from cms.apphook_pool import apphook_pool from cms.appresolver import (applications_page_check, clear_app_resolvers, get_app_patterns) from cms.test_utils.testcases import CMSTestCase from cms.test_utils.util.context_managers import SettingsOverride from django.contrib.auth.models import User from django.core.urlresolvers import clear_url_caches, reverse import sys APP_NAME = 'SampleApp' APP_MODULE = "cms.test_utils.project.sampleapp.cms_app" class ApphooksTestCase(CMSTestCase): def setUp(self): clear_app_resolvers() clear_url_caches() if APP_MODULE in sys.modules: del sys.modules[APP_MODULE] def tearDown(self): clear_app_resolvers() clear_url_caches() if APP_MODULE in sys.modules: del sys.modules[APP_MODULE] def test_explicit_apphooks(self): """ Test explicit apphook loading with the CMS_APPHOOKS setting. """ apphooks = ( '%s.%s' % (APP_MODULE, APP_NAME), ) with SettingsOverride(CMS_APPHOOKS=apphooks): apphook_pool.clear() hooks = apphook_pool.get_apphooks() app_names = [hook[0] for hook in hooks] self.assertEqual(len(hooks), 1) self.assertEqual(app_names, [APP_NAME]) apphook_pool.clear() def test_implicit_apphooks(self): """ Test implicit apphook loading with INSTALLED_APPS + cms_app.py """ apps = ['cms.test_utils.project.sampleapp'] with SettingsOverride(INSTALLED_APPS=apps, ROOT_URLCONF='cms.test_utils.project.urls_for_apphook_tests'): apphook_pool.clear() hooks = apphook_pool.get_apphooks() app_names = [hook[0] for hook in hooks] self.assertEqual(len(hooks), 1) self.assertEqual(app_names, [APP_NAME]) apphook_pool.clear() def test_apphook_on_root(self): with SettingsOverride(ROOT_URLCONF='cms.test_utils.project.urls_for_apphook_tests'): apphook_pool.clear() superuser = User.objects.create_superuser('admin', '[email protected]', 'admin') page = create_page("apphooked-page", "nav_playground.html", "en", created_by=superuser, published=True, apphook="SampleApp") blank_page = create_page("not-apphooked-page", "nav_playground.html", "en", created_by=superuser, published=True, apphook="", slug='blankapp') english_title = page.title_set.all()[0] self.assertEquals(english_title.language, 'en') create_title("de", "aphooked-page-de", page, apphook="SampleApp") self.assertTrue(page.publish()) self.assertTrue(blank_page.publish()) response = self.client.get(self.get_pages_root()) self.assertTemplateUsed(response, 'sampleapp/home.html') response = self.client.get('/en/blankapp/') self.assertTemplateUsed(response, 'nav_playground.html') apphook_pool.clear() def test_get_page_for_apphook(self): with SettingsOverride(ROOT_URLCONF='cms.test_utils.project.second_urls_for_apphook_tests'): apphook_pool.clear() superuser = User.objects.create_superuser('admin', '[email protected]', 'admin') page = create_page("home", "nav_playground.html", "en", created_by=superuser, published=True) create_title('de', page.get_title(), page) child_page = create_page("child_page", "nav_playground.html", "en", created_by=superuser, published=True, parent=page) create_title('de', child_page.get_title(), child_page) child_child_page = create_page("child_child_page", "nav_playground.html", "en", created_by=superuser, published=True, parent=child_page, apphook='SampleApp') create_title("de", child_child_page.get_title(), child_child_page, apphook='SampleApp') child_child_page.publish() # publisher_public is set to draft on publish, issue with onetoone reverse child_child_page = self.reload(child_child_page) en_title = child_child_page.publisher_public.get_title_obj('en') path = reverse('en:sample-settings') request = self.get_request(path) request.LANGUAGE_CODE = 'en' attached_to_page = applications_page_check(request, path=path[1:]) # strip leading slash self.assertEquals(attached_to_page.pk, en_title.page.pk) response = self.client.get(path) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'sampleapp/home.html') self.assertContains(response, en_title.title) de_title = child_child_page.publisher_public.get_title_obj('de') path = reverse('de:sample-settings') request = self.get_request(path) request.LANGUAGE_CODE = 'de' attached_to_page = applications_page_check(request, path=path[4:]) # strip leading slash and language prefix self.assertEquals(attached_to_page.pk, de_title.page.pk) response = self.client.get(path) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'sampleapp/home.html') self.assertContains(response, de_title.title) apphook_pool.clear() def test_include_urlconf(self): with SettingsOverride(ROOT_URLCONF='cms.test_utils.project.second_urls_for_apphook_tests'): apphook_pool.clear() superuser = User.objects.create_superuser('admin', '[email protected]', 'admin') page = create_page("home", "nav_playground.html", "en", created_by=superuser, published=True) create_title('de', page.get_title(), page) child_page = create_page("child_page", "nav_playground.html", "en", created_by=superuser, published=True, parent=page) create_title('de', child_page.get_title(), child_page) child_child_page = create_page("child_child_page", "nav_playground.html", "en", created_by=superuser, published=True, parent=child_page, apphook='SampleApp') create_title("de", child_child_page.get_title(), child_child_page, apphook='SampleApp') child_child_page.publish() path = reverse('extra_second') response = self.client.get(path) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'sampleapp/extra.html') self.assertContains(response, "test included urlconf") path = reverse('extra_first') response = self.client.get(path) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'sampleapp/extra.html') self.assertContains(response, "test urlconf") path = reverse('de:extra_first') response = self.client.get(path) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'sampleapp/extra.html') self.assertContains(response, "test urlconf") path = reverse('de:extra_second') response = self.client.get(path) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, 'sampleapp/extra.html') self.assertContains(response, "test included urlconf") apphook_pool.clear() def test_apphook_breaking_under_home_with_new_path_caching(self): with SettingsOverride(CMS_MODERATOR=False, CMS_PERMISSION=False): home = create_page("home", "nav_playground.html", "en", published=True) child = create_page("child", "nav_playground.html", "en", published=True, parent=home) # not-home is what breaks stuff, because it contains the slug of the home page not_home = create_page("not-home", "nav_playground.html", "en", published=True, parent=child) create_page("subchild", "nav_playground.html", "en", published=True, parent=not_home, apphook='SampleApp') urlpatterns = get_app_patterns() resolver = urlpatterns[0] url = resolver.reverse('sample-root') self.assertEqual(url, 'child/not-home/subchild/')
vipins/ccccms
env/Lib/site-packages/cms/tests/apphooks.py
Python
bsd-3-clause
8,883
# encoding: utf-8 require 'ostruct' require_relative '../../../app/models/overlay/presenter' require 'json' include CartoDB describe Overlay::Presenter do describe '#to_poro' do it 'renders a hash representation of an overlay' do overlay = OpenStruct.new( order: 1, type: 'zoom', options: {} ) representation = Overlay::Presenter.new(overlay).to_poro representation.fetch(:order) .should == overlay.order representation.fetch(:type) .should == overlay.type representation.fetch(:options) .should == overlay.options end end #to_poro end # CartoDB
comilla/map
spec/models/overlay/presenter_spec.rb
Ruby
bsd-3-clause
640
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="de"> <context> <name>AppDialog</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/AppDialog.ui" line="14"/> <source>Select Application</source> <translation>Anwendung auswählen</translation> </message> </context> <context> <name>ColorDialog</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="14"/> <source>Color Scheme Editor</source> <translation>Farbschemaeditor</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="28"/> <source>Color Scheme:</source> <translation>Farbschema:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="51"/> <source>Set new color for selection</source> <translation>Neue Farbe für Auswahl</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="54"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="70"/> <source>...</source> <translation>...</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="67"/> <source>Manually set value for selection</source> <translation>Manuell festgelegter Wert für Auswahl</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="95"/> <source>Color</source> <translation>Farbe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="100"/> <source>Value</source> <translation>Wert</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="105"/> <source>Sample</source> <translation>Muster</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="115"/> <source>Cancel</source> <translation>Abbrechen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.ui" line="135"/> <source>Save</source> <translation>Speichern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.cpp" line="98"/> <source>Color Exists</source> <translation>Farbe existiert</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.cpp" line="98"/> <source>This color scheme already exists. Overwrite it?</source> <translation>Dieses Farbschema existiert bereits. Überschreiben?</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.cpp" line="121"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.cpp" line="122"/> <source>Select Color</source> <translation>Farbe auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.cpp" line="142"/> <source>Color Value</source> <translation>Farbwert</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ColorDialog.cpp" line="142"/> <source>Color:</source> <translation>Farbe:</translation> </message> </context> <context> <name>GetPluginDialog</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/GetPluginDialog.ui" line="14"/> <source>Select Plugin</source> <translation>Plugin auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/GetPluginDialog.ui" line="26"/> <source>Select a Plugin:</source> <translation>Ein Plugin auswählen:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/GetPluginDialog.ui" line="57"/> <source>Cancel</source> <translation>Abbrechen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/GetPluginDialog.ui" line="77"/> <source>Select</source> <translation>Auswählen</translation> </message> </context> <context> <name>PanelWidget</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="32"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="93"/> <source>Location</source> <translation>Standort</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="114"/> <source>Edge:</source> <translation>Kante:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="131"/> <source>Size:</source> <translation>Größe:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="138"/> <source> pixel(s) thick</source> <translation> Pixel breit</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="157"/> <source>% length</source> <translation>% Länge</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="183"/> <source>Alignment:</source> <translation>Ausrichtung:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="204"/> <source>Appearance</source> <translation>Erscheinungsbild</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="222"/> <source>Auto-hide Panel</source> <translation>Leiste automatisch ausblenden</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="229"/> <source>Use Custom Color</source> <translation>Benutzerdefinierte Farben verwenden</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="250"/> <source>...</source> <translation>...</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="257"/> <source>Sample</source> <translation>Beispiel</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.ui" line="287"/> <source>Plugins</source> <translation>Erweiterungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="19"/> <source>Top/Left</source> <translation>Oben/Links</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="20"/> <source>Center</source> <translation>Mitte</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="21"/> <source>Bottom/Right</source> <translation>Unten/Rechts</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="22"/> <source>Top</source> <translation>Oben</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="23"/> <source>Bottom</source> <translation>Unten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="24"/> <source>Left</source> <translation>Links</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="25"/> <source>Right</source> <translation>Rechts</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="44"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="104"/> <source>Panel %1</source> <translation>Leiste %1</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="144"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/PanelWidget.cpp" line="145"/> <source>Select Color</source> <translation>Farbe auswählen</translation> </message> </context> <context> <name>QObject</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="80"/> <source>Desktop Bar</source> <translation>Schreibtischleiste</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="81"/> <source>This provides shortcuts to everything in the desktop folder - allowing easy access to all your favorite files/applications.</source> <translation>Dies bietet Verknüpfungen zu allem was auf dem Schreibtisch liegt - ermöglicht einfachen Zugang zu all Ihren favorisierten Dateien/Anwendungen.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="87"/> <source>Spacer</source> <translation>Abstand</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="88"/> <source>Invisible spacer to separate plugins.</source> <translation>Unsichtbarer Abstandshalter zu seperaten Plugins.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="102"/> <source>Controls for switching between the various virtual desktops.</source> <translation>Steuerung zum Wechseln zwischen den verschieden virtuellen Arbeitsflächen.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="108"/> <source>Battery Monitor</source> <translation>Akku-Überwachung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="109"/> <source>Keep track of your battery status.</source> <translation>Übersicht über den Status Ihres Akkus behalten.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="115"/> <source>Time/Date</source> <translation>Zeit/Datum</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="116"/> <source>View the current time and date.</source> <translation>Aktuelle Zeit und Datum anzeigen.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="122"/> <source>System Dashboard</source> <translation>Übersichtsseite des Systems</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="123"/> <source>View or change system settings (audio volume, screen brightness, battery life, virtual desktops).</source> <translation>Zeigen oder Ändern der Einstellungen des Systems (Lautstärke, Bildschirmhelligkeit, Akkuzustand, virtuelle Arbeitsflächen).</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="129"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="277"/> <source>Task Manager</source> <translation>Prozeßverwaltung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="136"/> <source>Task Manager (No Groups)</source> <translation>Prozessverwaltung (keine Gruppen)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="143"/> <source>System Tray</source> <translation>Benachrichtigungsfeld</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="144"/> <source>Display area for dockable system applications</source> <translation>Fläche zum Anzeigen der anknüpfbaren System-Anwendungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="151"/> <source>Hide all open windows and show the desktop</source> <translation>Verstecke alle offenen Fenster und zeige Schreibtisch</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="157"/> <source>Start Menu</source> <translation>Startmenü</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="176"/> <source>Calendar</source> <translation>Kalender</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="177"/> <source>Display a calendar on the desktop</source> <translation>Anzeigen eines Kalenders auf der Arbeitsfläche</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="164"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="183"/> <source>Application Launcher</source> <translation>Anwendungsstarter</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="66"/> <source>User Menu</source> <translation>Benutzermenü</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="67"/> <source>Start menu alternative focusing on the user&apos;s files, directories, and favorites.</source> <translation>Startmenüalternative, die Benutzerdateien, Verzeichnisse und Lesezeichen fokussiert.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="73"/> <source>Application Menu</source> <translation>Anwendungsmenü</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="74"/> <source>Start menu alternative which focuses on launching applications.</source> <translation>Startmenüalternative, die startende Anwendungen fokussiert.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="94"/> <source>Line</source> <translation>Zeile</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="95"/> <source>Simple line to provide visual separation between items.</source> <translation>Eine simple Linie die als visuelle Trennung zischen Zwei Objekten dient.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="101"/> <source>Workspace Switcher</source> <translation>Arbeitsflächenumschalter</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="130"/> <source>View and control any running application windows (group similar windows under a single button).</source> <translation>Betrachte und kontrolliere jedes laufende Anwendungsfenster (gruppiere gleiche Fenster unter einer einzigen Schaltfläche).</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="137"/> <source>View and control any running application windows (every individual window has a button)</source> <translation>Betrachte und kontrolliere jedes laufende Anwendungsfenster (eine Schaltfläche pro Fenster) </translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="150"/> <source>Show Desktop</source> <translation>Desktop anzeigen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="158"/> <source>Unified system access and application launch menu.</source> <translation>Vereinheitlichter Systemzugriff und Programm-Startmenü.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="165"/> <source>Pin an application shortcut directly to the panel</source> <translation>Pinne Anwendungs-Verknüpfung direkt an die Seitenleiste</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="184"/> <source>Desktop button for launching an application</source> <translation>Schaltfläche auf dem Schreibtisch für das Starten einer Anwendung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="190"/> <source>Desktop Icons View</source> <translation>Zeige Schreibtisch Icons</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="197"/> <source>Note Pad</source> <translation>Notizbuch</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="198"/> <source>Keep simple text notes on your desktop</source> <translation>Behalte einfache Notizen auf dem Schreibtisch</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="204"/> <source>Audio Player</source> <translation>Audio-Wiedergabe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="205"/> <source>Play through lists of audio files</source> <translation>Spiele Audio-Dateilisten ab</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="211"/> <source>System Monitor</source> <translation>Systemmonitor</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="212"/> <source>Keep track of system statistics such as CPU/Memory usage and CPU temperatures.</source> <translation>Beobachte Systemstatistiken wie etwa Prozessor/Speicher und Temperaturen.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="218"/> <source>RSS Reader</source> <translation>RSS Reader</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="219"/> <source>Monitor RSS Feeds (Requires internet connection)</source> <translation>RSS Feeds überwachen (benötigt Internetverbindung)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="242"/> <source>Terminal</source> <translation>Konsole</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="243"/> <source>Start the default system terminal.</source> <translation>Starte Standard-Terminal.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="250"/> <source>Browse the system with the default file manager.</source> <translation>Durchstöbern des Systems mit dem Standard Dateimanager.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="256"/> <source>Applications</source> <translation>Anwendungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="257"/> <source>Show the system applications menu.</source> <translation>Zeige Menü der System Anwendungen.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="263"/> <source>Separator</source> <translation>Trennelement</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="264"/> <source>Static horizontal line.</source> <translation>Statische horizontale Linie.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="271"/> <source>Show the desktop settings menu.</source> <translation>Arbeitsplatzeinstellungsmenü anzeigen.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="284"/> <source>Custom App</source> <translation>Angepasste Anwendung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="285"/> <source>Start a custom application</source> <translation>Starten einer angepassten Anwendung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="291"/> <source>Menu Script</source> <translation>Menü Skript</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="191"/> <source>Configurable area for automatically showing desktop icons</source> <translation>Einstellbarer Bereich, um Arbeitsflächen-Symbole automatisch anzeigen zu lassen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="249"/> <source>Browse Files</source> <translation>Dateien durchsuchen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="270"/> <source>Preferences</source> <translation>Einstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="278"/> <source>List the open, minimized, active, and urgent application windows</source> <translation>Zeige die geöfneten, aktiven und dringenden Anwendungsfenster an</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="292"/> <source>Run an external script to generate a user defined menu</source> <translation>Externes Skript ausführen, um benutzerspezifisches Menü zu erstellen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="302"/> <source>Text</source> <translation>Text</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="303"/> <source>Color to use for all visible text.</source> <translation>Farbe für alle sichtbaren Texte.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="308"/> <source>Text (Disabled)</source> <translation>Text (abgeschaltet)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="309"/> <source>Text color for disabled or inactive items.</source> <translation>Textfarbe für ausgeschalteten oder inaktiven Text.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="314"/> <source>Text (Highlighted)</source> <translation>Text (hervorgehoben)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="315"/> <source>Text color when selection is highlighted.</source> <translation>Textfarbe wenn die Auswahl hervorgehoben ist.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="320"/> <source>Base Window Color</source> <translation>Basisfarbe des Fensters</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="321"/> <source>Main background color for the window/dialog.</source> <translation>Hauptsächliche Hintergrundfarbe für das Fenster / den Dialog.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="326"/> <source>Base Window Color (Alternate)</source> <translation>Basisfarbe des Fensters (Alternativ)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="327"/> <source>Main background color for widgets that list or display collections of items.</source> <translation>Haupt-Hintergrundfarbe für Widgets die Kollektionen von Gegenständen anzeigen oder darstellen.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="332"/> <source>Primary Color</source> <translation>Primärfarbe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="333"/> <source>Dominant color for the theme.</source> <translation>Dominante Farbe für das Theme.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="338"/> <source>Primary Color (Disabled)</source> <translation>Primärfarbe (deaktiviert)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="339"/> <source>Dominant color for the theme (more subdued).</source> <translation>Dominante Farben für das Theme (dezenter)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="344"/> <source>Secondary Color</source> <translation>Sekundärfarbe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="345"/> <source>Alternate color for the theme.</source> <translation>Alternative Farbe für das Theme.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="350"/> <source>Secondary Color (Disabled)</source> <translation>Sekundärfarben (deaktiviert)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="351"/> <source>Alternate color for the theme (more subdued).</source> <translation>Alternative Farbe für das Theme (dezenter)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="356"/> <source>Accent Color</source> <translation>Akzentfarbe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="357"/> <source>Color used for borders or other accents.</source> <translation>Farbe, die für Grenzen oder andere Akzente genutzt wird.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="362"/> <source>Accent Color (Disabled)</source> <translation>Akzentfarbe (Deaktiviert)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="363"/> <source>Color used for borders or other accents (more subdued).</source> <translation>Farbe, die für Grenzen oder andere Akzente genutzt wird (dezenter).</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="368"/> <source>Highlight Color</source> <translation>Hervorhebungsfarbe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="369"/> <source>Color used for highlighting an item.</source> <translation>Farbe, die für das Hervorheben eines Elementes genutzt wird.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="374"/> <source>Highlight Color (Disabled)</source> <translation>Hervorhebungsfarbe (Abgeschaltet)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/LPlugins.cpp" line="375"/> <source>Color used for highlighting an item (more subdued).</source> <translation>Farbe, die für das Hervorheben eines Elementes genutzt wird (dezenter).</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="29"/> <source>Change Wallpaper</source> <translation>Desktophintergrund ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="29"/> <source>Wallpaper Settings</source> <translation>Einstellungen für den Hintergrund der Arbeitsfläche</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="29"/> <source>Change background image(s)</source> <translation>Hintergrundbild(er) ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="30"/> <source>Change Desktop Theme</source> <translation>Thema der Arbeitsfläche ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="30"/> <source>Theme Settings</source> <translation>Themeneinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="30"/> <source>Change interface fonts and colors</source> <translation>Schriftart und Farben der Überfläche ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="31"/> <source>Window Effects</source> <translation>Fenstereffekte</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="31"/> <source>Adjust transparency levels and window effects</source> <translation>Transparenz und Fenstereffekte anpassen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="32"/> <source>Startup Services and Applications</source> <translation>Startdienste und -anwendungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="32"/> <source>Startup Settings</source> <translation>Systemstarteinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="32"/> <source>Automatically start applications or services</source> <translation>Anwendungen und Dienste automatisch starten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="33"/> <source>Default Applications for File Type</source> <translation>Standardanwendungen für Dateitypen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="33"/> <source>Mimetype Settings</source> <translation>Mimetype-Einstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="33"/> <source>Change default applications</source> <translation>Standardanwendungen ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="34"/> <source>Keyboard Shortcuts</source> <translation>Tastenkombinationen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="34"/> <source>Change keyboard shortcuts</source> <translation>Tastenkombinationen ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="35"/> <source>Window Manager</source> <translation>Fenstermanager</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="35"/> <source>Window Settings</source> <translation>Fenstereinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="35"/> <source>Change window settings and appearances</source> <translation>Fenstereinstellungen und -erscheinung ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="36"/> <source>Desktop Icons and Plugins</source> <translation>Symbole und Plugins der Arbeitsfläche</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="36"/> <source>Desktop Plugins</source> <translation>Arbeitsflächen-Plugins</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="36"/> <source>Change what icons or tools are embedded on the desktop</source> <translation>In die Arbeitsfläche eingebettete Symbole und Werkzeuge ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="37"/> <source>Floating Panels and Plugins</source> <translation>Schwebende Panele und Plugins</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="37"/> <source>Panels and Plugins</source> <translation>Panele und Plugins</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="37"/> <source>Change any floating panels and what they show</source> <translation>Alle schwebenden Bedienfelder und ihre Anzeige ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="38"/> <source>Context Menu and Plugins</source> <translation>Kontextmenü und Plugins</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="38"/> <source>Menu Plugins</source> <translation>Menü-Plugins</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="38"/> <source>Change what options are shown on the desktop context menu</source> <translation>Im Arbeitsflächenkontextmenü angezeigte Optionen ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="39"/> <source>Localization Options</source> <translation>Lokalisierungsoptionen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="39"/> <source>Locale Settings</source> <translation>Sprachumgebungseinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="39"/> <source>Change the default locale settings for this user</source> <translation>Standard-Sprachumgebungseinstellungen für diesen Benutzer ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="40"/> <source>General Options</source> <translation>Allgemeine Optionen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="40"/> <source>User Settings</source> <translation>Benutzereinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/getPage.h" line="40"/> <source>Change basic user settings such as time/date formats</source> <translation>Grundlegende Benutzereinstellungen wie Zeit- und Datumsformate ändern</translation> </message> </context> <context> <name>ScriptDialog</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="14"/> <source>Setup a JSON Menu Script</source> <translation>JSON-Menüskript einrichten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="25"/> <source>Visible Name:</source> <translation>Sichtbarer Name:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="32"/> <source>Executable:</source> <translation>Ausführbare Datei:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="39"/> <source>Icon:</source> <translation>Symbol:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="54"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="87"/> <source>...</source> <translation>...</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="126"/> <source>Cancel</source> <translation>Abbrechen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.ui" line="133"/> <source>Apply</source> <translation>Anwenden</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.cpp" line="57"/> <source>Select a menu script</source> <translation>Menü-Skript auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ScriptDialog.cpp" line="64"/> <source>Select an icon file</source> <translation>Symboldatei auswählen</translation> </message> </context> <context> <name>ThemeDialog</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.ui" line="14"/> <source>Theme Editor</source> <translation>Themen-Editor</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.ui" line="28"/> <source>Theme Name:</source> <translation>Themenname:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.ui" line="51"/> <source>color</source> <translation>Farbe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.ui" line="74"/> <source>Cancel</source> <translation>Abbrechen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.ui" line="94"/> <source>Save</source> <translation>Speichern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.ui" line="101"/> <source>Apply</source> <translation>Anwenden</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.cpp" line="65"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.cpp" line="82"/> <source>Theme Exists</source> <translation>Thema existiert</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.cpp" line="65"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/ThemeDialog.cpp" line="82"/> <source>This theme already exists. Overwrite it?</source> <translation>Das Thema existiert bereits. Überschrieben?</translation> </message> </context> <context> <name>mainWindow</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="14"/> <source>MainWindow</source> <translation>Hauptfenster</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="23"/> <source>toolBar</source> <translation>Werkzeugleiste</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="50"/> <source>Save</source> <translation>Speichern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="53"/> <source>Save current changes</source> <translation>Änderungen speichern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="56"/> <source>Ctrl+S</source> <translation>Strg+S</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="61"/> <source>Back to settings</source> <translation>Zurück zu Einstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="64"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="67"/> <source>Back to overall settings</source> <translation>Zurück zu Gesamteinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="78"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.ui" line="81"/> <source>Select monitor/desktop to configure</source> <translation>Monitor/Arbeitsfläche zum Konfigurieren auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.cpp" line="119"/> <source>Unsaved Changes</source> <translation>Ungespeicherte Änderungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/mainWindow.cpp" line="119"/> <source>This page currently has unsaved changes, do you wish to save them now?</source> <translation>Diese Seite enthält ungespeicherte Änderungen, möchten Sie diese jetzt speichern?</translation> </message> </context> <context> <name>page_autostart</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.ui" line="39"/> <source>Add New Startup Service</source> <translation>Neuen Systemstartdienst hinzufügen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.ui" line="75"/> <source>Application</source> <translation>Anwendung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.ui" line="85"/> <source>Binary</source> <translation>Programmdatei</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.ui" line="95"/> <source>File</source> <translation>Datei</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp" line="63"/> <source>Startup Services</source> <translation>Dienste, die beim Systemstart ausgeführt werden</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp" line="127"/> <source>Select Binary</source> <translation>Programmdatei auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp" line="127"/> <source>Application Binaries (*)</source> <translation>Anwendungsdateien (*)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp" line="130"/> <source>Invalid Binary</source> <translation>Ungültige Programmdatei</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp" line="130"/> <source>The selected file is not executable!</source> <translation>Die ausgewählte Datei ist nicht ausführbar!</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp" line="144"/> <source>Select File</source> <translation>Datei auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp" line="144"/> <source>All Files (*)</source> <translation>Alle Dateien (*)</translation> </message> </context> <context> <name>page_compton</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_compton.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_compton.ui" line="32"/> <source>Disable Compositing Manager (session restart required)</source> <translation>Compositing-Manager deaktivieren (Sitzungsneustart erforderlich)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_compton.cpp" line="38"/> <source>Compositor Settings</source> <translation>Compositor-Einstellungen</translation> </message> </context> <context> <name>page_defaultapps</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="39"/> <source>Advanced</source> <translation>Erweitert</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="62"/> <source>Specific File Types</source> <translation>Bestimmte Dateitypen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="99"/> <source>Type/Group</source> <translation>Typ/Gruppe</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="104"/> <source>Default Application</source> <translation>Standardanwendung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="109"/> <source>Description</source> <translation>Beschreibung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="119"/> <source>Clear</source> <translation>Leeren</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="142"/> <source>Set App</source> <translation>Anwendung festlegen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="152"/> <source>Set Binary</source> <translation>Programmdatei festlegen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="168"/> <source>Basic Settings</source> <translation>Grundeinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="187"/> <source>Web Browser:</source> <translation>Webbrowser:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="210"/> <source>E-Mail Client:</source> <translation>E-Mail-Programm:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="237"/> <source>File Manager:</source> <translation>Dateimanager:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="250"/> <source>Virtual Terminal:</source> <translation>Virtuelles Terminal:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="257"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.ui" line="267"/> <source>...</source> <translation>...</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="43"/> <source>Default Applications</source> <translation>Vorgabe-Anwendungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="62"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="84"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="106"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="128"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="242"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="274"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="307"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="339"/> <source>Click to Set</source> <translation>Zum Festlegen klicken</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="162"/> <source>%1 (%2)</source> <translation>%1 (%2)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="404"/> <source>Select Binary</source> <translation>Programmdatei auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="411"/> <source>Invalid Binary</source> <translation>Ungültige Programmdatei</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_defaultapps.cpp" line="411"/> <source>The selected binary is not executable!</source> <translation>Die ausgewählte Programmdatei ist nicht ausführbar!</translation> </message> </context> <context> <name>page_fluxbox_keys</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="14"/> <source>page_fluxbox_keys</source> <translation>page_fluxbox_keys</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="34"/> <source>Basic Editor</source> <translation>Basiseditor</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="44"/> <source>Advanced Editor</source> <translation>Erweiterter Editor</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="107"/> <source>Action</source> <translation>Aktion</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="112"/> <source>Keyboard Shortcut</source> <translation>Tastenkombination</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="120"/> <source>Modify Shortcut</source> <translation>Kombination ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="141"/> <source>Clear Shortcut</source> <translation>Kombination löschen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="151"/> <source>Apply Change</source> <translation>Änderung anwenden</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="161"/> <source>Change Key Binding:</source> <translation>Tastenbelegung ändern:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="184"/> <source>Note: Current key bindings need to be cleared and saved before they can be re-used.</source> <translation>Hinweis: Aktuelle Tastenbelegungen müssen gelöscht und gespeichert werden, bevor sie wieder genutzt werden können.</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="220"/> <source>View Syntax Codes</source> <translation>Syntaxcodes ansehen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.ui" line="244"/> <source>&quot;Mod1&quot;: Alt key &quot;Mod4&quot;: Windows/Mac key &quot;Control&quot;: Ctrl key</source> <translation>&quot;Mod1&quot;: Alt-Taste &quot;Mod4&quot;: Windows/Mac-Taste &quot;Steuerung&quot;: Strg-Taste</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.cpp" line="71"/> <source>Keyboard Shortcuts</source> <translation>Tastenkombinationen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.cpp" line="79"/> <source>Audio Volume Up</source> <translation>Lautstärke höher</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.cpp" line="80"/> <source>Audio Volume Down</source> <translation>Lautstärke niedriger</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.cpp" line="81"/> <source>Screen Brightness Up</source> <translation>Bildschirmhelligkeit höher</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.cpp" line="82"/> <source>Screen Brightness Down</source> <translation>Bildschirmhelligkeit niedriger</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.cpp" line="83"/> <source>Take Screenshot</source> <translation>Bildschirmfoto machen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_keys.cpp" line="84"/> <source>Lock Screen</source> <translation>Bildschirm sperren</translation> </message> </context> <context> <name>page_fluxbox_settings</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="34"/> <source>Simple Editor</source> <translation>Einfacher Editor</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="44"/> <source>Advanced Editor</source> <translation>Erweiterter Editor</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="81"/> <source>Number of Workspaces</source> <translation>Anzahl der Arbeitsflächen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="98"/> <source>New Window Placement</source> <translation>Platzierung neuer Fenster</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="108"/> <source>Focus Policy</source> <translation>Fokussierungsrichtlinie</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="118"/> <source>Window Theme</source> <translation>Fensterdekoration</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="136"/> <source>Window Theme Preview</source> <translation>Vorschau für Fensterdekoration</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.ui" line="190"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="182"/> <source>No Preview Available</source> <translation>Keine Vorschau verfügbar</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="71"/> <source>Window Manager Settings</source> <translation>Einstellungen der Fensterverwaltung</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="76"/> <source>Click To Focus</source> <translation>Zum Fokussieren klicken</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="77"/> <source>Active Mouse Focus</source> <translation>Aktiver Mausfokus</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="78"/> <source>Strict Mouse Focus</source> <translation>Strikter Mausfokus</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="81"/> <source>Align in a Row</source> <translation>In einer Reihe ausrichten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="82"/> <source>Align in a Column</source> <translation>In einer Spalte ausrichten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="83"/> <source>Cascade</source> <translation>Kaskadieren</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp" line="84"/> <source>Underneath Mouse</source> <translation>Unter dem Mauszeiger</translation> </message> </context> <context> <name>page_interface_desktop</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.ui" line="26"/> <source>Embedded Utilities</source> <translation>Eingebettete Dienstprogramme</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.ui" line="77"/> <source>Display Desktop Folder Contents</source> <translation>Arbeitsflächen-Ordnerinhalt anzeigen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.cpp" line="54"/> <source>Desktop Settings</source> <translation>Arbeitsflächen-Einstellungen</translation> </message> </context> <context> <name>page_interface_menu</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_menu.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_menu.ui" line="38"/> <source>Context Menu Plugins</source> <translation>Plugins für das Kontextmenü</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_menu.cpp" line="47"/> <source>Desktop Settings</source> <translation>Arbeitsflächen-Einstellungen</translation> </message> </context> <context> <name>page_interface_panels</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_panels.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp" line="50"/> <source>Desktop Settings</source> <translation>Arbeitsflächen-Einstellungen</translation> </message> </context> <context> <name>page_main</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_main.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_main.ui" line="32"/> <source>Search for....</source> <translation>Nach ... suchen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_main.cpp" line="45"/> <source>Interface Configuration</source> <translation>Oberflächenkonfiguration</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_main.cpp" line="48"/> <source>Appearance</source> <translation>Erscheinungsbild</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_main.cpp" line="51"/> <source>Desktop Session Options</source> <translation>Desktop Sitzungs Optionen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_main.cpp" line="54"/> <source>User Settings</source> <translation>Benutzereinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_main.cpp" line="98"/> <source>Desktop Settings</source> <translation>Arbeitsflächeneinstellungen</translation> </message> </context> <context> <name>page_session_locale</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="32"/> <source>System localization settings (restart required)</source> <translation>Systemlokalisierungseinstellungen (Neustart erforderlich)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="39"/> <source>Language</source> <translation>Sprache</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="49"/> <source>Messages</source> <translation>Mitteilungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="59"/> <source>Time</source> <translation>Zeit</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="69"/> <source>Numeric</source> <translation>Numerisch</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="79"/> <source>Monetary</source> <translation>Monetär</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="89"/> <source>Collate</source> <translation>Sortieren</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.ui" line="99"/> <source>CType</source> <translation>CType</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.cpp" line="48"/> <source>Desktop Settings</source> <translation>Arbeitsflächen-Einstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_locale.cpp" line="92"/> <source>System Default</source> <translation>Systemstandard</translation> </message> </context> <context> <name>page_session_options</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="34"/> <source>Enable numlock on startup</source> <translation>Num-Taste beim Systemstart aktivieren</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="41"/> <source>Play chimes on startup</source> <translation>Glockenspiel beim Systemstart wiedergeben</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="48"/> <source>Play chimes on exit</source> <translation>Glockenspiel beim Beenden wiedergeben</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="55"/> <source>Automatically create/remove desktop symlinks for applications that are installed/removed</source> <translation>Symbolische Verknüpfungen auf der Arbeitsfläche für installierte/entferne Anwendungen automatisch erstellen/entfernen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="58"/> <source>Manage desktop app links</source> <translation>Arbeitsflächen-Anwendungsverknüpfungen verwalten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="67"/> <source>Change User Icon</source> <translation>Benutzersymbol ändern</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="105"/> <source>Time Format:</source> <translation>Zeitformat:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="117"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="161"/> <source>View format codes</source> <translation>Formatcodes ansehen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="132"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="176"/> <source>Sample:</source> <translation>Beispiel:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="149"/> <source>Date Format:</source> <translation>Datumsformat:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="196"/> <source>Display Format</source> <translation>Anzeigeformat</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="227"/> <source>Reset Desktop Settings</source> <translation>Arbeitsflächeneinstellungen zurücksetzen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="246"/> <source>Return to system defaults</source> <translation>Auf Systemvorgaben zurücksetzen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.ui" line="253"/> <source>Return to Lumina defaults</source> <translation>Zu Lumina-Standardeinstellungen zurückkehren</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="19"/> <source>Time (Date as tooltip)</source> <translation>Zeit (Datum als Kurzinfo)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="20"/> <source>Date (Time as tooltip)</source> <translation>Datum (Zeit als Kurzinfo)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="21"/> <source>Time first then Date</source> <translation>Zeit zuerst, dann Datum</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="22"/> <source>Date first then Time</source> <translation>Datum zuerst, dann Zeit</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="61"/> <source>Desktop Settings</source> <translation>Arbeitsflächen-Einstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="101"/> <source>Select an image</source> <translation>Bild auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="102"/> <source>Images</source> <translation>Bilder</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="106"/> <source>Reset User Image</source> <translation>Benutzerbild zurücksetzen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="106"/> <source>Would you like to reset the user image to the system default?</source> <translation>Möchten Sie das Benutzerbild auf den Systemstandard zurücksetzen?</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="145"/> <source>Valid Time Codes:</source> <translation>Gültige Zeitcodes:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="146"/> <source>%1: Hour without leading zero (1)</source> <translation>%1: Stunde ohne führende Null (1)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="147"/> <source>%1: Hour with leading zero (01)</source> <translation>%1: Stunde mit führender Null (0)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="148"/> <source>%1: Minutes without leading zero (2)</source> <translation>%1: Minuten ohne führende Null (2)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="149"/> <source>%1: Minutes with leading zero (02)</source> <translation>%1: Minuten mit führender Null (02)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="150"/> <source>%1: Seconds without leading zero (3)</source> <translation>%1: Sekunden ohne führende Null (3)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="151"/> <source>%1: Seconds with leading zero (03)</source> <translation>%1: Sekunden mit führender Null (03)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="152"/> <source>%1: AM/PM (12-hour) clock (upper or lower case)</source> <translation>%1: AM/PM (12-Stunden-)Uhr (Groß- oder Kleinschreibung)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="153"/> <source>%1: Timezone</source> <translation>%1: Zeitzone</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="154"/> <source>Time Codes</source> <translation>Zeitcodes</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="168"/> <source>Valid Date Codes:</source> <translation>Gültige Datumscodes:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="169"/> <source>%1: Numeric day without a leading zero (1)</source> <translation>%1: Numerischer Tag ohne führende Null (1)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="170"/> <source>%1: Numeric day with leading zero (01)</source> <translation>%1: Numerischer Tag mit führender Null (01)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="171"/> <source>%1: Day as abbreviation (localized)</source> <translation>%1: Tag als Abkürzung (lokalisiert)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="172"/> <source>%1: Day as full name (localized)</source> <translation>%1: Tag als vollständiger Name (lokalisiert)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="173"/> <source>%1: Numeric month without leading zero (2)</source> <translation>%1: Numerischer Monat ohne führende Null (2)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="174"/> <source>%1: Numeric month with leading zero (02)</source> <translation>%1: Numerischer Monat mit führender Null (02)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="175"/> <source>%1: Month as abbreviation (localized)</source> <translation>%1: Monat als Abkürzung (lokalisiert)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="176"/> <source>%1: Month as full name (localized)</source> <translation>%1: Monat als vollständiger Name (lokalisiert)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="177"/> <source>%1: Year as 2-digit number (15)</source> <translation>%1: Jahr als zweistellige Zahl (15)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="178"/> <source>%1: Year as 4-digit number (2015)</source> <translation>%1: Jahr als vierstellige Zahl (2015)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="179"/> <source>Text may be contained within single-quotes to ignore replacements</source> <translation>Text muss in Hochkommas gesetzt werden, um Ersetzungen zu ignorieren</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp" line="180"/> <source>Date Codes</source> <translation>Datumscodes</translation> </message> </context> <context> <name>page_theme</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="32"/> <source>Font:</source> <translation>Schriftart:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="46"/> <source>Font Size:</source> <translation>Schriftgröße:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="53"/> <source> point</source> <translation> Punkt</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="60"/> <source>Theme Template:</source> <translation>Themenvorlage:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="76"/> <source>Create/Edit a theme template (Advanced)</source> <translation>Themenvorlage erstellen/bearbeiten (Fortgeschritten)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="82"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="116"/> <source>Edit</source> <translation>Bearbeiten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="94"/> <source>Color Scheme:</source> <translation>Farbschema:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="110"/> <source>Create/Edit a color scheme</source> <translation>Farbschema erstellen/bearbeiten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="128"/> <source>Icon Pack:</source> <translation>Symbolpaket:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.ui" line="138"/> <source>Mouse Cursors:</source> <translation>Mauszeiger:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="52"/> <source>Theme Settings</source> <translation>Design-Einstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="67"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="81"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="132"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="158"/> <source>Local</source> <translation>Lokal</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="74"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="88"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="139"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_theme.cpp" line="165"/> <source>System</source> <translation>System</translation> </message> </context> <context> <name>page_wallpaper</name> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.ui" line="14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.ui" line="90"/> <source>Single Background</source> <translation>Einzelner Hintergrund</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.ui" line="100"/> <source>Rotate Background</source> <translation>Hintergrund abwechseln</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.ui" line="107"/> <source> Minutes</source> <translation> Minuten</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.ui" line="110"/> <source>Every </source> <translation>Alle </translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.ui" line="133"/> <source>Layout:</source> <translation>Anordnung:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="55"/> <source>Wallpaper Settings</source> <translation>Bildschirmhintergrundeinstellungen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="64"/> <source>System Default</source> <translation>Systemstandard</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="65"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="220"/> <source>Solid Color: %1</source> <translation>Einfarbig: %1</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="76"/> <source>Screen Resolution:</source> <translation>Bildschirmauflösung:</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="98"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="99"/> <source>Select Color</source> <translation>Farbe auswählen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="118"/> <source>File(s)</source> <translation>Datei(en)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="119"/> <source>Directory (Single)</source> <translation>Verzeichnis (einzeln)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="120"/> <source>Directory (Recursive)</source> <translation>Verzeichnis (rekursiv)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="121"/> <source>Solid Color</source> <translation>Einfarbig</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="125"/> <source>Automatic</source> <translation>Automatisch</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="126"/> <source>Fullscreen</source> <translation>Vollbild</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="127"/> <source>Fit screen</source> <translation>An Bildschirm anpassen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="128"/> <source>Tile</source> <translation>Kachel</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="129"/> <source>Center</source> <translation>Zentriert</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="130"/> <source>Top Left</source> <translation>Oben links</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="131"/> <source>Top Right</source> <translation>Oben rechts</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="132"/> <source>Bottom Left</source> <translation>Unten links</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="133"/> <source>Bottom Right</source> <translation>Unten rechts</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="141"/> <source>No Background</source> <translation>Kein Hintergrund</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="141"/> <source>(use system default)</source> <translation>(Systemvorgaben verwenden)</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="161"/> <source>File does not exist</source> <translation>Datei nicht vorhanden</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="201"/> <source>Find Background Image(s)</source> <translation>Hintergrundbild(er) suchen</translation> </message> <message> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="232"/> <location filename="../../lumina-git/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp" line="257"/> <source>Find Background Image Directory</source> <translation>Hintergrundbildverzeichnis suchen</translation> </message> </context> </TS>
pcbsd/lumina-i18n
ts/de/lumina-config.ts
TypeScript
bsd-3-clause
99,007
import React, { Component, PropTypes } from 'react'; import cx from 'classnames'; import Lang from '../../backend/language'; class SidebarItem extends Component { constructor(props) { super(props); } __updateState (e) { e.stopPropagation(); const { onStatusChange } = this.props; onStatusChange && onStatusChange(); } render() { const { item, active, onEdit, onClick, onRemove } = this.props; const classNames = cx({ 'sidebar-item': true, 'active': active, }); const statusClassNames = cx({ 'status': true, 'online': item.online, }); return (<div className={ classNames } onClick={ onClick }> <i className={ statusClassNames } onClick={ this.__updateState.bind(this) }></i> <div className="content"> <p className="name">{ item.name }</p> <p className="meta"> { !!item.url ? <i className={ "iconfont cloud" + (item.isSyncing ? " syncing" : "")}>&#xe604;</i> : null} <span>{ Lang.get('main.hosts_rules', item.count) }</span> </p> </div> { onEdit ? <i className="iconfont edit" onClick={ onEdit }>&#xe603;</i> : null } { onRemove ? <i className="iconfont delete" onClick={ onRemove }>&#xe608;</i> : null } </div>); } } SidebarItem.propTypes = { item: PropTypes.object, active: PropTypes.bool, onEdit: PropTypes.func, onClick: PropTypes.func, onRemove: PropTypes.func, onStatusChange: PropTypes.func, }; export default SidebarItem;
pk8est/dot
src/js/pages/common/SidebarItem.js
JavaScript
bsd-3-clause
1,754
/******************************************************************************* * Copyright SemanticBits, Northwestern University and Akaza Research * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/caaers/LICENSE.txt for details. ******************************************************************************/ package gov.nih.nci.cabig.caaers.dao.index; import junit.framework.Test; import junit.framework.TestSuite; import junit.framework.TestCase; /** * ParticipantIndexDao Tester. * * @author Biju Joseph * @since <pre>12/08/2010</pre> * */ public class ParticipantIndexDaoTest extends TestCase { ParticipantIndexDao dao; @Override protected void setUp() throws Exception { super.setUp(); dao = new ParticipantIndexDao(); } public void testEntityIdColumnName() throws Exception { assertEquals("participant_id", dao.entityIdColumnName()); } public void testIndexTableName() throws Exception { assertEquals("participant_index", dao.indexTableName()); } public void testSequenceName() throws Exception { assertEquals("seq_participant_index_id", dao.sequenceName()); } }
CBIIT/caaers
caAERS/software/core/src/test/java/gov/nih/nci/cabig/caaers/dao/index/ParticipantIndexDaoTest.java
Java
bsd-3-clause
1,212
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/privacy/dlp/v2beta1/storage.proto namespace Google\Privacy\Dlp\V2beta1; use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** * Options defining a file or a set of files (path ending with *) within * a Google Cloud Storage bucket. * * Generated from protobuf message <code>google.privacy.dlp.v2beta1.CloudStorageOptions</code> */ class CloudStorageOptions extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet file_set = 1;</code> */ private $file_set = null; public function __construct() { \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Storage::initOnce(); parent::__construct(); } /** * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet file_set = 1;</code> * @return \Google\Privacy\Dlp\V2beta1\CloudStorageOptions_FileSet */ public function getFileSet() { return $this->file_set; } /** * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet file_set = 1;</code> * @param \Google\Privacy\Dlp\V2beta1\CloudStorageOptions_FileSet $var * @return $this */ public function setFileSet($var) { GPBUtil::checkMessage($var, \Google\Privacy\Dlp\V2beta1\CloudStorageOptions_FileSet::class); $this->file_set = $var; return $this; } }
eoogbe/api-client-staging
generated/php/google-cloud-dlp-v2beta1/proto/src/Google/Privacy/Dlp/V2beta1/CloudStorageOptions.php
PHP
bsd-3-clause
1,596
// // Rosetta Stone // http://product.rosettastone.com/news/ // // // Documentation // http://cocoadocs.org/docsets/RSTCoreDataKit // // // GitHub // https://github.com/rosettastone/RSTCoreDataKit // // // License // Copyright (c) 2014 Rosetta Stone // Released under a BSD license: http://opensource.org/licenses/BSD-3-Clause // @import Foundation; @import CoreData; /** * A completion block to be called when receiving `NSManagedObjectContextDidSaveNotification`. * * @param notification The notification that was posted. */ typedef void(^RSTCoreDataContextSaveHandler)(NSNotification *notification); /** * An instance of `RSTCoreDataContextDidSaveListener` is a single-purpose object intended to simplify * listening for the `NSManagedObjectContextDidSaveNotification` notification. * * It listens for `NSManagedObjectContextDidSaveNotification`, and calls its handler block upon receiving the notification. * Upon deallocation, this object will stop listening for notifications. */ @interface RSTCoreDataContextDidSaveListener : NSObject /** * Initializes a new `RSTCoreDataContextDidSaveListener` with the specified handler and begins * listening for notifications from the specified managedObjectContext. * * @param handler The handler block to be called each time the notification is received. This value may not be `nil`. * @param managedObjectContext The managed object context to be observed. This value may be `nil`. * * @return An initialized `RSTCoreDataContextDidSaveListener` if successful, `nil` otherwise. */ - (instancetype)initWithHandler:(RSTCoreDataContextSaveHandler)handler forManagedObjectContext:(NSManagedObjectContext *)managedObjectContext NS_DESIGNATED_INITIALIZER; /** * Not a valid initializer for this class. */ - (id)init NS_UNAVAILABLE; @end
jessesquires/RSTCoreDataKit
RSTCoreDataKit/RSTCoreDataContextDidSaveListener.h
C
bsd-3-clause
1,845
/************************************************************************************************************************ Copyright (c) 2016, Imagination Technologies Limited and/or its affiliated group companies. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ************************************************************************************************************************/ /* * This example demonstrates how to initiate an EXECUTE operation via the server, * targeting an executable resource on the client. */ #include <stdlib.h> #include <stdio.h> #include <awa/common.h> #include <awa/server.h> #define IPC_PORT (54321) #define IPC_ADDRESS "127.0.0.2" #define OPERATION_PERFORM_TIMEOUT 1000 #define CLIENT_ID "TestClient1" int main(void) { /* Create and initialise server session */ AwaServerSession * session = AwaServerSession_New(); /* Use default IPC configuration */ AwaServerSession_Connect(session); /* Create EXECUTE operation */ AwaServerExecuteOperation * operation = AwaServerExecuteOperation_New(session); /* * This example uses resource /3/0/4 which is the Reboot * resource in the standard Device object. It is an executable (None type) resource. */ /* Add resource path to the EXECUTE operation */ AwaServerExecuteOperation_AddPath(operation, CLIENT_ID, "/3/0/4", NULL); AwaServerExecuteOperation_Perform(operation, OPERATION_PERFORM_TIMEOUT); /* Operations must be freed after use */ AwaServerExecuteOperation_Free(&operation); AwaServerSession_Disconnect(session); AwaServerSession_Free(&session); return 0; }
DavidAntliff/AwaLWM2M
api/examples/server-execute-example.c
C
bsd-3-clause
3,078
/*L * Copyright Oracle inc, SAIC-F * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cadsr-util/LICENSE.txt for details. */ package gov.nih.nci.ncicb.cadsr.common.persistence.dao; import gov.nih.nci.ncicb.cadsr.common.exception.NestedRuntimeException; public class ConnectionException extends NestedRuntimeException { public ConnectionException(String msg) { super(msg); } public ConnectionException(String msg, Exception ex) { super(msg,ex); } }
CBIIT/cadsr-util
cadsrutil/src/java/gov/nih/nci/ncicb/cadsr/common/persistence/dao/ConnectionException.java
Java
bsd-3-clause
511
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>PMD 5.0.0 Reference Package net.sourceforge.pmd.typeresolution.testdata</title> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" /> </head> <body> <h3> <a href="package-summary.html" target="classFrame">net.sourceforge.pmd.typeresolution.testdata</a> </h3> <h3>Classes</h3> <ul> <li> <a href="AnonymousInnerClass.html" target="classFrame">AnonymousInnerClass</a> </li> <li> <a href="ArrayListFound.html" target="classFrame">ArrayListFound</a> </li> <li> <a href="ExtraTopLevelClass.html" target="classFrame">ExtraTopLevelClass</a> </li> <li> <a href="InnerClass.html" target="classFrame">InnerClass</a> </li> <li> <a href="Literals.html" target="classFrame">Literals</a> </li> <li> <a href="Operators.html" target="classFrame">Operators</a> </li> <li> <a href="Promotion.html" target="classFrame">Promotion</a> </li> <li> <a href="ExtraTopLevelClass.html" target="classFrame">TheExtraTopLevelClass</a> </li> <li> <a href="InnerClass.html" target="classFrame">TheInnerClass</a> </li> </ul> </body> </html>
daejunpark/jsaf
third_party/pmd/docs/xref-test/net/sourceforge/pmd/typeresolution/testdata/package-frame.html
HTML
bsd-3-clause
1,730
define(function(require) { var isInit = false; var rankData = require('../../data/rankData'); var circleFlagData =require('../../data/circle_flag'); var echarts = require('echarts'); require('echarts/chart/scatter'); var rmChart = echarts.init(document.getElementById('rank-timeline')); var scatterDataTL = []; var countries = ["澳大利亚", "韩国", "喀麦隆", "日本", "尼日利亚", "加纳", "伊朗", "哥斯达黎加", "洪都拉斯", "厄瓜多尔", "阿尔及利亚", "波黑", "科特迪瓦", "克罗地亚", "墨西哥", "俄罗斯", "法国", "荷兰", "美国", "智利", "比利时", "英格兰", "希腊", "意大利", "瑞士", "阿根廷", "乌拉圭", "哥伦比亚", "巴西", "葡萄牙", "德国", "西班牙"]; var countryIdxMap = {}; $.each(rankData.rankData, function(i, country) { var name = country[0]; countryIdxMap[name] = countries.length; //countries.push(name); }); $.each(rankData.timeData, function(i0, time) { scatterDataTL[i0] = []; $.each(rankData.rankData, function(i, country) { var name = country[0]; var imageUrl = circleFlagData[name]; scatterDataTL[i0].push({ symbol: imageUrl && 'image://' + imageUrl, value: [name, parseInt(country[i0 + 1])] }); }); }) $.each(scatterDataTL, function(index, item) { $.each(item, function(i, arr) { $.each(arr, function(j, obj) { obj[1] = 80 - obj[1]; }); }); }); var option = { timeline: { data: rankData.timeData, autoPlay: true, playInterval: 500, label: { interval: 0, show: false }, x: 30, x2: 30, type: 'number' }, toolbox: { show: false }, options: [ { title: { text : '2010年7月 FIFA排名' }, grid: { x: 30, y: 40, x2: 30, y2: 50 }, xAxis: { type: 'category', data: countries, axisLabel: { // interval: 0, // rotate: 50 show: false } }, yAxis: { type: 'value', axisLabel: { show: false } }, tooltip: { show: true, formatter: function(arg) { var data = arg[2]; return data[0] + ':' + (80 - data[1]); } }, series: [{ type: 'scatter', data: scatterDataTL[0], symbolSize: 15 }] } ] } $.each(scatterDataTL, function(idx, item) { if (idx > 0) { option.options.push({ title: { text: rankData.timeData[idx] + ' FIFA排名' }, xAxis: { type: 'category', data: 'countries' }, series:[{ data: item }] }); } }); function load() { if (!isInit) { rmChart.setOption(option); isInit = true; } } return { load: load }; });
noikiy/echarts-www
2014/src/index/js/rankTimeline.js
JavaScript
bsd-3-clause
3,764
import argparse from bdi_step.translator_ihmc import IHMCStepTranslator, Mode def run_translator(): t = IHMCStepTranslator(mode=Mode.translating, safe=False) t.run() def run_plotter(): t = IHMCStepTranslator(mode=Mode.plotting, safe=False) t.run() if __name__ == "__main__": parser = argparse.ArgumentParser(description="IHMC VERSION. Run the translation module which converts footstep plans into the spec required by the BDI controller") parser.add_argument('--base', '-b', dest='base', action='store_true', default=False, help='Run as the base-side translator, which plots expected swing trajectories and sends COMMITTED_FOOTSTEP_PLAN messages to the robot-side translator') args = parser.parse_args() if args.base: run_plotter() else: run_translator()
openhumanoids/oh-distro
software/ihmc/ihmc_step/main_ihmc.py
Python
bsd-3-clause
812
<?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yiiunit\framework\db\oci; use yii\db\oci\QueryBuilder; use yii\db\oci\Schema; use yiiunit\data\base\TraversableObject; /** * @group db * @group oci */ class QueryBuilderTest extends \yiiunit\framework\db\QueryBuilderTest { public $driverName = 'oci'; protected $likeEscapeCharSql = " ESCAPE '!'"; protected $likeParameterReplacements = [ '\%' => '!%', '\_' => '!_', '!' => '!!', ]; /** * this is not used as a dataprovider for testGetColumnType to speed up the test * when used as dataprovider every single line will cause a reconnect with the database which is not needed here */ public function columnTypes() { return array_merge(parent::columnTypes(), [ [ Schema::TYPE_BOOLEAN . ' DEFAULT 1 NOT NULL', $this->boolean()->notNull()->defaultValue(1), 'NUMBER(1) DEFAULT 1 NOT NULL', ], ]); } public function foreignKeysProvider() { $tableName = 'T_constraints_3'; $name = 'CN_constraints_3'; $pkTableName = 'T_constraints_2'; return [ 'drop' => [ "ALTER TABLE {{{$tableName}}} DROP CONSTRAINT [[$name]]", function (QueryBuilder $qb) use ($tableName, $name) { return $qb->dropForeignKey($name, $tableName); }, ], 'add' => [ "ALTER TABLE {{{$tableName}}} ADD CONSTRAINT [[$name]] FOREIGN KEY ([[C_fk_id_1]]) REFERENCES {{{$pkTableName}}} ([[C_id_1]]) ON DELETE CASCADE", function (QueryBuilder $qb) use ($tableName, $name, $pkTableName) { return $qb->addForeignKey($name, $tableName, 'C_fk_id_1', $pkTableName, 'C_id_1', 'CASCADE'); }, ], 'add (2 columns)' => [ "ALTER TABLE {{{$tableName}}} ADD CONSTRAINT [[$name]] FOREIGN KEY ([[C_fk_id_1]], [[C_fk_id_2]]) REFERENCES {{{$pkTableName}}} ([[C_id_1]], [[C_id_2]]) ON DELETE CASCADE", function (QueryBuilder $qb) use ($tableName, $name, $pkTableName) { return $qb->addForeignKey($name, $tableName, 'C_fk_id_1, C_fk_id_2', $pkTableName, 'C_id_1, C_id_2', 'CASCADE'); }, ], ]; } public function indexesProvider() { $result = parent::indexesProvider(); $result['drop'][0] = 'DROP INDEX [[CN_constraints_2_single]]'; return $result; } public function testAddDropDefaultValue($sql, \Closure $builder) { $this->markTestSkipped('Adding/dropping default constraints is not supported in Oracle.'); } public function testCommentColumn() { $qb = $this->getQueryBuilder(); $expected = "COMMENT ON COLUMN [[comment]].[[text]] IS 'This is my column.'"; $sql = $qb->addCommentOnColumn('comment', 'text', 'This is my column.'); $this->assertEquals($this->replaceQuotes($expected), $sql); $expected = "COMMENT ON COLUMN [[comment]].[[text]] IS ''"; $sql = $qb->dropCommentFromColumn('comment', 'text'); $this->assertEquals($this->replaceQuotes($expected), $sql); } public function testCommentTable() { $qb = $this->getQueryBuilder(); $expected = "COMMENT ON TABLE [[comment]] IS 'This is my table.'"; $sql = $qb->addCommentOnTable('comment', 'This is my table.'); $this->assertEquals($this->replaceQuotes($expected), $sql); $expected = "COMMENT ON TABLE [[comment]] IS ''"; $sql = $qb->dropCommentFromTable('comment'); $this->assertEquals($this->replaceQuotes($expected), $sql); } public function testResetSequence() { $qb = $this->getQueryBuilder(); $expected = 'DROP SEQUENCE "item_SEQ";' . 'CREATE SEQUENCE "item_SEQ" START WITH 6 INCREMENT BY 1 NOMAXVALUE NOCACHE'; $sql = $qb->resetSequence('item'); $this->assertEquals($expected, $sql); $expected = 'DROP SEQUENCE "item_SEQ";' . 'CREATE SEQUENCE "item_SEQ" START WITH 4 INCREMENT BY 1 NOMAXVALUE NOCACHE'; $sql = $qb->resetSequence('item', 4); $this->assertEquals($expected, $sql); } public function likeConditionProvider() { /* * Different pdo_oci8 versions may or may not implement PDO::quote(), so * yii\db\Schema::quoteValue() may or may not quote \. */ $encodedBackslash = substr($this->getDb()->quoteValue('\\'), 1, -1); $this->likeParameterReplacements[$encodedBackslash] = '\\'; return parent::likeConditionProvider(); } public function conditionProvider() { return array_merge(parent::conditionProvider(), [ [ ['in', 'id', range(0, 2500)], ' (' . '([[id]] IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 0, 999)) . '))' . ' OR ([[id]] IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 1000, 1999)) . '))' . ' OR ([[id]] IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 2000, 2500)) . '))' . ')', array_flip($this->generateSprintfSeries(':qp%d', 0, 2500)), ], [ ['not in', 'id', range(0, 2500)], '(' . '([[id]] NOT IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 0, 999)) . '))' . ' AND ([[id]] NOT IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 1000, 1999)) . '))' . ' AND ([[id]] NOT IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 2000, 2500)) . '))' . ')', array_flip($this->generateSprintfSeries(':qp%d', 0, 2500)), ], [ ['not in', 'id', new TraversableObject(range(0, 2500))], '(' . '([[id]] NOT IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 0, 999)) . '))' . ' AND ([[id]] NOT IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 1000, 1999)) . '))' . ' AND ([[id]] NOT IN (' . implode(', ', $this->generateSprintfSeries(':qp%d', 2000, 2500)) . '))' . ')', array_flip($this->generateSprintfSeries(':qp%d', 0, 2500)), ], ]); } protected function generateSprintfSeries($pattern, $from, $to) { $items = []; for ($i = $from; $i <= $to; $i++) { $items[] = sprintf($pattern, $i); } return $items; } }
wbraganca/yii2
tests/framework/db/oci/QueryBuilderTest.php
PHP
bsd-3-clause
6,813
from django import forms from django.forms.extras.widgets import SelectDateWidget from models import UnmanagedSystem, Owner, UserLicense, UnmanagedSystemType try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.3, 2.4 fallback. from datetime import datetime, timedelta def return_data_if_true(f): @wraps(f) def wrapper(self, *args, **kwargs): field_name = f.__name__.split("_", 1)[1] data = self.cleaned_data[field_name] if data: return data return f(self, *args, **kwargs) return wrapper class CSVForm(forms.Form): csv = forms.FileField() class UserSystemForm(forms.ModelForm): date_purchased = forms.DateField(widget=SelectDateWidget(years=range(1999,datetime.today().year + 2)), initial=datetime.now()) loaner_return_date = forms.DateField(widget=SelectDateWidget(), initial=datetime.now(), required=False) system_type = forms.ModelChoiceField( queryset=UnmanagedSystemType.objects.all(), empty_label="(Required)", required=True ) class Meta: model = UnmanagedSystem fields = ('owner', 'serial', 'asset_tag', 'date_purchased', 'system_type', 'cost', 'cost_center', 'is_loaned', 'is_loaner', 'bug_number', 'loaner_return_date', 'operating_system', 'server_model', 'notes') class OwnerForm(forms.ModelForm): class Meta: model = Owner fields = ['name', 'user_location', 'email', 'note'] class UserLicenseForm(forms.ModelForm): purchase_date = forms.DateField( required=False, widget=SelectDateWidget( years=range(1999, datetime.today().year + 2), ), initial=datetime.now() ) @return_data_if_true def clean_owner(self): name = self.data.get('js_owner_name') #user_location = self.data.get('js_owner_user_location') email = self.data.get('js_owner_email') note = self.data.get('js_owner_note') if name is not None: owner, c = Owner.objects.get_or_create( name = name, #user_location=user_location, email = email, note = note) return owner class Meta: model = UserLicense fields = ['username', 'version', 'license_type', 'license_key', 'owner', 'user_operating_system', 'purchase_date']
rtucker-mozilla/inventory
user_systems/forms.py
Python
bsd-3-clause
2,632
interface(root). interface(node). interfaceAttribute(node, w). interfaceAttribute(node, lineh). interfaceAttribute(node, canvas). interfaceAttribute(node, absy). interfaceAttribute(node, rely). interfaceAttribute(node, h). interfaceAttribute(node, x). interfaceAttribute(node, render). class(top, root). class(leaf, node). class(hbox, node). class(vbox, node). class(wrapbox, node). classChild(top, child, node). classChild(hbox, childs, node). classChild(vbox, childs, node). classChild(wrapbox, childs, node). classField(gensymattrib, gensymattrib) :- false. classField(top, gensymattrib). classField(leaf, gensymattrib). classField(hbox, gensymattrib). classField(vbox, gensymattrib). classField(wrapbox, gensymattrib). classField(wrapbox, width). interfaceField(root, w). interfaceField(root, display). interfaceField(root, refname). interfaceField(root, h). interfaceField(node, display). interfaceField(node, refname). assignment(top, child, x, self, gensymattrib). assignment(top, child, lineh, child, h). assignment(top, child, canvas, child, w). assignment(top, child, canvas, child, h). assignment(top, child, absy, self, gensymattrib). assignment(top, child, rely, self, gensymattrib). assignment(leaf, self, render, self, w). assignment(leaf, self, render, self, canvas). assignment(leaf, self, render, self, absy). assignment(leaf, self, render, self, h). assignment(leaf, self, render, self, x). assignment(leaf, self, w, self, gensymattrib). assignment(leaf, self, h, self, gensymattrib). assignment(hbox, self, render, self, w). assignment(hbox, self, render, self, canvas). assignment(hbox, self, render, self, absy). assignment(hbox, self, render, self, h). assignment(hbox, self, render, self, x). assignment(hbox, self, numchilds_step, self, gensymattrib). assignment(hbox, self, numchilds_last, self, numchilds_step). assignment(hbox, self, numchilds, self, numchilds_step). assignment(hbox, self, w_step, self, numchilds_last). assignment(hbox, self, w_step, self, childs_w_step). assignment(hbox, self, w_step, self, gensymattrib). assignment(hbox, self, w_last, self, w_step). assignment(hbox, self, w, self, w_step). assignment(hbox, self, h_step, self, childs_h_step). assignment(hbox, self, h_step, self, gensymattrib). assignment(hbox, self, h_last, self, h_step). assignment(hbox, self, h, self, h_step). assignment(hbox, self, childs_rely_step, self, gensymattrib). assignment(hbox, self, childs_rely_last, self, childs_rely_step). assignment(hbox, childs, rely, self, childs_rely_step). assignment(hbox, self, childs_absy_step, self, absy). assignment(hbox, self, childs_absy_step, self, childs_rely_step). assignment(hbox, self, childs_absy_step, self, gensymattrib). assignment(hbox, self, childs_absy_last, self, childs_absy_step). assignment(hbox, childs, absy, self, childs_absy_step). assignment(hbox, self, childs_x_step, self, x). assignment(hbox, self, childs_x_step, self, childs_w_step). assignment(hbox, self, childs_x_step, self, gensymattrib). assignment(hbox, self, childs_x_last, self, childs_x_step). assignment(hbox, childs, x, self, childs_x_step). assignment(hbox, self, childs_canvas_step, self, render). assignment(hbox, self, childs_canvas_step, self, gensymattrib). assignment(hbox, self, childs_canvas_last, self, childs_canvas_step). assignment(hbox, childs, canvas, self, childs_canvas_step). assignment(hbox, self, childs_lineh_step, self, gensymattrib). assignment(hbox, self, childs_lineh_last, self, childs_lineh_step). assignment(hbox, childs, lineh, self, childs_lineh_step). assignment(hbox, self, childs_h_step, childs, h). assignment(hbox, self, childs_w_step, childs, w). assignment(vbox, self, render, self, w). assignment(vbox, self, render, self, canvas). assignment(vbox, self, render, self, absy). assignment(vbox, self, render, self, h). assignment(vbox, self, render, self, x). assignment(vbox, self, numchilds_step, self, gensymattrib). assignment(vbox, self, numchilds_last, self, numchilds_step). assignment(vbox, self, numchilds, self, numchilds_step). assignment(vbox, self, h_step, self, numchilds_last). assignment(vbox, self, h_step, self, childs_h_step). assignment(vbox, self, h_step, self, gensymattrib). assignment(vbox, self, h_last, self, h_step). assignment(vbox, self, h, self, h_step). assignment(vbox, self, w_step, self, childs_w_step). assignment(vbox, self, w_step, self, gensymattrib). assignment(vbox, self, w_last, self, w_step). assignment(vbox, self, w, self, w_step). assignment(vbox, self, childs_x_step, self, x). assignment(vbox, self, childs_x_step, self, gensymattrib). assignment(vbox, self, childs_x_last, self, childs_x_step). assignment(vbox, childs, x, self, childs_x_step). assignment(vbox, self, childs_rely_step, self, childs_h_step). assignment(vbox, self, childs_rely_step, self, gensymattrib). assignment(vbox, self, childs_rely_last, self, childs_rely_step). assignment(vbox, childs, rely, self, childs_rely_step). assignment(vbox, self, childs_absy_step, self, absy). assignment(vbox, self, childs_absy_step, self, childs_rely_step). assignment(vbox, self, childs_absy_step, self, gensymattrib). assignment(vbox, self, childs_absy_last, self, childs_absy_step). assignment(vbox, childs, absy, self, childs_absy_step). assignment(vbox, self, childs_canvas_step, self, render). assignment(vbox, self, childs_canvas_step, self, gensymattrib). assignment(vbox, self, childs_canvas_last, self, childs_canvas_step). assignment(vbox, childs, canvas, self, childs_canvas_step). assignment(vbox, self, childs_lineh_step, self, gensymattrib). assignment(vbox, self, childs_lineh_last, self, childs_lineh_step). assignment(vbox, childs, lineh, self, childs_lineh_step). assignment(vbox, self, childs_h_step, childs, h). assignment(vbox, self, childs_w_step, childs, w). assignment(wrapbox, self, w, self, width). assignment(wrapbox, self, render, self, w). assignment(wrapbox, self, render, self, canvas). assignment(wrapbox, self, render, self, absy). assignment(wrapbox, self, render, self, h). assignment(wrapbox, self, render, self, x). assignment(wrapbox, self, childs_x_step, self, x). assignment(wrapbox, self, childs_x_step, self, w). assignment(wrapbox, self, childs_x_step, self, childs_w_step). assignment(wrapbox, self, childs_x_step, self, childs_w_step). assignment(wrapbox, self, childs_x_step, self, x). assignment(wrapbox, self, childs_x_step, self, gensymattrib). assignment(wrapbox, self, childs_x_last, self, childs_x_step). assignment(wrapbox, childs, x, self, childs_x_step). assignment(wrapbox, self, childs_lineh_step, self, childs_x_step). assignment(wrapbox, self, childs_lineh_step, self, childs_h_step). assignment(wrapbox, self, childs_lineh_step, self, x). assignment(wrapbox, self, childs_lineh_step, self, gensymattrib). assignment(wrapbox, self, childs_lineh_last, self, childs_lineh_step). assignment(wrapbox, childs, lineh, self, childs_lineh_step). assignment(wrapbox, self, childs_rely_step, self, childs_x_step). assignment(wrapbox, self, childs_rely_step, self, childs_lineh_step). assignment(wrapbox, self, childs_rely_step, self, x). assignment(wrapbox, self, childs_rely_step, self, gensymattrib). assignment(wrapbox, self, childs_rely_last, self, childs_rely_step). assignment(wrapbox, childs, rely, self, childs_rely_step). assignment(wrapbox, self, childs_absy_step, self, absy). assignment(wrapbox, self, childs_absy_step, self, childs_rely_step). assignment(wrapbox, self, childs_absy_step, self, gensymattrib). assignment(wrapbox, self, childs_absy_last, self, childs_absy_step). assignment(wrapbox, childs, absy, self, childs_absy_step). assignment(wrapbox, self, childs_canvas_step, self, render). assignment(wrapbox, self, childs_canvas_step, self, gensymattrib). assignment(wrapbox, self, childs_canvas_last, self, childs_canvas_step). assignment(wrapbox, childs, canvas, self, childs_canvas_step). assignment(wrapbox, self, h_step, self, childs_lineh_step). assignment(wrapbox, self, h_step, self, childs_rely_step). assignment(wrapbox, self, h_step, self, gensymattrib). assignment(wrapbox, self, h_last, self, h_step). assignment(wrapbox, self, h, self, h_step). assignment(wrapbox, self, childs_h_step, childs, h). assignment(wrapbox, self, childs_w_step, childs, w). classAttribute(hbox, numchilds). classAttribute(hbox, childs_h_step). classAttribute(hbox, childs_absy_step). classAttribute(hbox, childs_canvas_step). classAttribute(hbox, childs_w_step). classAttribute(hbox, childs_x_step). classAttribute(hbox, childs_rely_step). classAttribute(hbox, childs_lineh_step). classAttribute(hbox, childs_lineh_step). classAttribute(hbox, childs_lineh_last). classAttribute(hbox, childs_x_step). classAttribute(hbox, childs_x_last). classAttribute(hbox, childs_absy_step). classAttribute(hbox, childs_absy_last). classAttribute(hbox, childs_rely_step). classAttribute(hbox, childs_rely_last). classAttribute(hbox, h_step). classAttribute(hbox, h_last). classAttribute(hbox, childs_canvas_step). classAttribute(hbox, childs_canvas_last). classAttribute(hbox, numchilds_step). classAttribute(hbox, numchilds_last). classAttribute(hbox, w_step). classAttribute(hbox, w_last). classAttribute(vbox, numchilds). classAttribute(vbox, childs_h_step). classAttribute(vbox, childs_absy_step). classAttribute(vbox, childs_canvas_step). classAttribute(vbox, childs_w_step). classAttribute(vbox, childs_x_step). classAttribute(vbox, childs_rely_step). classAttribute(vbox, childs_lineh_step). classAttribute(vbox, childs_lineh_step). classAttribute(vbox, childs_lineh_last). classAttribute(vbox, childs_absy_step). classAttribute(vbox, childs_absy_last). classAttribute(vbox, childs_rely_step). classAttribute(vbox, childs_rely_last). classAttribute(vbox, childs_x_step). classAttribute(vbox, childs_x_last). classAttribute(vbox, h_step). classAttribute(vbox, h_last). classAttribute(vbox, childs_canvas_step). classAttribute(vbox, childs_canvas_last). classAttribute(vbox, numchilds_step). classAttribute(vbox, numchilds_last). classAttribute(vbox, w_step). classAttribute(vbox, w_last). classAttribute(wrapbox, childs_h_step). classAttribute(wrapbox, childs_absy_step). classAttribute(wrapbox, childs_canvas_step). classAttribute(wrapbox, childs_w_step). classAttribute(wrapbox, childs_x_step). classAttribute(wrapbox, childs_lineh_step). classAttribute(wrapbox, childs_rely_step). classAttribute(wrapbox, childs_absy_step). classAttribute(wrapbox, childs_absy_last). classAttribute(wrapbox, childs_rely_step). classAttribute(wrapbox, childs_rely_last). classAttribute(wrapbox, childs_lineh_step). classAttribute(wrapbox, childs_lineh_last). classAttribute(wrapbox, childs_x_step). classAttribute(wrapbox, childs_x_last). classAttribute(wrapbox, h_step). classAttribute(wrapbox, h_last). classAttribute(wrapbox, childs_canvas_step). classAttribute(wrapbox, childs_canvas_last).
modulexcite/superconductor
compiler/attrib-gram-evaluator-swipl/Tutorial/output/boxes.pl
Perl
bsd-3-clause
10,830
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__int64_t_min_multiply_81_bad.cpp Label Definition File: CWE191_Integer_Underflow.label.xml Template File: sources-sinks-81_bad.tmpl.cpp */ /* * @description * CWE: 191 Integer Underflow * BadSource: min Set data to the min value for int64_t * GoodSource: Set data to a small, non-zero number (negative two) * Sinks: multiply * GoodSink: Ensure there will not be an underflow before multiplying data by 2 * BadSink : If data is negative, multiply by 2, which can cause an underflow * Flow Variant: 81 Data flow: data passed in a parameter to an virtual method called via a reference * * */ #ifndef OMITBAD #include "std_testcase.h" #include "CWE191_Integer_Underflow__int64_t_min_multiply_81.h" namespace CWE191_Integer_Underflow__int64_t_min_multiply_81 { void CWE191_Integer_Underflow__int64_t_min_multiply_81_bad::action(int64_t data) const { if(data < 0) /* ensure we won't have an overflow */ { /* POTENTIAL FLAW: if (data * 2) < LLONG_MIN, this will underflow */ int64_t result = data * 2; printLongLongLine(result); } } } #endif /* OMITBAD */
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE191_Integer_Underflow/s01/CWE191_Integer_Underflow__int64_t_min_multiply_81_bad.cpp
C++
bsd-3-clause
1,212
// Copyright (c) 2012 The Native Client Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ #define NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_ #include "native_client/src/include/nacl_base.h" #include "native_client/src/trusted/desc/nacl_desc_base.h" #include "native_client/src/trusted/desc/nrd_xfer.h" namespace nacl { // Forward declarations. class DescWrapper; class DescWrapperCommon; // We also create a utility class that allows creation of wrappers for the // NaClDescs. class DescWrapperFactory { public: DescWrapperFactory(); ~DescWrapperFactory(); // Create a bound socket, socket address pair. int MakeBoundSock(DescWrapper* pair[2]); // Create a pair of DescWrappers for a connnected (data-only) socket. int MakeSocketPair(DescWrapper* pair[2]); // Create an IMC socket object. DescWrapper* MakeImcSock(NaClHandle handle); // Create a shared memory object. DescWrapper* MakeShm(size_t size); // Create a file descriptor object. DescWrapper* MakeFileDesc(int host_os_desc, int mode); // As with MakeFileDesc, but with quota management. DescWrapper* MakeFileDescQuota(int host_os_desc, int mode, const uint8_t* file_id); // Create a DescWrapper from opening a host file. DescWrapper* OpenHostFile(const char* fname, int flags, int mode); // As with OpenHostFile, but with quota management. DescWrapper* OpenHostFileQuota(const char* fname, int flags, int mode, const uint8_t* file_id); // Create a DescWrapper for a random number generator. DescWrapper* OpenRng(); // Create a DescWrapper for the designated invalid descriptor DescWrapper* MakeInvalid(); // We will doubtless want more specific factory methods. For now, // we provide a wide-open method. DescWrapper* MakeGeneric(struct NaClDesc* desc); // Same as above but unrefs desc in case of failure DescWrapper* MakeGenericCleanup(struct NaClDesc* desc); // Utility routine for importing sync socket DescWrapper* ImportSyncSocketHandle(NaClHandle handle); // Utility routine for importing Linux/Mac (posix) and Windows shared memory. DescWrapper* ImportShmHandle(NaClHandle handle, size_t size); // Utility routine for importing SysV shared memory. DescWrapper* ImportSysvShm(int key, size_t size); private: // The common data from this instance of the wrapper. DescWrapperCommon* common_data_; DISALLOW_COPY_AND_ASSIGN(DescWrapperFactory); }; // A wrapper around NaClDesc to provide slightly higher level abstractions for // common operations. class DescWrapper { friend class DescWrapperFactory; public: struct MsgIoVec { void* base; nacl_abi_size_t length; }; struct MsgHeader { struct MsgIoVec* iov; nacl_abi_size_t iov_length; DescWrapper** ndescv; // Pointer to array of pointers. nacl_abi_size_t ndescv_length; int32_t flags; // flags may contain 0 or any combination of the following. static const int32_t kRecvMsgDataTruncated = NACL_ABI_RECVMSG_DATA_TRUNCATED; static const int32_t kRecvMsgDescTruncated = NACL_ABI_RECVMSG_DESC_TRUNCATED; }; ~DescWrapper(); // Extract a NaClDesc from the wrapper. struct NaClDesc* desc() const { return desc_; } // Get the type of the wrapped NaClDesc. enum NaClDescTypeTag type_tag() const { return reinterpret_cast<struct NaClDescVtbl const *>(desc_->base.vtbl)-> typeTag; } // We do not replicate the underlying NaClDesc object hierarchy, so there // are obviously many more methods than a particular derived class // implements. // Read len bytes into buf. // Returns bytes read on success, negative NaCl ABI errno on failure. ssize_t Read(void* buf, size_t len); // Write len bytes from buf. // Returns bytes written on success, negative NaCl ABI errno on failure. ssize_t Write(const void* buf, size_t len); // Move the file pointer. // Returns updated position on success, negative NaCl ABI errno on failure. nacl_off64_t Seek(nacl_off64_t offset, int whence); // The generic I/O control function. // Returns zero on success, negative NaCl ABI errno on failure. int Ioctl(int request, void* arg); // Get descriptor information. // Returns zero on success, negative NaCl ABI errno on failure. int Fstat(struct nacl_abi_stat* statbuf); // Close the descriptor. // Returns zero on success, negative NaCl ABI errno on failure. int Close(); // Read count directory entries into dirp. // Returns count on success, negative NaCl ABI errno on failure. ssize_t Getdents(void* dirp, size_t count); // Lock a mutex. // Returns zero on success, negative NaCl ABI errno on failure. int Lock(); // TryLock on a mutex. // Returns zero on success, negative NaCl ABI errno on failure. int TryLock(); // Unlock a mutex. // Returns zero on success, negative NaCl ABI errno on failure. int Unlock(); // Wait on a condition variable guarded by the specified mutex. // Returns zero on success, negative NaCl ABI errno on failure. int Wait(DescWrapper* mutex); // Timed wait on a condition variable guarded by the specified mutex. // Returns zero on success, negative NaCl ABI errno on failure. int TimedWaitAbs(DescWrapper* mutex, struct nacl_abi_timespec* ts); // Signal a condition variable. // Returns zero on success, negative NaCl ABI errno on failure. int Signal(); // Broadcast to a condition variable. // Returns zero on success, negative NaCl ABI errno on failure. int Broadcast(); // Send a message. // Returns bytes sent on success, negative NaCl ABI errno on failure. ssize_t SendMsg(const MsgHeader* dgram, int flags); // Receive a message. // Returns bytes received on success, negative NaCl ABI errno on failure. ssize_t RecvMsg(MsgHeader* dgram, int flags, struct NaClDescQuotaInterface *quota_interface); // Connect to a socket address. // Returns a valid DescWrapper on success, NULL on failure. DescWrapper* Connect(); // Accept connection on a bound socket. // Returns a valid DescWrapper on success, NULL on failure. DescWrapper* Accept(); // Post on a semaphore. // Returns zero on success, negative NaCl ABI errno on failure. int Post(); // Wait on a semaphore. // Returns zero on success, negative NaCl ABI errno on failure. int SemWait(); // Get a semaphore's value. // Returns zero on success, negative NaCl ABI errno on failure. int GetValue(); private: DescWrapper(DescWrapperCommon* common_data, struct NaClDesc* desc); DescWrapperCommon* common_data_; struct NaClDesc* desc_; DISALLOW_COPY_AND_ASSIGN(DescWrapper); }; } // namespace nacl #endif // NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_WRAPPER_H_
nacl-webkit/native_client
src/trusted/desc/nacl_desc_wrapper.h
C
bsd-3-clause
6,937
<?php class RelationsRobots extends Phalcon\Mvc\Model { public function initialize() { $this->hasMany('id', 'RelationsRobotsParts', 'robots_id', array( 'foreignKey' => true )); $this->hasManyToMany('id', 'RelationsRobotsParts', 'robots_id', 'parts_id', 'RelationsParts', 'id'); } public function getSource() { return 'robots'; } }
Zaszczyk/cphalcon
unit-tests/models/Relations/RelationsRobots.php
PHP
bsd-3-clause
352
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ #define CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ #pragma once #include "base/timer.h" #include "content/renderer/render_process.h" #include "native_client/src/shared/imc/nacl_imc.h" namespace skia { class PlatformCanvas; } // Implementation of the RenderProcess interface for the regular browser. // See also MockRenderProcess which implements the active "RenderProcess" when // running under certain unit tests. class RenderProcessImpl : public RenderProcess { public: RenderProcessImpl(); virtual ~RenderProcessImpl(); // RenderProcess implementation. virtual skia::PlatformCanvas* GetDrawingCanvas( TransportDIB** memory, const gfx::Rect& rect) OVERRIDE; virtual void ReleaseTransportDIB(TransportDIB* memory) OVERRIDE; virtual bool UseInProcessPlugins() const OVERRIDE; virtual void AddBindings(int bindings) OVERRIDE; virtual int GetEnabledBindings() const OVERRIDE; // Like UseInProcessPlugins(), but called before RenderProcess is created // and does not allow overriding by tests. This just checks the command line // each time. static bool InProcessPlugins(); private: // Look in the shared memory cache for a suitable object to reuse. // result: (output) the memory found // size: the resulting memory will be >= this size, in bytes // returns: false if a suitable DIB memory could not be found bool GetTransportDIBFromCache(TransportDIB** result, size_t size); // Maybe put the given shared memory into the shared memory cache. Returns // true if the SharedMemory object was stored in the cache; otherwise, false // is returned. bool PutSharedMemInCache(TransportDIB* memory); void ClearTransportDIBCache(); // Return the index of a free cache slot in which to install a transport DIB // of the given size. If all entries in the cache are larger than the given // size, this doesn't free any slots and returns -1. int FindFreeCacheSlot(size_t size); // Create a new transport DIB of, at least, the given size. Return NULL on // error. TransportDIB* CreateTransportDIB(size_t size); void FreeTransportDIB(TransportDIB*); // A very simplistic and small cache. If an entry in this array is non-null, // then it points to a SharedMemory object that is available for reuse. TransportDIB* shared_mem_cache_[2]; // This DelayTimer cleans up our cache 5 seconds after the last use. base::DelayTimer<RenderProcessImpl> shared_mem_cache_cleaner_; // TransportDIB sequence number uint32 transport_dib_next_sequence_number_; bool in_process_plugins_; // Bitwise-ORed set of extra bindings that have been enabled anywhere in this // process. See BindingsPolicy for details. int enabled_bindings_; DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl); }; #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_
gavinp/chromium
content/renderer/render_process_impl.h
C
bsd-3-clause
3,034
# 1 "/tmp/tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "/tmp/tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.cpp" # 1 "tests/simpleTemplates/simpleTemplates.cu" # 61 "/usr/local/cuda4.1/cuda/include/device_types.h" # 149 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 3 typedef long ptrdiff_t; # 211 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 3 typedef unsigned long size_t; # 1 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 1 3 # 69 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 1 3 # 56 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/device_types.h" 1 3 # 53 "/usr/local/cuda4.1/cuda/include/device_types.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/host_defines.h" 1 3 # 54 "/usr/local/cuda4.1/cuda/include/device_types.h" 2 3 enum cudaRoundMode { cudaRoundNearest, cudaRoundZero, cudaRoundPosInf, cudaRoundMinInf }; # 57 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 2 3 # 1 "/usr/local/cuda4.1/cuda/include/driver_types.h" 1 3 # 125 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 enum cudaError { cudaSuccess = 0, cudaErrorMissingConfiguration = 1, cudaErrorMemoryAllocation = 2, cudaErrorInitializationError = 3, # 160 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorLaunchFailure = 4, # 169 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorPriorLaunchFailure = 5, # 179 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorLaunchTimeout = 6, # 188 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorLaunchOutOfResources = 7, cudaErrorInvalidDeviceFunction = 8, # 203 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorInvalidConfiguration = 9, cudaErrorInvalidDevice = 10, cudaErrorInvalidValue = 11, cudaErrorInvalidPitchValue = 12, cudaErrorInvalidSymbol = 13, cudaErrorMapBufferObjectFailed = 14, cudaErrorUnmapBufferObjectFailed = 15, cudaErrorInvalidHostPointer = 16, cudaErrorInvalidDevicePointer = 17, cudaErrorInvalidTexture = 18, cudaErrorInvalidTextureBinding = 19, cudaErrorInvalidChannelDescriptor = 20, cudaErrorInvalidMemcpyDirection = 21, # 284 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorAddressOfConstant = 22, # 293 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorTextureFetchFailed = 23, # 302 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorTextureNotBound = 24, # 311 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorSynchronizationError = 25, cudaErrorInvalidFilterSetting = 26, cudaErrorInvalidNormSetting = 27, cudaErrorMixedDeviceExecution = 28, cudaErrorCudartUnloading = 29, cudaErrorUnknown = 30, cudaErrorNotYetImplemented = 31, # 360 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorMemoryValueTooLarge = 32, cudaErrorInvalidResourceHandle = 33, cudaErrorNotReady = 34, cudaErrorInsufficientDriver = 35, # 395 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorSetOnActiveProcess = 36, cudaErrorInvalidSurface = 37, cudaErrorNoDevice = 38, cudaErrorECCUncorrectable = 39, cudaErrorSharedObjectSymbolNotFound = 40, cudaErrorSharedObjectInitFailed = 41, cudaErrorUnsupportedLimit = 42, cudaErrorDuplicateVariableName = 43, cudaErrorDuplicateTextureName = 44, cudaErrorDuplicateSurfaceName = 45, # 457 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorDevicesUnavailable = 46, cudaErrorInvalidKernelImage = 47, cudaErrorNoKernelImageForDevice = 48, # 483 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 cudaErrorIncompatibleDriverContext = 49, cudaErrorPeerAccessAlreadyEnabled = 50, cudaErrorPeerAccessNotEnabled = 51, cudaErrorDeviceAlreadyInUse = 54, cudaErrorProfilerDisabled = 55, cudaErrorProfilerNotInitialized = 56, cudaErrorProfilerAlreadyStarted = 57, cudaErrorProfilerAlreadyStopped = 58, cudaErrorAssert = 59, cudaErrorTooManyPeers = 60, cudaErrorHostMemoryAlreadyRegistered = 61, cudaErrorHostMemoryNotRegistered = 62, cudaErrorStartupFailure = 0x7f, cudaErrorApiFailureBase = 10000 }; enum cudaChannelFormatKind { cudaChannelFormatKindSigned = 0, cudaChannelFormatKindUnsigned = 1, cudaChannelFormatKindFloat = 2, cudaChannelFormatKindNone = 3 }; struct cudaChannelFormatDesc { int x; int y; int z; int w; enum cudaChannelFormatKind f; }; struct cudaArray; enum cudaMemoryType { cudaMemoryTypeHost = 1, cudaMemoryTypeDevice = 2 }; enum cudaMemcpyKind { cudaMemcpyHostToHost = 0, cudaMemcpyHostToDevice = 1, cudaMemcpyDeviceToHost = 2, cudaMemcpyDeviceToDevice = 3, cudaMemcpyDefault = 4 }; struct cudaPitchedPtr { void *ptr; size_t pitch; size_t xsize; size_t ysize; }; struct cudaExtent { size_t width; size_t height; size_t depth; }; struct cudaPos { size_t x; size_t y; size_t z; }; struct cudaMemcpy3DParms { struct cudaArray *srcArray; struct cudaPos srcPos; struct cudaPitchedPtr srcPtr; struct cudaArray *dstArray; struct cudaPos dstPos; struct cudaPitchedPtr dstPtr; struct cudaExtent extent; enum cudaMemcpyKind kind; }; struct cudaMemcpy3DPeerParms { struct cudaArray *srcArray; struct cudaPos srcPos; struct cudaPitchedPtr srcPtr; int srcDevice; struct cudaArray *dstArray; struct cudaPos dstPos; struct cudaPitchedPtr dstPtr; int dstDevice; struct cudaExtent extent; }; struct cudaGraphicsResource; enum cudaGraphicsRegisterFlags { cudaGraphicsRegisterFlagsNone = 0, cudaGraphicsRegisterFlagsReadOnly = 1, cudaGraphicsRegisterFlagsWriteDiscard = 2, cudaGraphicsRegisterFlagsSurfaceLoadStore = 4, cudaGraphicsRegisterFlagsTextureGather = 8 }; enum cudaGraphicsMapFlags { cudaGraphicsMapFlagsNone = 0, cudaGraphicsMapFlagsReadOnly = 1, cudaGraphicsMapFlagsWriteDiscard = 2 }; enum cudaGraphicsCubeFace { cudaGraphicsCubeFacePositiveX = 0x00, cudaGraphicsCubeFaceNegativeX = 0x01, cudaGraphicsCubeFacePositiveY = 0x02, cudaGraphicsCubeFaceNegativeY = 0x03, cudaGraphicsCubeFacePositiveZ = 0x04, cudaGraphicsCubeFaceNegativeZ = 0x05 }; struct cudaPointerAttributes { enum cudaMemoryType memoryType; # 752 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 int device; void *devicePointer; void *hostPointer; }; struct cudaFuncAttributes { size_t sharedSizeBytes; size_t constSizeBytes; size_t localSizeBytes; int maxThreadsPerBlock; int numRegs; int ptxVersion; int binaryVersion; }; enum cudaFuncCache { cudaFuncCachePreferNone = 0, cudaFuncCachePreferShared = 1, cudaFuncCachePreferL1 = 2, cudaFuncCachePreferEqual = 3 }; enum cudaComputeMode { cudaComputeModeDefault = 0, cudaComputeModeExclusive = 1, cudaComputeModeProhibited = 2, cudaComputeModeExclusiveProcess = 3 }; enum cudaLimit { cudaLimitStackSize = 0x00, cudaLimitPrintfFifoSize = 0x01, cudaLimitMallocHeapSize = 0x02 }; enum cudaOutputMode { cudaKeyValuePair = 0x00, cudaCSV = 0x01 }; struct cudaDeviceProp { char name[256]; size_t totalGlobalMem; size_t sharedMemPerBlock; int regsPerBlock; int warpSize; size_t memPitch; int maxThreadsPerBlock; int maxThreadsDim[3]; int maxGridSize[3]; int clockRate; size_t totalConstMem; int major; int minor; size_t textureAlignment; size_t texturePitchAlignment; int deviceOverlap; int multiProcessorCount; int kernelExecTimeoutEnabled; int integrated; int canMapHostMemory; int computeMode; int maxTexture1D; int maxTexture1DLinear; int maxTexture2D[2]; int maxTexture2DLinear[3]; int maxTexture2DGather[2]; int maxTexture3D[3]; int maxTextureCubemap; int maxTexture1DLayered[2]; int maxTexture2DLayered[3]; int maxTextureCubemapLayered[2]; int maxSurface1D; int maxSurface2D[2]; int maxSurface3D[3]; int maxSurface1DLayered[2]; int maxSurface2DLayered[3]; int maxSurfaceCubemap; int maxSurfaceCubemapLayered[2]; size_t surfaceAlignment; int concurrentKernels; int ECCEnabled; int pciBusID; int pciDeviceID; int pciDomainID; int tccDriver; int asyncEngineCount; int unifiedAddressing; int memoryClockRate; int memoryBusWidth; int l2CacheSize; int maxThreadsPerMultiProcessor; }; # 976 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 struct cudaIpcEventHandle_st { char reserved[64]; }; struct cudaIpcMemHandle_st { char reserved[64]; }; # 995 "/usr/local/cuda4.1/cuda/include/driver_types.h" 3 typedef enum cudaError cudaError_t; typedef struct CUstream_st *cudaStream_t; typedef struct CUevent_st *cudaEvent_t; typedef struct cudaGraphicsResource *cudaGraphicsResource_t; typedef struct CUuuid_st cudaUUID_t; typedef struct cudaIpcEventHandle_st cudaIpcEventHandle_t; typedef struct cudaIpcMemHandle_st cudaIpcMemHandle_t; typedef enum cudaOutputMode cudaOutputMode_t; # 58 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 2 3 # 1 "/usr/local/cuda4.1/cuda/include/surface_types.h" 1 3 # 84 "/usr/local/cuda4.1/cuda/include/surface_types.h" 3 enum cudaSurfaceBoundaryMode { cudaBoundaryModeZero = 0, cudaBoundaryModeClamp = 1, cudaBoundaryModeTrap = 2 }; enum cudaSurfaceFormatMode { cudaFormatModeForced = 0, cudaFormatModeAuto = 1 }; struct surfaceReference { struct cudaChannelFormatDesc channelDesc; }; # 59 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 2 3 # 1 "/usr/local/cuda4.1/cuda/include/texture_types.h" 1 3 # 84 "/usr/local/cuda4.1/cuda/include/texture_types.h" 3 enum cudaTextureAddressMode { cudaAddressModeWrap = 0, cudaAddressModeClamp = 1, cudaAddressModeMirror = 2, cudaAddressModeBorder = 3 }; enum cudaTextureFilterMode { cudaFilterModePoint = 0, cudaFilterModeLinear = 1 }; enum cudaTextureReadMode { cudaReadModeElementType = 0, cudaReadModeNormalizedFloat = 1 }; struct textureReference { int normalized; enum cudaTextureFilterMode filterMode; enum cudaTextureAddressMode addressMode[3]; struct cudaChannelFormatDesc channelDesc; int sRGB; int __cudaReserved[15]; }; # 60 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 2 3 # 1 "/usr/local/cuda4.1/cuda/include/vector_types.h" 1 3 # 59 "/usr/local/cuda4.1/cuda/include/vector_types.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 1 3 # 60 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/vector_types.h" 1 3 # 60 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 2 3 # 60 "/usr/local/cuda4.1/cuda/include/vector_types.h" 2 3 # 94 "/usr/local/cuda4.1/cuda/include/vector_types.h" 3 struct char1 { signed char x; }; struct uchar1 { unsigned char x; }; struct __attribute__((aligned(2))) char2 { signed char x, y; }; struct __attribute__((aligned(2))) uchar2 { unsigned char x, y; }; struct char3 { signed char x, y, z; }; struct uchar3 { unsigned char x, y, z; }; struct __attribute__((aligned(4))) char4 { signed char x, y, z, w; }; struct __attribute__((aligned(4))) uchar4 { unsigned char x, y, z, w; }; struct short1 { short x; }; struct ushort1 { unsigned short x; }; struct __attribute__((aligned(4))) short2 { short x, y; }; struct __attribute__((aligned(4))) ushort2 { unsigned short x, y; }; struct short3 { short x, y, z; }; struct ushort3 { unsigned short x, y, z; }; struct __attribute__((aligned(8))) short4 { short x; short y; short z; short w; }; struct __attribute__((aligned(8))) ushort4 { unsigned short x; unsigned short y; unsigned short z; unsigned short w; }; struct int1 { int x; }; struct uint1 { unsigned int x; }; struct __attribute__((aligned(8))) int2 { int x; int y; }; struct __attribute__((aligned(8))) uint2 { unsigned int x; unsigned int y; }; struct int3 { int x, y, z; }; struct uint3 { unsigned int x, y, z; }; struct __attribute__((aligned(16))) int4 { int x, y, z, w; }; struct __attribute__((aligned(16))) uint4 { unsigned int x, y, z, w; }; struct long1 { long int x; }; struct ulong1 { unsigned long x; }; struct __attribute__((aligned(2*sizeof(long int)))) long2 { long int x, y; }; struct __attribute__((aligned(2*sizeof(unsigned long int)))) ulong2 { unsigned long int x, y; }; struct long3 { long int x, y, z; }; struct ulong3 { unsigned long int x, y, z; }; struct __attribute__((aligned(16))) long4 { long int x, y, z, w; }; struct __attribute__((aligned(16))) ulong4 { unsigned long int x, y, z, w; }; struct float1 { float x; }; struct __attribute__((aligned(8))) float2 { float x; float y; }; struct float3 { float x, y, z; }; struct __attribute__((aligned(16))) float4 { float x, y, z, w; }; struct longlong1 { long long int x; }; struct ulonglong1 { unsigned long long int x; }; struct __attribute__((aligned(16))) longlong2 { long long int x, y; }; struct __attribute__((aligned(16))) ulonglong2 { unsigned long long int x, y; }; struct longlong3 { long long int x, y, z; }; struct ulonglong3 { unsigned long long int x, y, z; }; struct __attribute__((aligned(16))) longlong4 { long long int x, y, z ,w; }; struct __attribute__((aligned(16))) ulonglong4 { unsigned long long int x, y, z, w; }; struct double1 { double x; }; struct __attribute__((aligned(16))) double2 { double x, y; }; struct double3 { double x, y, z; }; struct __attribute__((aligned(16))) double4 { double x, y, z, w; }; # 338 "/usr/local/cuda4.1/cuda/include/vector_types.h" 3 typedef struct char1 char1; typedef struct uchar1 uchar1; typedef struct char2 char2; typedef struct uchar2 uchar2; typedef struct char3 char3; typedef struct uchar3 uchar3; typedef struct char4 char4; typedef struct uchar4 uchar4; typedef struct short1 short1; typedef struct ushort1 ushort1; typedef struct short2 short2; typedef struct ushort2 ushort2; typedef struct short3 short3; typedef struct ushort3 ushort3; typedef struct short4 short4; typedef struct ushort4 ushort4; typedef struct int1 int1; typedef struct uint1 uint1; typedef struct int2 int2; typedef struct uint2 uint2; typedef struct int3 int3; typedef struct uint3 uint3; typedef struct int4 int4; typedef struct uint4 uint4; typedef struct long1 long1; typedef struct ulong1 ulong1; typedef struct long2 long2; typedef struct ulong2 ulong2; typedef struct long3 long3; typedef struct ulong3 ulong3; typedef struct long4 long4; typedef struct ulong4 ulong4; typedef struct float1 float1; typedef struct float2 float2; typedef struct float3 float3; typedef struct float4 float4; typedef struct longlong1 longlong1; typedef struct ulonglong1 ulonglong1; typedef struct longlong2 longlong2; typedef struct ulonglong2 ulonglong2; typedef struct longlong3 longlong3; typedef struct ulonglong3 ulonglong3; typedef struct longlong4 longlong4; typedef struct ulonglong4 ulonglong4; typedef struct double1 double1; typedef struct double2 double2; typedef struct double3 double3; typedef struct double4 double4; struct dim3 { unsigned int x, y, z; dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {} dim3(uint3 v) : x(v.x), y(v.y), z(v.z) {} operator uint3(void) { uint3 t; t.x = x; t.y = y; t.z = z; return t; } }; typedef struct dim3 dim3; # 60 "/usr/local/cuda4.1/cuda/include/builtin_types.h" 2 3 # 70 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 2 3 # 1 "/usr/local/cuda4.1/cuda/include/crt/storage_class.h" 1 3 # 71 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 2 3 # 213 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stddef.h" 2 3 # 125 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 577 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 588 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 600 "/usr/local/cuda4.1/cuda/include/driver_types.h" struct cudaArray; # 605 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 614 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 627 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 639 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 650 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 660 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 677 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 695 "/usr/local/cuda4.1/cuda/include/driver_types.h" struct cudaGraphicsResource; # 700 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 712 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 722 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 735 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 770 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 820 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 831 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 842 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 852 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 861 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 976 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 981 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 995 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 1000 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 1005 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 1010 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 1015 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 1020 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 1021 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 1026 "/usr/local/cuda4.1/cuda/include/driver_types.h" # 84 "/usr/local/cuda4.1/cuda/include/surface_types.h" # 94 "/usr/local/cuda4.1/cuda/include/surface_types.h" # 103 "/usr/local/cuda4.1/cuda/include/surface_types.h" # 84 "/usr/local/cuda4.1/cuda/include/texture_types.h" # 95 "/usr/local/cuda4.1/cuda/include/texture_types.h" # 104 "/usr/local/cuda4.1/cuda/include/texture_types.h" # 113 "/usr/local/cuda4.1/cuda/include/texture_types.h" # 94 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 99 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 105 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 110 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 115 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 120 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 125 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 130 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 135 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 140 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 145 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 150 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 155 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 160 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 165 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 166 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 168 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 173 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 178 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 179 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 181 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 186 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 191 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 196 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 201 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 206 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 216 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 221 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 228 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 233 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 238 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 243 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 248 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 253 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 255 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 260 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 265 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 270 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 275 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 280 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 285 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 290 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 295 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 300 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 305 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 310 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 315 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 320 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 338 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 339 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 340 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 341 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 342 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 343 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 344 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 345 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 346 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 347 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 348 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 349 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 350 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 351 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 352 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 353 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 354 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 355 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 356 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 357 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 358 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 359 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 360 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 361 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 362 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 363 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 364 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 365 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 366 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 367 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 368 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 369 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 370 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 371 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 372 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 373 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 374 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 375 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 376 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 377 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 378 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 379 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 380 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 381 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 382 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 383 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 384 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 385 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 393 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 403 "/usr/local/cuda4.1/cuda/include/vector_types.h" # 134 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceReset(); # 151 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceSynchronize(); # 203 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceSetLimit(cudaLimit , size_t ); # 227 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceGetLimit(size_t * , cudaLimit ); # 257 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache * ); # 298 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache ); # 321 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceGetByPCIBusId(int * , char * ); # 348 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceGetPCIBusId(char * , int , int ); # 387 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t * , cudaEvent_t ); # 419 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaIpcOpenEventHandle(cudaEvent_t * , cudaIpcEventHandle_t ); # 454 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t * , void * ); # 492 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaIpcOpenMemHandle(void ** , cudaIpcMemHandle_t ); # 519 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaIpcCloseMemHandle(void * ); # 553 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadExit(); # 577 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadSynchronize(); # 636 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadSetLimit(cudaLimit , size_t ); # 667 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadGetLimit(size_t * , cudaLimit ); # 702 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadGetCacheConfig(cudaFuncCache * ); # 748 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadSetCacheConfig(cudaFuncCache ); # 800 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetLastError(); # 841 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaPeekAtLastError(); # 855 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" const char *cudaGetErrorString(cudaError_t ); # 885 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetDeviceCount(int * ); # 1088 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetDeviceProperties(cudaDeviceProp * , int ); # 1107 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaChooseDevice(int * , const cudaDeviceProp * ); # 1140 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDevice(int ); # 1157 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetDevice(int * ); # 1186 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetValidDevices(int * , int ); # 1246 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDeviceFlags(unsigned ); # 1272 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamCreate(cudaStream_t * ); # 1293 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamDestroy(cudaStream_t ); # 1329 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamWaitEvent(cudaStream_t , cudaEvent_t , unsigned ); # 1348 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamSynchronize(cudaStream_t ); # 1366 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamQuery(cudaStream_t ); # 1398 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventCreate(cudaEvent_t * ); # 1429 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventCreateWithFlags(cudaEvent_t * , unsigned ); # 1462 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventRecord(cudaEvent_t , cudaStream_t = 0); # 1491 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventQuery(cudaEvent_t ); # 1523 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventSynchronize(cudaEvent_t ); # 1548 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventDestroy(cudaEvent_t ); # 1589 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventElapsedTime(float * , cudaEvent_t , cudaEvent_t ); # 1628 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaConfigureCall(dim3 , dim3 , size_t = (0), cudaStream_t = 0); # 1655 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetupArgument(const void * , size_t , size_t ); # 1701 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaFuncSetCacheConfig(const char * , cudaFuncCache ); # 1736 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaLaunch(const char * ); # 1769 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaFuncGetAttributes(cudaFuncAttributes * , const char * ); # 1791 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDoubleForDevice(double * ); # 1813 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDoubleForHost(double * ); # 1845 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMalloc(void ** , size_t ); # 1874 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMallocHost(void ** , size_t ); # 1913 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMallocPitch(void ** , size_t * , size_t , size_t ); # 1955 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMallocArray(cudaArray ** , const cudaChannelFormatDesc * , size_t , size_t = (0), unsigned = (0)); # 1979 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaFree(void * ); # 1999 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaFreeHost(void * ); # 2021 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaFreeArray(cudaArray * ); # 2080 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostAlloc(void ** , size_t , unsigned ); # 2136 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostRegister(void * , size_t , unsigned ); # 2155 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostUnregister(void * ); # 2182 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostGetDevicePointer(void ** , void * , unsigned ); # 2201 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostGetFlags(unsigned * , void * ); # 2236 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMalloc3D(cudaPitchedPtr * , cudaExtent ); # 2336 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMalloc3DArray(cudaArray ** , const cudaChannelFormatDesc * , cudaExtent , unsigned = (0)); # 2433 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms * ); # 2460 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms * ); # 2565 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms * , cudaStream_t = 0); # 2586 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms * , cudaStream_t = 0); # 2605 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemGetInfo(size_t * , size_t * ); # 2638 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy(void * , const void * , size_t , cudaMemcpyKind ); # 2669 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyPeer(void * , int , const void * , int , size_t ); # 2702 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToArray(cudaArray * , size_t , size_t , const void * , size_t , cudaMemcpyKind ); # 2735 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromArray(void * , const cudaArray * , size_t , size_t , size_t , cudaMemcpyKind ); # 2770 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyArrayToArray(cudaArray * , size_t , size_t , const cudaArray * , size_t , size_t , size_t , cudaMemcpyKind = cudaMemcpyDeviceToDevice); # 2812 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2D(void * , size_t , const void * , size_t , size_t , size_t , cudaMemcpyKind ); # 2853 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DToArray(cudaArray * , size_t , size_t , const void * , size_t , size_t , size_t , cudaMemcpyKind ); # 2894 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DFromArray(void * , size_t , const cudaArray * , size_t , size_t , size_t , size_t , cudaMemcpyKind ); # 2933 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DArrayToArray(cudaArray * , size_t , size_t , const cudaArray * , size_t , size_t , size_t , size_t , cudaMemcpyKind = cudaMemcpyDeviceToDevice); # 2968 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToSymbol(const char * , const void * , size_t , size_t = (0), cudaMemcpyKind = cudaMemcpyHostToDevice); # 3002 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromSymbol(void * , const char * , size_t , size_t = (0), cudaMemcpyKind = cudaMemcpyDeviceToHost); # 3045 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyAsync(void * , const void * , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3075 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyPeerAsync(void * , int , const void * , int , size_t , cudaStream_t = 0); # 3117 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToArrayAsync(cudaArray * , size_t , size_t , const void * , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3159 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromArrayAsync(void * , const cudaArray * , size_t , size_t , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3210 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DAsync(void * , size_t , const void * , size_t , size_t , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3260 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DToArrayAsync(cudaArray * , size_t , size_t , const void * , size_t , size_t , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3310 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DFromArrayAsync(void * , size_t , const cudaArray * , size_t , size_t , size_t , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3354 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToSymbolAsync(const char * , const void * , size_t , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3397 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromSymbolAsync(void * , const char * , size_t , size_t , cudaMemcpyKind , cudaStream_t = 0); # 3419 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset(void * , int , size_t ); # 3445 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset2D(void * , size_t , int , size_t , size_t ); # 3484 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset3D(cudaPitchedPtr , int , cudaExtent ); # 3511 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemsetAsync(void * , int , size_t , cudaStream_t = 0); # 3543 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset2DAsync(void * , size_t , int , size_t , size_t , cudaStream_t = 0); # 3588 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset3DAsync(cudaPitchedPtr , int , cudaExtent , cudaStream_t = 0); # 3615 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetSymbolAddress(void ** , const char * ); # 3638 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetSymbolSize(size_t * , const char * ); # 3783 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaPointerGetAttributes(cudaPointerAttributes * , void * ); # 3817 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceCanAccessPeer(int * , int , int ); # 3858 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceEnablePeerAccess(int , unsigned ); # 3883 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDeviceDisablePeerAccess(int ); # 3929 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t ); # 3961 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t , unsigned ); # 3996 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsMapResources(int , cudaGraphicsResource_t * , cudaStream_t = 0); # 4027 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsUnmapResources(int , cudaGraphicsResource_t * , cudaStream_t = 0); # 4056 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsResourceGetMappedPointer(void ** , size_t * , cudaGraphicsResource_t ); # 4090 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray ** , cudaGraphicsResource_t , unsigned , unsigned ); # 4123 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc * , const cudaArray * ); # 4158 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaChannelFormatDesc cudaCreateChannelDesc(int , int , int , int , cudaChannelFormatKind ); # 4205 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindTexture(size_t * , const textureReference * , const void * , const cudaChannelFormatDesc * , size_t = (((2147483647) * 2U) + 1U)); # 4256 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindTexture2D(size_t * , const textureReference * , const void * , const cudaChannelFormatDesc * , size_t , size_t , size_t ); # 4284 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindTextureToArray(const textureReference * , const cudaArray * , const cudaChannelFormatDesc * ); # 4305 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaUnbindTexture(const textureReference * ); # 4330 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetTextureAlignmentOffset(size_t * , const textureReference * ); # 4354 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetTextureReference(const textureReference ** , const char * ); # 4387 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindSurfaceToArray(const surfaceReference * , const cudaArray * , const cudaChannelFormatDesc * ); # 4405 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetSurfaceReference(const surfaceReference ** , const char * ); # 4432 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaDriverGetVersion(int * ); # 4449 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaRuntimeGetVersion(int * ); # 4454 "/usr/local/cuda4.1/cuda/include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetExportTable(const void ** , const cudaUUID_t * ); # 107 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template< class T> inline cudaChannelFormatDesc cudaCreateChannelDesc() # 108 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 109 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(0, 0, 0, 0, cudaChannelFormatKindNone); # 110 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 112 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf() # 113 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 114 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 116 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 117 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 119 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf1() # 120 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 121 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 123 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 124 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 126 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf2() # 127 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 128 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 130 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat); # 131 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 133 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf4() # 134 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 135 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 137 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat); # 138 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 140 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char> () # 141 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 142 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(char)) * 8); # 147 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 149 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 151 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< signed char> () # 152 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 153 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 155 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 156 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 158 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< unsigned char> () # 159 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 160 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 162 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 163 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 165 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char1> () # 166 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 167 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 169 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 170 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 172 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uchar1> () # 173 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 174 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 176 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 177 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 179 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char2> () # 180 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 181 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 183 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned); # 184 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 186 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uchar2> () # 187 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 188 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 190 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned); # 191 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 193 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char4> () # 194 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 195 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 197 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned); # 198 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 200 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uchar4> () # 201 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 202 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 204 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned); # 205 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 207 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short> () # 208 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 209 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 211 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 212 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 214 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< unsigned short> () # 215 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 216 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 218 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 219 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 221 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short1> () # 222 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 223 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 225 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 226 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 228 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< ushort1> () # 229 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 230 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 232 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 233 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 235 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short2> () # 236 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 237 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 239 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned); # 240 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 242 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< ushort2> () # 243 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 244 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 246 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned); # 247 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 249 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short4> () # 250 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 251 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 253 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned); # 254 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 256 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< ushort4> () # 257 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 258 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 260 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned); # 261 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 263 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int> () # 264 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 265 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 267 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 268 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 270 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< unsigned> () # 271 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 272 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 274 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 275 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 277 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int1> () # 278 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 279 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 281 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 282 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 284 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uint1> () # 285 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 286 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 288 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 289 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 291 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int2> () # 292 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 293 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 295 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned); # 296 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 298 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uint2> () # 299 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 300 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 302 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned); # 303 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 305 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int4> () # 306 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 307 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 309 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned); # 310 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 312 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uint4> () # 313 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 314 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 316 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned); # 317 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 379 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float> () # 380 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 381 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 383 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 384 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 386 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float1> () # 387 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 388 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 390 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 391 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 393 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float2> () # 394 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 395 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 397 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat); # 398 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 400 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float4> () # 401 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" { # 402 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 404 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat); # 405 "/usr/local/cuda4.1/cuda/include/channel_descriptor.h" } # 79 "/usr/local/cuda4.1/cuda/include/driver_functions.h" static inline cudaPitchedPtr make_cudaPitchedPtr(void *d, size_t p, size_t xsz, size_t ysz) # 80 "/usr/local/cuda4.1/cuda/include/driver_functions.h" { # 81 "/usr/local/cuda4.1/cuda/include/driver_functions.h" cudaPitchedPtr s; # 83 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (s.ptr) = d; # 84 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (s.pitch) = p; # 85 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (s.xsize) = xsz; # 86 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (s.ysize) = ysz; # 88 "/usr/local/cuda4.1/cuda/include/driver_functions.h" return s; # 89 "/usr/local/cuda4.1/cuda/include/driver_functions.h" } # 106 "/usr/local/cuda4.1/cuda/include/driver_functions.h" static inline cudaPos make_cudaPos(size_t x, size_t y, size_t z) # 107 "/usr/local/cuda4.1/cuda/include/driver_functions.h" { # 108 "/usr/local/cuda4.1/cuda/include/driver_functions.h" cudaPos p; # 110 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (p.x) = x; # 111 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (p.y) = y; # 112 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (p.z) = z; # 114 "/usr/local/cuda4.1/cuda/include/driver_functions.h" return p; # 115 "/usr/local/cuda4.1/cuda/include/driver_functions.h" } # 132 "/usr/local/cuda4.1/cuda/include/driver_functions.h" static inline cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) # 133 "/usr/local/cuda4.1/cuda/include/driver_functions.h" { # 134 "/usr/local/cuda4.1/cuda/include/driver_functions.h" cudaExtent e; # 136 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (e.width) = w; # 137 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (e.height) = h; # 138 "/usr/local/cuda4.1/cuda/include/driver_functions.h" (e.depth) = d; # 140 "/usr/local/cuda4.1/cuda/include/driver_functions.h" return e; # 141 "/usr/local/cuda4.1/cuda/include/driver_functions.h" } # 69 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline char1 make_char1(signed char x) # 70 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 71 "/usr/local/cuda4.1/cuda/include/vector_functions.h" char1 t; (t.x) = x; return t; # 72 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 74 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uchar1 make_uchar1(unsigned char x) # 75 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 76 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uchar1 t; (t.x) = x; return t; # 77 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 79 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline char2 make_char2(signed char x, signed char y) # 80 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 81 "/usr/local/cuda4.1/cuda/include/vector_functions.h" char2 t; (t.x) = x; (t.y) = y; return t; # 82 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 84 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uchar2 make_uchar2(unsigned char x, unsigned char y) # 85 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 86 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uchar2 t; (t.x) = x; (t.y) = y; return t; # 87 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 89 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline char3 make_char3(signed char x, signed char y, signed char z) # 90 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 91 "/usr/local/cuda4.1/cuda/include/vector_functions.h" char3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 92 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 94 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z) # 95 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 96 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uchar3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 97 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 99 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline char4 make_char4(signed char x, signed char y, signed char z, signed char w) # 100 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 101 "/usr/local/cuda4.1/cuda/include/vector_functions.h" char4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 102 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 104 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) # 105 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 106 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uchar4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 107 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 109 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline short1 make_short1(short x) # 110 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 111 "/usr/local/cuda4.1/cuda/include/vector_functions.h" short1 t; (t.x) = x; return t; # 112 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 114 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ushort1 make_ushort1(unsigned short x) # 115 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 116 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ushort1 t; (t.x) = x; return t; # 117 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 119 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline short2 make_short2(short x, short y) # 120 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 121 "/usr/local/cuda4.1/cuda/include/vector_functions.h" short2 t; (t.x) = x; (t.y) = y; return t; # 122 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 124 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ushort2 make_ushort2(unsigned short x, unsigned short y) # 125 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 126 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ushort2 t; (t.x) = x; (t.y) = y; return t; # 127 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 129 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline short3 make_short3(short x, short y, short z) # 130 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 131 "/usr/local/cuda4.1/cuda/include/vector_functions.h" short3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 132 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 134 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z) # 135 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 136 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ushort3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 137 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 139 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline short4 make_short4(short x, short y, short z, short w) # 140 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 141 "/usr/local/cuda4.1/cuda/include/vector_functions.h" short4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 142 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 144 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) # 145 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 146 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ushort4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 147 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 149 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline int1 make_int1(int x) # 150 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 151 "/usr/local/cuda4.1/cuda/include/vector_functions.h" int1 t; (t.x) = x; return t; # 152 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 154 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uint1 make_uint1(unsigned x) # 155 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 156 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uint1 t; (t.x) = x; return t; # 157 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 159 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline int2 make_int2(int x, int y) # 160 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 161 "/usr/local/cuda4.1/cuda/include/vector_functions.h" int2 t; (t.x) = x; (t.y) = y; return t; # 162 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 164 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uint2 make_uint2(unsigned x, unsigned y) # 165 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 166 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uint2 t; (t.x) = x; (t.y) = y; return t; # 167 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 169 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline int3 make_int3(int x, int y, int z) # 170 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 171 "/usr/local/cuda4.1/cuda/include/vector_functions.h" int3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 172 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 174 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uint3 make_uint3(unsigned x, unsigned y, unsigned z) # 175 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 176 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uint3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 177 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 179 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline int4 make_int4(int x, int y, int z, int w) # 180 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 181 "/usr/local/cuda4.1/cuda/include/vector_functions.h" int4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 182 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 184 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline uint4 make_uint4(unsigned x, unsigned y, unsigned z, unsigned w) # 185 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 186 "/usr/local/cuda4.1/cuda/include/vector_functions.h" uint4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 187 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 189 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline long1 make_long1(long x) # 190 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 191 "/usr/local/cuda4.1/cuda/include/vector_functions.h" long1 t; (t.x) = x; return t; # 192 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 194 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulong1 make_ulong1(unsigned long x) # 195 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 196 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulong1 t; (t.x) = x; return t; # 197 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 199 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline long2 make_long2(long x, long y) # 200 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 201 "/usr/local/cuda4.1/cuda/include/vector_functions.h" long2 t; (t.x) = x; (t.y) = y; return t; # 202 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 204 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulong2 make_ulong2(unsigned long x, unsigned long y) # 205 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 206 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulong2 t; (t.x) = x; (t.y) = y; return t; # 207 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 209 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline long3 make_long3(long x, long y, long z) # 210 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 211 "/usr/local/cuda4.1/cuda/include/vector_functions.h" long3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 212 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 214 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulong3 make_ulong3(unsigned long x, unsigned long y, unsigned long z) # 215 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 216 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulong3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 217 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 219 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline long4 make_long4(long x, long y, long z, long w) # 220 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 221 "/usr/local/cuda4.1/cuda/include/vector_functions.h" long4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 222 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 224 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulong4 make_ulong4(unsigned long x, unsigned long y, unsigned long z, unsigned long w) # 225 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 226 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulong4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 227 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 229 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline float1 make_float1(float x) # 230 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 231 "/usr/local/cuda4.1/cuda/include/vector_functions.h" float1 t; (t.x) = x; return t; # 232 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 234 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline float2 make_float2(float x, float y) # 235 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 236 "/usr/local/cuda4.1/cuda/include/vector_functions.h" float2 t; (t.x) = x; (t.y) = y; return t; # 237 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 239 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline float3 make_float3(float x, float y, float z) # 240 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 241 "/usr/local/cuda4.1/cuda/include/vector_functions.h" float3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 242 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 244 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline float4 make_float4(float x, float y, float z, float w) # 245 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 246 "/usr/local/cuda4.1/cuda/include/vector_functions.h" float4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 247 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 249 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline longlong1 make_longlong1(long long x) # 250 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 251 "/usr/local/cuda4.1/cuda/include/vector_functions.h" longlong1 t; (t.x) = x; return t; # 252 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 254 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulonglong1 make_ulonglong1(unsigned long long x) # 255 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 256 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulonglong1 t; (t.x) = x; return t; # 257 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 259 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline longlong2 make_longlong2(long long x, long long y) # 260 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 261 "/usr/local/cuda4.1/cuda/include/vector_functions.h" longlong2 t; (t.x) = x; (t.y) = y; return t; # 262 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 264 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulonglong2 make_ulonglong2(unsigned long long x, unsigned long long y) # 265 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 266 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulonglong2 t; (t.x) = x; (t.y) = y; return t; # 267 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 269 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline longlong3 make_longlong3(long long x, long long y, long long z) # 270 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 271 "/usr/local/cuda4.1/cuda/include/vector_functions.h" longlong3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 272 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 274 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulonglong3 make_ulonglong3(unsigned long long x, unsigned long long y, unsigned long long z) # 275 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 276 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulonglong3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 277 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 279 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline longlong4 make_longlong4(long long x, long long y, long long z, long long w) # 280 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 281 "/usr/local/cuda4.1/cuda/include/vector_functions.h" longlong4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 282 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 284 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline ulonglong4 make_ulonglong4(unsigned long long x, unsigned long long y, unsigned long long z, unsigned long long w) # 285 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 286 "/usr/local/cuda4.1/cuda/include/vector_functions.h" ulonglong4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 287 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 289 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline double1 make_double1(double x) # 290 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 291 "/usr/local/cuda4.1/cuda/include/vector_functions.h" double1 t; (t.x) = x; return t; # 292 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 294 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline double2 make_double2(double x, double y) # 295 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 296 "/usr/local/cuda4.1/cuda/include/vector_functions.h" double2 t; (t.x) = x; (t.y) = y; return t; # 297 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 299 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline double3 make_double3(double x, double y, double z) # 300 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 301 "/usr/local/cuda4.1/cuda/include/vector_functions.h" double3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 302 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 304 "/usr/local/cuda4.1/cuda/include/vector_functions.h" static inline double4 make_double4(double x, double y, double z, double w) # 305 "/usr/local/cuda4.1/cuda/include/vector_functions.h" { # 306 "/usr/local/cuda4.1/cuda/include/vector_functions.h" double4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 307 "/usr/local/cuda4.1/cuda/include/vector_functions.h" } # 44 "/usr/include/string.h" 3 extern "C" void *memcpy(void *__restrict__ , const void *__restrict__ , size_t ) throw() # 46 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 49 "/usr/include/string.h" 3 extern "C" void *memmove(void * , const void * , size_t ) throw() # 50 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 57 "/usr/include/string.h" 3 extern "C" void *memccpy(void *__restrict__ , const void *__restrict__ , int , size_t ) throw() # 59 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 65 "/usr/include/string.h" 3 extern "C" void *memset(void * , int , size_t ) throw() __attribute((__nonnull__(1))); # 68 "/usr/include/string.h" 3 extern "C" int memcmp(const void * , const void * , size_t ) throw() # 69 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 75 "/usr/include/string.h" 3 extern void *memchr(void * , int , size_t ) throw() __asm__("memchr") # 76 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 77 "/usr/include/string.h" 3 extern const void *memchr(const void * , int , size_t ) throw() __asm__("memchr") # 78 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 104 "/usr/include/string.h" 3 void *rawmemchr(void * , int ) throw() __asm__("rawmemchr") # 105 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 106 "/usr/include/string.h" 3 const void *rawmemchr(const void * , int ) throw() __asm__("rawmemchr") # 107 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 115 "/usr/include/string.h" 3 void *memrchr(void * , int , size_t ) throw() __asm__("memrchr") # 116 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 117 "/usr/include/string.h" 3 const void *memrchr(const void * , int , size_t ) throw() __asm__("memrchr") # 118 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 128 "/usr/include/string.h" 3 extern "C" char *strcpy(char *__restrict__ , const char *__restrict__ ) throw() # 129 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 131 "/usr/include/string.h" 3 extern "C" char *strncpy(char *__restrict__ , const char *__restrict__ , size_t ) throw() # 133 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 136 "/usr/include/string.h" 3 extern "C" char *strcat(char *__restrict__ , const char *__restrict__ ) throw() # 137 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 139 "/usr/include/string.h" 3 extern "C" char *strncat(char *__restrict__ , const char *__restrict__ , size_t ) throw() # 140 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 143 "/usr/include/string.h" 3 extern "C" int strcmp(const char * , const char * ) throw() # 144 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 146 "/usr/include/string.h" 3 extern "C" int strncmp(const char * , const char * , size_t ) throw() # 147 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 150 "/usr/include/string.h" 3 extern "C" int strcoll(const char * , const char * ) throw() # 151 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 153 "/usr/include/string.h" 3 extern "C" size_t strxfrm(char *__restrict__ , const char *__restrict__ , size_t ) throw() # 155 "/usr/include/string.h" 3 __attribute((__nonnull__(2))); # 40 "/usr/include/xlocale.h" 3 extern "C" { typedef # 28 "/usr/include/xlocale.h" 3 struct __locale_struct { # 31 "/usr/include/xlocale.h" 3 struct __locale_data *__locales[13]; # 34 "/usr/include/xlocale.h" 3 const unsigned short *__ctype_b; # 35 "/usr/include/xlocale.h" 3 const int *__ctype_tolower; # 36 "/usr/include/xlocale.h" 3 const int *__ctype_toupper; # 39 "/usr/include/xlocale.h" 3 const char *__names[13]; # 40 "/usr/include/xlocale.h" 3 } *__locale_t; } # 43 "/usr/include/xlocale.h" 3 extern "C" { typedef __locale_t locale_t; } # 165 "/usr/include/string.h" 3 extern "C" int strcoll_l(const char * , const char * , __locale_t ) throw() # 166 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2, 3))); # 168 "/usr/include/string.h" 3 extern "C" size_t strxfrm_l(char * , const char * , size_t , __locale_t ) throw() # 169 "/usr/include/string.h" 3 __attribute((__nonnull__(2, 4))); # 175 "/usr/include/string.h" 3 extern "C" char *strdup(const char * ) throw() # 176 "/usr/include/string.h" 3 __attribute((__malloc__)) __attribute((__nonnull__(1))); # 183 "/usr/include/string.h" 3 extern "C" char *strndup(const char * , size_t ) throw() # 184 "/usr/include/string.h" 3 __attribute((__malloc__)) __attribute((__nonnull__(1))); # 215 "/usr/include/string.h" 3 extern char *strchr(char * , int ) throw() __asm__("strchr") # 216 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 217 "/usr/include/string.h" 3 extern const char *strchr(const char * , int ) throw() __asm__("strchr") # 218 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 242 "/usr/include/string.h" 3 extern char *strrchr(char * , int ) throw() __asm__("strrchr") # 243 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 244 "/usr/include/string.h" 3 extern const char *strrchr(const char * , int ) throw() __asm__("strrchr") # 245 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 271 "/usr/include/string.h" 3 char *strchrnul(char * , int ) throw() __asm__("strchrnul") # 272 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 273 "/usr/include/string.h" 3 const char *strchrnul(const char * , int ) throw() __asm__("strchrnul") # 274 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 284 "/usr/include/string.h" 3 extern "C" size_t strcspn(const char * , const char * ) throw() # 285 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 288 "/usr/include/string.h" 3 extern "C" size_t strspn(const char * , const char * ) throw() # 289 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 294 "/usr/include/string.h" 3 extern char *strpbrk(char * , const char * ) throw() __asm__("strpbrk") # 295 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 296 "/usr/include/string.h" 3 extern const char *strpbrk(const char * , const char * ) throw() __asm__("strpbrk") # 297 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 321 "/usr/include/string.h" 3 extern char *strstr(char * , const char * ) throw() __asm__("strstr") # 322 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 323 "/usr/include/string.h" 3 extern const char *strstr(const char * , const char * ) throw() __asm__("strstr") # 325 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 348 "/usr/include/string.h" 3 extern "C" char *strtok(char *__restrict__ , const char *__restrict__ ) throw() # 349 "/usr/include/string.h" 3 __attribute((__nonnull__(2))); # 354 "/usr/include/string.h" 3 extern "C" char *__strtok_r(char *__restrict__ , const char *__restrict__ , char **__restrict__ ) throw() # 357 "/usr/include/string.h" 3 __attribute((__nonnull__(2, 3))); # 359 "/usr/include/string.h" 3 extern "C" char *strtok_r(char *__restrict__ , const char *__restrict__ , char **__restrict__ ) throw() # 361 "/usr/include/string.h" 3 __attribute((__nonnull__(2, 3))); # 367 "/usr/include/string.h" 3 char *strcasestr(char * , const char * ) throw() __asm__("strcasestr") # 368 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 369 "/usr/include/string.h" 3 const char *strcasestr(const char * , const char * ) throw() __asm__("strcasestr") # 371 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 382 "/usr/include/string.h" 3 extern "C" void *memmem(const void * , size_t , const void * , size_t ) throw() # 384 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 3))); # 388 "/usr/include/string.h" 3 extern "C" void *__mempcpy(void *__restrict__ , const void *__restrict__ , size_t ) throw() # 390 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 391 "/usr/include/string.h" 3 extern "C" void *mempcpy(void *__restrict__ , const void *__restrict__ , size_t ) throw() # 393 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 399 "/usr/include/string.h" 3 extern "C" size_t strlen(const char * ) throw() # 400 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 406 "/usr/include/string.h" 3 extern "C" size_t strnlen(const char * , size_t ) throw() # 407 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 413 "/usr/include/string.h" 3 extern "C" char *strerror(int ) throw(); # 438 "/usr/include/string.h" 3 extern "C" char *strerror_r(int , char * , size_t ) throw() # 439 "/usr/include/string.h" 3 __attribute((__nonnull__(2))); # 445 "/usr/include/string.h" 3 extern "C" char *strerror_l(int , __locale_t ) throw(); # 451 "/usr/include/string.h" 3 extern "C" void __bzero(void * , size_t ) throw() __attribute((__nonnull__(1))); # 455 "/usr/include/string.h" 3 extern "C" void bcopy(const void * , void * , size_t ) throw() # 456 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 459 "/usr/include/string.h" 3 extern "C" void bzero(void * , size_t ) throw() __attribute((__nonnull__(1))); # 462 "/usr/include/string.h" 3 extern "C" int bcmp(const void * , const void * , size_t ) throw() # 463 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 469 "/usr/include/string.h" 3 extern char *index(char * , int ) throw() __asm__("index") # 470 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 471 "/usr/include/string.h" 3 extern const char *index(const char * , int ) throw() __asm__("index") # 472 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 497 "/usr/include/string.h" 3 extern char *rindex(char * , int ) throw() __asm__("rindex") # 498 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 499 "/usr/include/string.h" 3 extern const char *rindex(const char * , int ) throw() __asm__("rindex") # 500 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 523 "/usr/include/string.h" 3 extern "C" int ffs(int ) throw() __attribute((const)); # 528 "/usr/include/string.h" 3 extern "C" int ffsl(long ) throw() __attribute((const)); # 530 "/usr/include/string.h" 3 extern "C" int ffsll(long long ) throw() # 531 "/usr/include/string.h" 3 __attribute((const)); # 536 "/usr/include/string.h" 3 extern "C" int strcasecmp(const char * , const char * ) throw() # 537 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 540 "/usr/include/string.h" 3 extern "C" int strncasecmp(const char * , const char * , size_t ) throw() # 541 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 547 "/usr/include/string.h" 3 extern "C" int strcasecmp_l(const char * , const char * , __locale_t ) throw() # 549 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2, 3))); # 551 "/usr/include/string.h" 3 extern "C" int strncasecmp_l(const char * , const char * , size_t , __locale_t ) throw() # 553 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2, 4))); # 559 "/usr/include/string.h" 3 extern "C" char *strsep(char **__restrict__ , const char *__restrict__ ) throw() # 561 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 566 "/usr/include/string.h" 3 extern "C" char *strsignal(int ) throw(); # 569 "/usr/include/string.h" 3 extern "C" char *__stpcpy(char *__restrict__ , const char *__restrict__ ) throw() # 570 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 571 "/usr/include/string.h" 3 extern "C" char *stpcpy(char *__restrict__ , const char *__restrict__ ) throw() # 572 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 576 "/usr/include/string.h" 3 extern "C" char *__stpncpy(char *__restrict__ , const char *__restrict__ , size_t ) throw() # 578 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 579 "/usr/include/string.h" 3 extern "C" char *stpncpy(char *__restrict__ , const char *__restrict__ , size_t ) throw() # 581 "/usr/include/string.h" 3 __attribute((__nonnull__(1, 2))); # 586 "/usr/include/string.h" 3 extern "C" int strverscmp(const char * , const char * ) throw() # 587 "/usr/include/string.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1, 2))); # 590 "/usr/include/string.h" 3 extern "C" char *strfry(char * ) throw() __attribute((__nonnull__(1))); # 593 "/usr/include/string.h" 3 extern "C" void *memfrob(void * , size_t ) throw() __attribute((__nonnull__(1))); # 601 "/usr/include/string.h" 3 char *basename(char * ) throw() __asm__("basename") # 602 "/usr/include/string.h" 3 __attribute((__nonnull__(1))); # 603 "/usr/include/string.h" 3 const char *basename(const char * ) throw() __asm__("basename") # 604 "/usr/include/string.h" 3 __attribute((__nonnull__(1))); # 31 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned char __u_char; } # 32 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned short __u_short; } # 33 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __u_int; } # 34 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __u_long; } # 37 "/usr/include/bits/types.h" 3 extern "C" { typedef signed char __int8_t; } # 38 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned char __uint8_t; } # 39 "/usr/include/bits/types.h" 3 extern "C" { typedef signed short __int16_t; } # 40 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned short __uint16_t; } # 41 "/usr/include/bits/types.h" 3 extern "C" { typedef signed int __int32_t; } # 42 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __uint32_t; } # 44 "/usr/include/bits/types.h" 3 extern "C" { typedef signed long __int64_t; } # 45 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __uint64_t; } # 53 "/usr/include/bits/types.h" 3 extern "C" { typedef long __quad_t; } # 54 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __u_quad_t; } # 134 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __dev_t; } # 135 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __uid_t; } # 136 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __gid_t; } # 137 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __ino_t; } # 138 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __ino64_t; } # 139 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __mode_t; } # 140 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __nlink_t; } # 141 "/usr/include/bits/types.h" 3 extern "C" { typedef long __off_t; } # 142 "/usr/include/bits/types.h" 3 extern "C" { typedef long __off64_t; } # 143 "/usr/include/bits/types.h" 3 extern "C" { typedef int __pid_t; } # 144 "/usr/include/bits/types.h" 3 extern "C" { typedef struct { int __val[2]; } __fsid_t; } # 145 "/usr/include/bits/types.h" 3 extern "C" { typedef long __clock_t; } # 146 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __rlim_t; } # 147 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __rlim64_t; } # 148 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __id_t; } # 149 "/usr/include/bits/types.h" 3 extern "C" { typedef long __time_t; } # 150 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __useconds_t; } # 151 "/usr/include/bits/types.h" 3 extern "C" { typedef long __suseconds_t; } # 153 "/usr/include/bits/types.h" 3 extern "C" { typedef int __daddr_t; } # 154 "/usr/include/bits/types.h" 3 extern "C" { typedef long __swblk_t; } # 155 "/usr/include/bits/types.h" 3 extern "C" { typedef int __key_t; } # 158 "/usr/include/bits/types.h" 3 extern "C" { typedef int __clockid_t; } # 161 "/usr/include/bits/types.h" 3 extern "C" { typedef void *__timer_t; } # 164 "/usr/include/bits/types.h" 3 extern "C" { typedef long __blksize_t; } # 169 "/usr/include/bits/types.h" 3 extern "C" { typedef long __blkcnt_t; } # 170 "/usr/include/bits/types.h" 3 extern "C" { typedef long __blkcnt64_t; } # 173 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsblkcnt_t; } # 174 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsblkcnt64_t; } # 177 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsfilcnt_t; } # 178 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsfilcnt64_t; } # 180 "/usr/include/bits/types.h" 3 extern "C" { typedef long __ssize_t; } # 184 "/usr/include/bits/types.h" 3 extern "C" { typedef __off64_t __loff_t; } # 185 "/usr/include/bits/types.h" 3 extern "C" { typedef __quad_t *__qaddr_t; } # 186 "/usr/include/bits/types.h" 3 extern "C" { typedef char *__caddr_t; } # 189 "/usr/include/bits/types.h" 3 extern "C" { typedef long __intptr_t; } # 192 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __socklen_t; } # 60 "/usr/include/time.h" 3 extern "C" { typedef __clock_t clock_t; } # 76 "/usr/include/time.h" 3 extern "C" { typedef __time_t time_t; } # 92 "/usr/include/time.h" 3 extern "C" { typedef __clockid_t clockid_t; } # 104 "/usr/include/time.h" 3 extern "C" { typedef __timer_t timer_t; } # 120 "/usr/include/time.h" 3 extern "C" { struct timespec { # 122 "/usr/include/time.h" 3 __time_t tv_sec; # 123 "/usr/include/time.h" 3 long tv_nsec; # 124 "/usr/include/time.h" 3 }; } # 133 "/usr/include/time.h" 3 extern "C" { struct tm { # 135 "/usr/include/time.h" 3 int tm_sec; # 136 "/usr/include/time.h" 3 int tm_min; # 137 "/usr/include/time.h" 3 int tm_hour; # 138 "/usr/include/time.h" 3 int tm_mday; # 139 "/usr/include/time.h" 3 int tm_mon; # 140 "/usr/include/time.h" 3 int tm_year; # 141 "/usr/include/time.h" 3 int tm_wday; # 142 "/usr/include/time.h" 3 int tm_yday; # 143 "/usr/include/time.h" 3 int tm_isdst; # 146 "/usr/include/time.h" 3 long tm_gmtoff; # 147 "/usr/include/time.h" 3 const char *tm_zone; # 152 "/usr/include/time.h" 3 }; } # 161 "/usr/include/time.h" 3 extern "C" { struct itimerspec { # 163 "/usr/include/time.h" 3 timespec it_interval; # 164 "/usr/include/time.h" 3 timespec it_value; # 165 "/usr/include/time.h" 3 }; } # 168 "/usr/include/time.h" 3 struct sigevent; # 174 "/usr/include/time.h" 3 extern "C" { typedef __pid_t pid_t; } # 183 "/usr/include/time.h" 3 extern "C" clock_t clock() throw(); # 186 "/usr/include/time.h" 3 extern "C" time_t time(time_t * ) throw(); # 189 "/usr/include/time.h" 3 extern "C" double difftime(time_t , time_t ) throw() # 190 "/usr/include/time.h" 3 __attribute((const)); # 193 "/usr/include/time.h" 3 extern "C" time_t mktime(tm * ) throw(); # 199 "/usr/include/time.h" 3 extern "C" size_t strftime(char *__restrict__ , size_t , const char *__restrict__ , const tm *__restrict__ ) throw(); # 207 "/usr/include/time.h" 3 extern "C" char *strptime(const char *__restrict__ , const char *__restrict__ , tm * ) throw(); # 217 "/usr/include/time.h" 3 extern "C" size_t strftime_l(char *__restrict__ , size_t , const char *__restrict__ , const tm *__restrict__ , __locale_t ) throw(); # 224 "/usr/include/time.h" 3 extern "C" char *strptime_l(const char *__restrict__ , const char *__restrict__ , tm * , __locale_t ) throw(); # 233 "/usr/include/time.h" 3 extern "C" tm *gmtime(const time_t * ) throw(); # 237 "/usr/include/time.h" 3 extern "C" tm *localtime(const time_t * ) throw(); # 243 "/usr/include/time.h" 3 extern "C" tm *gmtime_r(const time_t *__restrict__ , tm *__restrict__ ) throw(); # 248 "/usr/include/time.h" 3 extern "C" tm *localtime_r(const time_t *__restrict__ , tm *__restrict__ ) throw(); # 255 "/usr/include/time.h" 3 extern "C" char *asctime(const tm * ) throw(); # 258 "/usr/include/time.h" 3 extern "C" char *ctime(const time_t * ) throw(); # 266 "/usr/include/time.h" 3 extern "C" char *asctime_r(const tm *__restrict__ , char *__restrict__ ) throw(); # 270 "/usr/include/time.h" 3 extern "C" char *ctime_r(const time_t *__restrict__ , char *__restrict__ ) throw(); # 276 "/usr/include/time.h" 3 extern "C" { extern char *__tzname[2]; } # 277 "/usr/include/time.h" 3 extern "C" { extern int __daylight; } # 278 "/usr/include/time.h" 3 extern "C" { extern long __timezone; } # 283 "/usr/include/time.h" 3 extern "C" { extern char *tzname[2]; } # 287 "/usr/include/time.h" 3 extern "C" void tzset() throw(); # 291 "/usr/include/time.h" 3 extern "C" { extern int daylight; } # 292 "/usr/include/time.h" 3 extern "C" { extern long timezone; } # 298 "/usr/include/time.h" 3 extern "C" int stime(const time_t * ) throw(); # 313 "/usr/include/time.h" 3 extern "C" time_t timegm(tm * ) throw(); # 316 "/usr/include/time.h" 3 extern "C" time_t timelocal(tm * ) throw(); # 319 "/usr/include/time.h" 3 extern "C" int dysize(int ) throw() __attribute((const)); # 328 "/usr/include/time.h" 3 extern "C" int nanosleep(const timespec * , timespec * ); # 333 "/usr/include/time.h" 3 extern "C" int clock_getres(clockid_t , timespec * ) throw(); # 336 "/usr/include/time.h" 3 extern "C" int clock_gettime(clockid_t , timespec * ) throw(); # 339 "/usr/include/time.h" 3 extern "C" int clock_settime(clockid_t , const timespec * ) throw(); # 347 "/usr/include/time.h" 3 extern "C" int clock_nanosleep(clockid_t , int , const timespec * , timespec * ); # 352 "/usr/include/time.h" 3 extern "C" int clock_getcpuclockid(pid_t , clockid_t * ) throw(); # 357 "/usr/include/time.h" 3 extern "C" int timer_create(clockid_t , sigevent *__restrict__ , timer_t *__restrict__ ) throw(); # 362 "/usr/include/time.h" 3 extern "C" int timer_delete(timer_t ) throw(); # 365 "/usr/include/time.h" 3 extern "C" int timer_settime(timer_t , int , const itimerspec *__restrict__ , itimerspec *__restrict__ ) throw(); # 370 "/usr/include/time.h" 3 extern "C" int timer_gettime(timer_t , itimerspec * ) throw(); # 374 "/usr/include/time.h" 3 extern "C" int timer_getoverrun(timer_t ) throw(); # 390 "/usr/include/time.h" 3 extern "C" { extern int getdate_err; } # 399 "/usr/include/time.h" 3 extern "C" tm *getdate(const char * ); # 413 "/usr/include/time.h" 3 extern "C" int getdate_r(const char *__restrict__ , tm *__restrict__ ); # 69 "/usr/local/cuda4.1/cuda/include/common_functions.h" extern "C" clock_t clock() throw(); # 70 "/usr/local/cuda4.1/cuda/include/common_functions.h" extern "C" void *memset(void *, int, size_t) throw(); # 71 "/usr/local/cuda4.1/cuda/include/common_functions.h" extern "C" void *memcpy(void *, const void *, size_t) throw(); # 160 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int abs(int) throw(); # 161 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long labs(long) throw(); # 162 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long long llabs(long long) throw(); # 175 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double fabs(double ) throw(); # 188 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float fabsf(float ) throw(); # 189 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int min(int, int); # 190 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" unsigned umin(unsigned, unsigned); # 191 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long long llmin(long long, long long); # 192 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" unsigned long long ullmin(unsigned long long, unsigned long long); # 208 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float fminf(float , float ) throw(); # 224 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double fmin(double , double ) throw(); # 225 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int max(int, int); # 226 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" unsigned umax(unsigned, unsigned); # 227 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long long llmax(long long, long long); # 228 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" unsigned long long ullmax(unsigned long long, unsigned long long); # 244 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float fmaxf(float , float ) throw(); # 260 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double fmax(double, double) throw(); # 273 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double sin(double ) throw(); # 286 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double cos(double ) throw(); # 301 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" void sincos(double , double * , double * ) throw(); # 317 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" void sincosf(float , float * , float * ) throw(); # 330 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double tan(double ) throw(); # 345 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double sqrt(double ) throw(); # 360 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double rsqrt(double ); # 375 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float rsqrtf(float ); # 390 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double log2(double ) throw(); # 401 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double exp2(double ) throw(); # 412 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float exp2f(float ) throw(); # 423 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double exp10(double ) throw(); # 435 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float exp10f(float ) throw(); # 446 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double expm1(double ) throw(); # 457 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float expm1f(float ) throw(); # 472 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float log2f(float ) throw(); # 487 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double log10(double ) throw(); # 502 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double log(double ) throw(); # 517 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double log1p(double ) throw(); # 532 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float log1pf(float ) throw(); # 546 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double floor(double ) throw(); # 557 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double exp(double ) throw(); # 570 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double cosh(double ) throw(); # 582 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double sinh(double ) throw(); # 594 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double tanh(double ) throw(); # 608 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double acosh(double ) throw(); # 622 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float acoshf(float ) throw(); # 634 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double asinh(double ) throw(); # 646 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float asinhf(float ) throw(); # 660 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double atanh(double ) throw(); # 674 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float atanhf(float ) throw(); # 686 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double ldexp(double , int ) throw(); # 698 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float ldexpf(float , int ) throw(); # 711 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double logb(double ) throw(); # 724 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float logbf(float ) throw(); # 742 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int ilogb(double ) throw(); # 760 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int ilogbf(float ) throw(); # 774 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double scalbn(double , int ) throw(); # 788 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float scalbnf(float , int ) throw(); # 802 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double scalbln(double , long ) throw(); # 816 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float scalblnf(float , long ) throw(); # 837 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double frexp(double , int * ) throw(); # 858 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float frexpf(float , int * ) throw(); # 871 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double round(double ) throw(); # 884 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float roundf(float ) throw(); # 898 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long lround(double ) throw(); # 912 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long lroundf(float ) throw(); # 926 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long long llround(double ) throw(); # 940 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long long llroundf(float ) throw(); # 951 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double rint(double ) throw(); # 962 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float rintf(float ) throw(); # 974 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long lrint(double ) throw(); # 986 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long lrintf(float ) throw(); # 998 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long long llrint(double ) throw(); # 1010 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" long long llrintf(float ) throw(); # 1023 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double nearbyint(double ) throw(); # 1036 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float nearbyintf(float ) throw(); # 1048 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double ceil(double ) throw(); # 1059 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double trunc(double ) throw(); # 1070 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float truncf(float ) throw(); # 1084 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double fdim(double , double ) throw(); # 1098 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float fdimf(float , float ) throw(); # 1113 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double atan2(double , double ) throw(); # 1126 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double atan(double ) throw(); # 1140 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double acos(double ) throw(); # 1154 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double asin(double ) throw(); # 1169 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double hypot(double , double ) throw(); # 1186 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float hypotf(float , float ) throw(); # 1200 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double cbrt(double ) throw(); # 1214 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float cbrtf(float ) throw(); # 1227 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double rcbrt(double ); # 1240 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float rcbrtf(float ); # 1254 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double sinpi(double ); # 1268 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float sinpif(float ); # 1282 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double cospi(double ); # 1296 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float cospif(float ); # 1324 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double pow(double , double ) throw(); # 1341 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double modf(double , double * ) throw(); # 1361 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double fmod(double , double ) throw(); # 1379 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double remainder(double , double ) throw(); # 1398 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float remainderf(float , float ) throw(); # 1417 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double remquo(double , double , int * ) throw(); # 1436 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float remquof(float , float , int * ) throw(); # 1451 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double j0(double ) throw(); # 1466 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float j0f(float ) throw(); # 1482 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double j1(double ) throw(); # 1498 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float j1f(float ) throw(); # 1514 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double jn(int , double ) throw(); # 1530 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float jnf(int , float ) throw(); # 1547 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double y0(double ) throw(); # 1564 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float y0f(float ) throw(); # 1581 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double y1(double ) throw(); # 1598 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float y1f(float ) throw(); # 1616 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double yn(int , double ) throw(); # 1634 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float ynf(int , float ) throw(); # 1648 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double erf(double ) throw(); # 1662 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float erff(float ) throw(); # 1677 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double erfinv(double ); # 1692 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float erfinvf(float ); # 1706 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double erfc(double ) throw(); # 1720 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float erfcf(float ) throw(); # 1738 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double lgamma(double ) throw(); # 1753 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double erfcinv(double ); # 1768 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float erfcinvf(float ); # 1778 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double erfcx(double ); # 1788 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float erfcxf(float ); # 1806 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float lgammaf(float ) throw(); # 1824 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double tgamma(double ) throw(); # 1842 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float tgammaf(float ) throw(); # 1851 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double copysign(double , double ) throw(); # 1860 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float copysignf(float , float ) throw(); # 1875 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double nextafter(double , double ) throw(); # 1890 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float nextafterf(float , float ) throw(); # 1902 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double nan(const char * ) throw(); # 1914 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float nanf(const char * ) throw(); # 1915 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __isinff(float) throw(); # 1916 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __isnanf(float) throw(); # 1925 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __finite(double) throw(); # 1926 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __finitef(float) throw(); # 1927 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __signbit(double) throw(); # 1928 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __isnan(double) throw(); # 1929 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __isinf(double) throw(); # 1932 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __signbitf(float) throw(); # 1949 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" double fma(double , double , double ) throw(); # 1966 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float fmaf(float , float , float ) throw(); # 1971 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __signbitl(long double) throw(); # 1977 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __finitel(long double) throw(); # 1978 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __isinfl(long double) throw(); # 1979 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" int __isnanl(long double) throw(); # 2017 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float acosf(float ) throw(); # 2031 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float asinf(float ) throw(); # 2045 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float atanf(float ) throw(); # 2060 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float atan2f(float , float ) throw(); # 2074 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float cosf(float ) throw(); # 2088 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float sinf(float ) throw(); # 2102 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float tanf(float ) throw(); # 2116 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float coshf(float ) throw(); # 2129 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float sinhf(float ) throw(); # 2141 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float tanhf(float ) throw(); # 2156 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float logf(float ) throw(); # 2168 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float expf(float ) throw(); # 2183 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float log10f(float ) throw(); # 2199 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float modff(float , float * ) throw(); # 2227 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float powf(float , float ) throw(); # 2242 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float sqrtf(float ) throw(); # 2254 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float ceilf(float ) throw(); # 2268 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float floorf(float ) throw(); # 2288 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern "C" float fmodf(float , float ) throw(); # 31 "/usr/include/bits/mathdef.h" 3 extern "C" { typedef float float_t; } # 32 "/usr/include/bits/mathdef.h" 3 extern "C" { typedef double double_t; } # 55 "/usr/include/bits/mathcalls.h" 3 extern "C" double acos(double ) throw(); extern "C" double __acos(double ) throw(); # 57 "/usr/include/bits/mathcalls.h" 3 extern "C" double asin(double ) throw(); extern "C" double __asin(double ) throw(); # 59 "/usr/include/bits/mathcalls.h" 3 extern "C" double atan(double ) throw(); extern "C" double __atan(double ) throw(); # 61 "/usr/include/bits/mathcalls.h" 3 extern "C" double atan2(double , double ) throw(); extern "C" double __atan2(double , double ) throw(); # 64 "/usr/include/bits/mathcalls.h" 3 extern "C" double cos(double ) throw(); extern "C" double __cos(double ) throw(); # 66 "/usr/include/bits/mathcalls.h" 3 extern "C" double sin(double ) throw(); extern "C" double __sin(double ) throw(); # 68 "/usr/include/bits/mathcalls.h" 3 extern "C" double tan(double ) throw(); extern "C" double __tan(double ) throw(); # 73 "/usr/include/bits/mathcalls.h" 3 extern "C" double cosh(double ) throw(); extern "C" double __cosh(double ) throw(); # 75 "/usr/include/bits/mathcalls.h" 3 extern "C" double sinh(double ) throw(); extern "C" double __sinh(double ) throw(); # 77 "/usr/include/bits/mathcalls.h" 3 extern "C" double tanh(double ) throw(); extern "C" double __tanh(double ) throw(); # 82 "/usr/include/bits/mathcalls.h" 3 extern "C" void sincos(double , double * , double * ) throw(); extern "C" void __sincos(double , double * , double * ) throw(); # 89 "/usr/include/bits/mathcalls.h" 3 extern "C" double acosh(double ) throw(); extern "C" double __acosh(double ) throw(); # 91 "/usr/include/bits/mathcalls.h" 3 extern "C" double asinh(double ) throw(); extern "C" double __asinh(double ) throw(); # 93 "/usr/include/bits/mathcalls.h" 3 extern "C" double atanh(double ) throw(); extern "C" double __atanh(double ) throw(); # 101 "/usr/include/bits/mathcalls.h" 3 extern "C" double exp(double ) throw(); extern "C" double __exp(double ) throw(); # 104 "/usr/include/bits/mathcalls.h" 3 extern "C" double frexp(double , int * ) throw(); extern "C" double __frexp(double , int * ) throw(); # 107 "/usr/include/bits/mathcalls.h" 3 extern "C" double ldexp(double , int ) throw(); extern "C" double __ldexp(double , int ) throw(); # 110 "/usr/include/bits/mathcalls.h" 3 extern "C" double log(double ) throw(); extern "C" double __log(double ) throw(); # 113 "/usr/include/bits/mathcalls.h" 3 extern "C" double log10(double ) throw(); extern "C" double __log10(double ) throw(); # 116 "/usr/include/bits/mathcalls.h" 3 extern "C" double modf(double , double * ) throw(); extern "C" double __modf(double , double * ) throw(); # 121 "/usr/include/bits/mathcalls.h" 3 extern "C" double exp10(double ) throw(); extern "C" double __exp10(double ) throw(); # 123 "/usr/include/bits/mathcalls.h" 3 extern "C" double pow10(double ) throw(); extern "C" double __pow10(double ) throw(); # 129 "/usr/include/bits/mathcalls.h" 3 extern "C" double expm1(double ) throw(); extern "C" double __expm1(double ) throw(); # 132 "/usr/include/bits/mathcalls.h" 3 extern "C" double log1p(double ) throw(); extern "C" double __log1p(double ) throw(); # 135 "/usr/include/bits/mathcalls.h" 3 extern "C" double logb(double ) throw(); extern "C" double __logb(double ) throw(); # 142 "/usr/include/bits/mathcalls.h" 3 extern "C" double exp2(double ) throw(); extern "C" double __exp2(double ) throw(); # 145 "/usr/include/bits/mathcalls.h" 3 extern "C" double log2(double ) throw(); extern "C" double __log2(double ) throw(); # 154 "/usr/include/bits/mathcalls.h" 3 extern "C" double pow(double , double ) throw(); extern "C" double __pow(double , double ) throw(); # 157 "/usr/include/bits/mathcalls.h" 3 extern "C" double sqrt(double ) throw(); extern "C" double __sqrt(double ) throw(); # 163 "/usr/include/bits/mathcalls.h" 3 extern "C" double hypot(double , double ) throw(); extern "C" double __hypot(double , double ) throw(); # 170 "/usr/include/bits/mathcalls.h" 3 extern "C" double cbrt(double ) throw(); extern "C" double __cbrt(double ) throw(); # 179 "/usr/include/bits/mathcalls.h" 3 extern "C" double ceil(double ) throw() __attribute((const)); extern "C" double __ceil(double ) throw() __attribute((const)); # 182 "/usr/include/bits/mathcalls.h" 3 extern "C" double fabs(double ) throw() __attribute((const)); extern "C" double __fabs(double ) throw() __attribute((const)); # 185 "/usr/include/bits/mathcalls.h" 3 extern "C" double floor(double ) throw() __attribute((const)); extern "C" double __floor(double ) throw() __attribute((const)); # 188 "/usr/include/bits/mathcalls.h" 3 extern "C" double fmod(double , double ) throw(); extern "C" double __fmod(double , double ) throw(); # 193 "/usr/include/bits/mathcalls.h" 3 extern "C" int __isinf(double ) throw() __attribute((const)); # 196 "/usr/include/bits/mathcalls.h" 3 extern "C" int __finite(double ) throw() __attribute((const)); # 202 "/usr/include/bits/mathcalls.h" 3 extern "C" int isinf(double ) throw() __attribute((const)); # 205 "/usr/include/bits/mathcalls.h" 3 extern "C" int finite(double ) throw() __attribute((const)); # 208 "/usr/include/bits/mathcalls.h" 3 extern "C" double drem(double , double ) throw(); extern "C" double __drem(double , double ) throw(); # 212 "/usr/include/bits/mathcalls.h" 3 extern "C" double significand(double ) throw(); extern "C" double __significand(double ) throw(); # 218 "/usr/include/bits/mathcalls.h" 3 extern "C" double copysign(double , double ) throw() __attribute((const)); extern "C" double __copysign(double , double ) throw() __attribute((const)); # 225 "/usr/include/bits/mathcalls.h" 3 extern "C" double nan(const char * ) throw() __attribute((const)); extern "C" double __nan(const char * ) throw() __attribute((const)); # 231 "/usr/include/bits/mathcalls.h" 3 extern "C" int __isnan(double ) throw() __attribute((const)); # 235 "/usr/include/bits/mathcalls.h" 3 extern "C" int isnan(double ) throw() __attribute((const)); # 238 "/usr/include/bits/mathcalls.h" 3 extern "C" double j0(double) throw(); extern "C" double __j0(double) throw(); # 239 "/usr/include/bits/mathcalls.h" 3 extern "C" double j1(double) throw(); extern "C" double __j1(double) throw(); # 240 "/usr/include/bits/mathcalls.h" 3 extern "C" double jn(int, double) throw(); extern "C" double __jn(int, double) throw(); # 241 "/usr/include/bits/mathcalls.h" 3 extern "C" double y0(double) throw(); extern "C" double __y0(double) throw(); # 242 "/usr/include/bits/mathcalls.h" 3 extern "C" double y1(double) throw(); extern "C" double __y1(double) throw(); # 243 "/usr/include/bits/mathcalls.h" 3 extern "C" double yn(int, double) throw(); extern "C" double __yn(int, double) throw(); # 250 "/usr/include/bits/mathcalls.h" 3 extern "C" double erf(double) throw(); extern "C" double __erf(double) throw(); # 251 "/usr/include/bits/mathcalls.h" 3 extern "C" double erfc(double) throw(); extern "C" double __erfc(double) throw(); # 252 "/usr/include/bits/mathcalls.h" 3 extern "C" double lgamma(double) throw(); extern "C" double __lgamma(double) throw(); # 259 "/usr/include/bits/mathcalls.h" 3 extern "C" double tgamma(double) throw(); extern "C" double __tgamma(double) throw(); # 265 "/usr/include/bits/mathcalls.h" 3 extern "C" double gamma(double) throw(); extern "C" double __gamma(double) throw(); # 272 "/usr/include/bits/mathcalls.h" 3 extern "C" double lgamma_r(double, int * ) throw(); extern "C" double __lgamma_r(double, int * ) throw(); # 280 "/usr/include/bits/mathcalls.h" 3 extern "C" double rint(double ) throw(); extern "C" double __rint(double ) throw(); # 283 "/usr/include/bits/mathcalls.h" 3 extern "C" double nextafter(double , double ) throw() __attribute((const)); extern "C" double __nextafter(double , double ) throw() __attribute((const)); # 285 "/usr/include/bits/mathcalls.h" 3 extern "C" double nexttoward(double , long double ) throw() __attribute((const)); extern "C" double __nexttoward(double , long double ) throw() __attribute((const)); # 289 "/usr/include/bits/mathcalls.h" 3 extern "C" double remainder(double , double ) throw(); extern "C" double __remainder(double , double ) throw(); # 293 "/usr/include/bits/mathcalls.h" 3 extern "C" double scalbn(double , int ) throw(); extern "C" double __scalbn(double , int ) throw(); # 297 "/usr/include/bits/mathcalls.h" 3 extern "C" int ilogb(double ) throw(); extern "C" int __ilogb(double ) throw(); # 302 "/usr/include/bits/mathcalls.h" 3 extern "C" double scalbln(double , long ) throw(); extern "C" double __scalbln(double , long ) throw(); # 306 "/usr/include/bits/mathcalls.h" 3 extern "C" double nearbyint(double ) throw(); extern "C" double __nearbyint(double ) throw(); # 310 "/usr/include/bits/mathcalls.h" 3 extern "C" double round(double ) throw() __attribute((const)); extern "C" double __round(double ) throw() __attribute((const)); # 314 "/usr/include/bits/mathcalls.h" 3 extern "C" double trunc(double ) throw() __attribute((const)); extern "C" double __trunc(double ) throw() __attribute((const)); # 319 "/usr/include/bits/mathcalls.h" 3 extern "C" double remquo(double , double , int * ) throw(); extern "C" double __remquo(double , double , int * ) throw(); # 326 "/usr/include/bits/mathcalls.h" 3 extern "C" long lrint(double ) throw(); extern "C" long __lrint(double ) throw(); # 327 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llrint(double ) throw(); extern "C" long long __llrint(double ) throw(); # 331 "/usr/include/bits/mathcalls.h" 3 extern "C" long lround(double ) throw(); extern "C" long __lround(double ) throw(); # 332 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llround(double ) throw(); extern "C" long long __llround(double ) throw(); # 336 "/usr/include/bits/mathcalls.h" 3 extern "C" double fdim(double , double ) throw(); extern "C" double __fdim(double , double ) throw(); # 339 "/usr/include/bits/mathcalls.h" 3 extern "C" double fmax(double , double ) throw(); extern "C" double __fmax(double , double ) throw(); # 342 "/usr/include/bits/mathcalls.h" 3 extern "C" double fmin(double , double ) throw(); extern "C" double __fmin(double , double ) throw(); # 346 "/usr/include/bits/mathcalls.h" 3 extern "C" int __fpclassify(double ) throw() # 347 "/usr/include/bits/mathcalls.h" 3 __attribute((const)); # 350 "/usr/include/bits/mathcalls.h" 3 extern "C" int __signbit(double ) throw() # 351 "/usr/include/bits/mathcalls.h" 3 __attribute((const)); # 355 "/usr/include/bits/mathcalls.h" 3 extern "C" double fma(double , double , double ) throw(); extern "C" double __fma(double , double , double ) throw(); # 364 "/usr/include/bits/mathcalls.h" 3 extern "C" double scalb(double , double ) throw(); extern "C" double __scalb(double , double ) throw(); # 55 "/usr/include/bits/mathcalls.h" 3 extern "C" float acosf(float ) throw(); extern "C" float __acosf(float ) throw(); # 57 "/usr/include/bits/mathcalls.h" 3 extern "C" float asinf(float ) throw(); extern "C" float __asinf(float ) throw(); # 59 "/usr/include/bits/mathcalls.h" 3 extern "C" float atanf(float ) throw(); extern "C" float __atanf(float ) throw(); # 61 "/usr/include/bits/mathcalls.h" 3 extern "C" float atan2f(float , float ) throw(); extern "C" float __atan2f(float , float ) throw(); # 64 "/usr/include/bits/mathcalls.h" 3 extern "C" float cosf(float ) throw(); # 66 "/usr/include/bits/mathcalls.h" 3 extern "C" float sinf(float ) throw(); # 68 "/usr/include/bits/mathcalls.h" 3 extern "C" float tanf(float ) throw(); # 73 "/usr/include/bits/mathcalls.h" 3 extern "C" float coshf(float ) throw(); extern "C" float __coshf(float ) throw(); # 75 "/usr/include/bits/mathcalls.h" 3 extern "C" float sinhf(float ) throw(); extern "C" float __sinhf(float ) throw(); # 77 "/usr/include/bits/mathcalls.h" 3 extern "C" float tanhf(float ) throw(); extern "C" float __tanhf(float ) throw(); # 83 "/usr/include/bits/mathcalls.h" 3 extern "C" void sincosf(float , float * , float * ) throw(); # 89 "/usr/include/bits/mathcalls.h" 3 extern "C" float acoshf(float ) throw(); extern "C" float __acoshf(float ) throw(); # 91 "/usr/include/bits/mathcalls.h" 3 extern "C" float asinhf(float ) throw(); extern "C" float __asinhf(float ) throw(); # 93 "/usr/include/bits/mathcalls.h" 3 extern "C" float atanhf(float ) throw(); extern "C" float __atanhf(float ) throw(); # 101 "/usr/include/bits/mathcalls.h" 3 extern "C" float expf(float ) throw(); # 104 "/usr/include/bits/mathcalls.h" 3 extern "C" float frexpf(float , int * ) throw(); extern "C" float __frexpf(float , int * ) throw(); # 107 "/usr/include/bits/mathcalls.h" 3 extern "C" float ldexpf(float , int ) throw(); extern "C" float __ldexpf(float , int ) throw(); # 110 "/usr/include/bits/mathcalls.h" 3 extern "C" float logf(float ) throw(); # 113 "/usr/include/bits/mathcalls.h" 3 extern "C" float log10f(float ) throw(); # 116 "/usr/include/bits/mathcalls.h" 3 extern "C" float modff(float , float * ) throw(); extern "C" float __modff(float , float * ) throw(); # 121 "/usr/include/bits/mathcalls.h" 3 extern "C" float exp10f(float ) throw(); # 123 "/usr/include/bits/mathcalls.h" 3 extern "C" float pow10f(float ) throw(); extern "C" float __pow10f(float ) throw(); # 129 "/usr/include/bits/mathcalls.h" 3 extern "C" float expm1f(float ) throw(); extern "C" float __expm1f(float ) throw(); # 132 "/usr/include/bits/mathcalls.h" 3 extern "C" float log1pf(float ) throw(); extern "C" float __log1pf(float ) throw(); # 135 "/usr/include/bits/mathcalls.h" 3 extern "C" float logbf(float ) throw(); extern "C" float __logbf(float ) throw(); # 142 "/usr/include/bits/mathcalls.h" 3 extern "C" float exp2f(float ) throw(); extern "C" float __exp2f(float ) throw(); # 145 "/usr/include/bits/mathcalls.h" 3 extern "C" float log2f(float ) throw(); # 154 "/usr/include/bits/mathcalls.h" 3 extern "C" float powf(float , float ) throw(); # 157 "/usr/include/bits/mathcalls.h" 3 extern "C" float sqrtf(float ) throw(); extern "C" float __sqrtf(float ) throw(); # 163 "/usr/include/bits/mathcalls.h" 3 extern "C" float hypotf(float , float ) throw(); extern "C" float __hypotf(float , float ) throw(); # 170 "/usr/include/bits/mathcalls.h" 3 extern "C" float cbrtf(float ) throw(); extern "C" float __cbrtf(float ) throw(); # 179 "/usr/include/bits/mathcalls.h" 3 extern "C" float ceilf(float ) throw() __attribute((const)); extern "C" float __ceilf(float ) throw() __attribute((const)); # 182 "/usr/include/bits/mathcalls.h" 3 extern "C" float fabsf(float ) throw() __attribute((const)); extern "C" float __fabsf(float ) throw() __attribute((const)); # 185 "/usr/include/bits/mathcalls.h" 3 extern "C" float floorf(float ) throw() __attribute((const)); extern "C" float __floorf(float ) throw() __attribute((const)); # 188 "/usr/include/bits/mathcalls.h" 3 extern "C" float fmodf(float , float ) throw(); extern "C" float __fmodf(float , float ) throw(); # 193 "/usr/include/bits/mathcalls.h" 3 extern "C" int __isinff(float ) throw() __attribute((const)); # 196 "/usr/include/bits/mathcalls.h" 3 extern "C" int __finitef(float ) throw() __attribute((const)); # 202 "/usr/include/bits/mathcalls.h" 3 extern "C" int isinff(float ) throw() __attribute((const)); # 205 "/usr/include/bits/mathcalls.h" 3 extern "C" int finitef(float ) throw() __attribute((const)); # 208 "/usr/include/bits/mathcalls.h" 3 extern "C" float dremf(float , float ) throw(); extern "C" float __dremf(float , float ) throw(); # 212 "/usr/include/bits/mathcalls.h" 3 extern "C" float significandf(float ) throw(); extern "C" float __significandf(float ) throw(); # 218 "/usr/include/bits/mathcalls.h" 3 extern "C" float copysignf(float , float ) throw() __attribute((const)); extern "C" float __copysignf(float , float ) throw() __attribute((const)); # 225 "/usr/include/bits/mathcalls.h" 3 extern "C" float nanf(const char * ) throw() __attribute((const)); extern "C" float __nanf(const char * ) throw() __attribute((const)); # 231 "/usr/include/bits/mathcalls.h" 3 extern "C" int __isnanf(float ) throw() __attribute((const)); # 235 "/usr/include/bits/mathcalls.h" 3 extern "C" int isnanf(float ) throw() __attribute((const)); # 238 "/usr/include/bits/mathcalls.h" 3 extern "C" float j0f(float) throw(); extern "C" float __j0f(float) throw(); # 239 "/usr/include/bits/mathcalls.h" 3 extern "C" float j1f(float) throw(); extern "C" float __j1f(float) throw(); # 240 "/usr/include/bits/mathcalls.h" 3 extern "C" float jnf(int, float) throw(); extern "C" float __jnf(int, float) throw(); # 241 "/usr/include/bits/mathcalls.h" 3 extern "C" float y0f(float) throw(); extern "C" float __y0f(float) throw(); # 242 "/usr/include/bits/mathcalls.h" 3 extern "C" float y1f(float) throw(); extern "C" float __y1f(float) throw(); # 243 "/usr/include/bits/mathcalls.h" 3 extern "C" float ynf(int, float) throw(); extern "C" float __ynf(int, float) throw(); # 250 "/usr/include/bits/mathcalls.h" 3 extern "C" float erff(float) throw(); extern "C" float __erff(float) throw(); # 251 "/usr/include/bits/mathcalls.h" 3 extern "C" float erfcf(float) throw(); extern "C" float __erfcf(float) throw(); # 252 "/usr/include/bits/mathcalls.h" 3 extern "C" float lgammaf(float) throw(); extern "C" float __lgammaf(float) throw(); # 259 "/usr/include/bits/mathcalls.h" 3 extern "C" float tgammaf(float) throw(); extern "C" float __tgammaf(float) throw(); # 265 "/usr/include/bits/mathcalls.h" 3 extern "C" float gammaf(float) throw(); extern "C" float __gammaf(float) throw(); # 272 "/usr/include/bits/mathcalls.h" 3 extern "C" float lgammaf_r(float, int * ) throw(); extern "C" float __lgammaf_r(float, int * ) throw(); # 280 "/usr/include/bits/mathcalls.h" 3 extern "C" float rintf(float ) throw(); extern "C" float __rintf(float ) throw(); # 283 "/usr/include/bits/mathcalls.h" 3 extern "C" float nextafterf(float , float ) throw() __attribute((const)); extern "C" float __nextafterf(float , float ) throw() __attribute((const)); # 285 "/usr/include/bits/mathcalls.h" 3 extern "C" float nexttowardf(float , long double ) throw() __attribute((const)); extern "C" float __nexttowardf(float , long double ) throw() __attribute((const)); # 289 "/usr/include/bits/mathcalls.h" 3 extern "C" float remainderf(float , float ) throw(); extern "C" float __remainderf(float , float ) throw(); # 293 "/usr/include/bits/mathcalls.h" 3 extern "C" float scalbnf(float , int ) throw(); extern "C" float __scalbnf(float , int ) throw(); # 297 "/usr/include/bits/mathcalls.h" 3 extern "C" int ilogbf(float ) throw(); extern "C" int __ilogbf(float ) throw(); # 302 "/usr/include/bits/mathcalls.h" 3 extern "C" float scalblnf(float , long ) throw(); extern "C" float __scalblnf(float , long ) throw(); # 306 "/usr/include/bits/mathcalls.h" 3 extern "C" float nearbyintf(float ) throw(); extern "C" float __nearbyintf(float ) throw(); # 310 "/usr/include/bits/mathcalls.h" 3 extern "C" float roundf(float ) throw() __attribute((const)); extern "C" float __roundf(float ) throw() __attribute((const)); # 314 "/usr/include/bits/mathcalls.h" 3 extern "C" float truncf(float ) throw() __attribute((const)); extern "C" float __truncf(float ) throw() __attribute((const)); # 319 "/usr/include/bits/mathcalls.h" 3 extern "C" float remquof(float , float , int * ) throw(); extern "C" float __remquof(float , float , int * ) throw(); # 326 "/usr/include/bits/mathcalls.h" 3 extern "C" long lrintf(float ) throw(); extern "C" long __lrintf(float ) throw(); # 327 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llrintf(float ) throw(); extern "C" long long __llrintf(float ) throw(); # 331 "/usr/include/bits/mathcalls.h" 3 extern "C" long lroundf(float ) throw(); extern "C" long __lroundf(float ) throw(); # 332 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llroundf(float ) throw(); extern "C" long long __llroundf(float ) throw(); # 336 "/usr/include/bits/mathcalls.h" 3 extern "C" float fdimf(float , float ) throw(); extern "C" float __fdimf(float , float ) throw(); # 339 "/usr/include/bits/mathcalls.h" 3 extern "C" float fmaxf(float , float ) throw(); extern "C" float __fmaxf(float , float ) throw(); # 342 "/usr/include/bits/mathcalls.h" 3 extern "C" float fminf(float , float ) throw(); extern "C" float __fminf(float , float ) throw(); # 346 "/usr/include/bits/mathcalls.h" 3 extern "C" int __fpclassifyf(float ) throw() # 347 "/usr/include/bits/mathcalls.h" 3 __attribute((const)); # 350 "/usr/include/bits/mathcalls.h" 3 extern "C" int __signbitf(float ) throw() # 351 "/usr/include/bits/mathcalls.h" 3 __attribute((const)); # 355 "/usr/include/bits/mathcalls.h" 3 extern "C" float fmaf(float , float , float ) throw(); extern "C" float __fmaf(float , float , float ) throw(); # 364 "/usr/include/bits/mathcalls.h" 3 extern "C" float scalbf(float , float ) throw(); extern "C" float __scalbf(float , float ) throw(); # 55 "/usr/include/bits/mathcalls.h" 3 extern "C" long double acosl(long double ) throw(); extern "C" long double __acosl(long double ) throw(); # 57 "/usr/include/bits/mathcalls.h" 3 extern "C" long double asinl(long double ) throw(); extern "C" long double __asinl(long double ) throw(); # 59 "/usr/include/bits/mathcalls.h" 3 extern "C" long double atanl(long double ) throw(); extern "C" long double __atanl(long double ) throw(); # 61 "/usr/include/bits/mathcalls.h" 3 extern "C" long double atan2l(long double , long double ) throw(); extern "C" long double __atan2l(long double , long double ) throw(); # 64 "/usr/include/bits/mathcalls.h" 3 extern "C" long double cosl(long double ) throw(); extern "C" long double __cosl(long double ) throw(); # 66 "/usr/include/bits/mathcalls.h" 3 extern "C" long double sinl(long double ) throw(); extern "C" long double __sinl(long double ) throw(); # 68 "/usr/include/bits/mathcalls.h" 3 extern "C" long double tanl(long double ) throw(); extern "C" long double __tanl(long double ) throw(); # 73 "/usr/include/bits/mathcalls.h" 3 extern "C" long double coshl(long double ) throw(); extern "C" long double __coshl(long double ) throw(); # 75 "/usr/include/bits/mathcalls.h" 3 extern "C" long double sinhl(long double ) throw(); extern "C" long double __sinhl(long double ) throw(); # 77 "/usr/include/bits/mathcalls.h" 3 extern "C" long double tanhl(long double ) throw(); extern "C" long double __tanhl(long double ) throw(); # 83 "/usr/include/bits/mathcalls.h" 3 extern "C" void sincosl(long double , long double * , long double * ) throw(); # 83 "/usr/include/bits/mathcalls.h" 3 extern "C" void __sincosl(long double , long double * , long double * ) throw(); # 89 "/usr/include/bits/mathcalls.h" 3 extern "C" long double acoshl(long double ) throw(); extern "C" long double __acoshl(long double ) throw(); # 91 "/usr/include/bits/mathcalls.h" 3 extern "C" long double asinhl(long double ) throw(); extern "C" long double __asinhl(long double ) throw(); # 93 "/usr/include/bits/mathcalls.h" 3 extern "C" long double atanhl(long double ) throw(); extern "C" long double __atanhl(long double ) throw(); # 101 "/usr/include/bits/mathcalls.h" 3 extern "C" long double expl(long double ) throw(); extern "C" long double __expl(long double ) throw(); # 104 "/usr/include/bits/mathcalls.h" 3 extern "C" long double frexpl(long double , int * ) throw(); extern "C" long double __frexpl(long double , int * ) throw(); # 107 "/usr/include/bits/mathcalls.h" 3 extern "C" long double ldexpl(long double , int ) throw(); extern "C" long double __ldexpl(long double , int ) throw(); # 110 "/usr/include/bits/mathcalls.h" 3 extern "C" long double logl(long double ) throw(); extern "C" long double __logl(long double ) throw(); # 113 "/usr/include/bits/mathcalls.h" 3 extern "C" long double log10l(long double ) throw(); extern "C" long double __log10l(long double ) throw(); # 116 "/usr/include/bits/mathcalls.h" 3 extern "C" long double modfl(long double , long double * ) throw(); extern "C" long double __modfl(long double , long double * ) throw(); # 121 "/usr/include/bits/mathcalls.h" 3 extern "C" long double exp10l(long double ) throw(); extern "C" long double __exp10l(long double ) throw(); # 123 "/usr/include/bits/mathcalls.h" 3 extern "C" long double pow10l(long double ) throw(); extern "C" long double __pow10l(long double ) throw(); # 129 "/usr/include/bits/mathcalls.h" 3 extern "C" long double expm1l(long double ) throw(); extern "C" long double __expm1l(long double ) throw(); # 132 "/usr/include/bits/mathcalls.h" 3 extern "C" long double log1pl(long double ) throw(); extern "C" long double __log1pl(long double ) throw(); # 135 "/usr/include/bits/mathcalls.h" 3 extern "C" long double logbl(long double ) throw(); extern "C" long double __logbl(long double ) throw(); # 142 "/usr/include/bits/mathcalls.h" 3 extern "C" long double exp2l(long double ) throw(); extern "C" long double __exp2l(long double ) throw(); # 145 "/usr/include/bits/mathcalls.h" 3 extern "C" long double log2l(long double ) throw(); extern "C" long double __log2l(long double ) throw(); # 154 "/usr/include/bits/mathcalls.h" 3 extern "C" long double powl(long double , long double ) throw(); extern "C" long double __powl(long double , long double ) throw(); # 157 "/usr/include/bits/mathcalls.h" 3 extern "C" long double sqrtl(long double ) throw(); extern "C" long double __sqrtl(long double ) throw(); # 163 "/usr/include/bits/mathcalls.h" 3 extern "C" long double hypotl(long double , long double ) throw(); extern "C" long double __hypotl(long double , long double ) throw(); # 170 "/usr/include/bits/mathcalls.h" 3 extern "C" long double cbrtl(long double ) throw(); extern "C" long double __cbrtl(long double ) throw(); # 179 "/usr/include/bits/mathcalls.h" 3 extern "C" long double ceill(long double ) throw() __attribute((const)); extern "C" long double __ceill(long double ) throw() __attribute((const)); # 182 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fabsl(long double ) throw() __attribute((const)); extern "C" long double __fabsl(long double ) throw() __attribute((const)); # 185 "/usr/include/bits/mathcalls.h" 3 extern "C" long double floorl(long double ) throw() __attribute((const)); extern "C" long double __floorl(long double ) throw() __attribute((const)); # 188 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fmodl(long double , long double ) throw(); extern "C" long double __fmodl(long double , long double ) throw(); # 193 "/usr/include/bits/mathcalls.h" 3 extern "C" int __isinfl(long double ) throw() __attribute((const)); # 196 "/usr/include/bits/mathcalls.h" 3 extern "C" int __finitel(long double ) throw() __attribute((const)); # 202 "/usr/include/bits/mathcalls.h" 3 extern "C" int isinfl(long double ) throw() __attribute((const)); # 205 "/usr/include/bits/mathcalls.h" 3 extern "C" int finitel(long double ) throw() __attribute((const)); # 208 "/usr/include/bits/mathcalls.h" 3 extern "C" long double dreml(long double , long double ) throw(); extern "C" long double __dreml(long double , long double ) throw(); # 212 "/usr/include/bits/mathcalls.h" 3 extern "C" long double significandl(long double ) throw(); extern "C" long double __significandl(long double ) throw(); # 218 "/usr/include/bits/mathcalls.h" 3 extern "C" long double copysignl(long double , long double ) throw() __attribute((const)); extern "C" long double __copysignl(long double , long double ) throw() __attribute((const)); # 225 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nanl(const char * ) throw() __attribute((const)); extern "C" long double __nanl(const char * ) throw() __attribute((const)); # 231 "/usr/include/bits/mathcalls.h" 3 extern "C" int __isnanl(long double ) throw() __attribute((const)); # 235 "/usr/include/bits/mathcalls.h" 3 extern "C" int isnanl(long double ) throw() __attribute((const)); # 238 "/usr/include/bits/mathcalls.h" 3 extern "C" long double j0l(long double) throw(); extern "C" long double __j0l(long double) throw(); # 239 "/usr/include/bits/mathcalls.h" 3 extern "C" long double j1l(long double) throw(); extern "C" long double __j1l(long double) throw(); # 240 "/usr/include/bits/mathcalls.h" 3 extern "C" long double jnl(int, long double) throw(); extern "C" long double __jnl(int, long double) throw(); # 241 "/usr/include/bits/mathcalls.h" 3 extern "C" long double y0l(long double) throw(); extern "C" long double __y0l(long double) throw(); # 242 "/usr/include/bits/mathcalls.h" 3 extern "C" long double y1l(long double) throw(); extern "C" long double __y1l(long double) throw(); # 243 "/usr/include/bits/mathcalls.h" 3 extern "C" long double ynl(int, long double) throw(); extern "C" long double __ynl(int, long double) throw(); # 250 "/usr/include/bits/mathcalls.h" 3 extern "C" long double erfl(long double) throw(); extern "C" long double __erfl(long double) throw(); # 251 "/usr/include/bits/mathcalls.h" 3 extern "C" long double erfcl(long double) throw(); extern "C" long double __erfcl(long double) throw(); # 252 "/usr/include/bits/mathcalls.h" 3 extern "C" long double lgammal(long double) throw(); extern "C" long double __lgammal(long double) throw(); # 259 "/usr/include/bits/mathcalls.h" 3 extern "C" long double tgammal(long double) throw(); extern "C" long double __tgammal(long double) throw(); # 265 "/usr/include/bits/mathcalls.h" 3 extern "C" long double gammal(long double) throw(); extern "C" long double __gammal(long double) throw(); # 272 "/usr/include/bits/mathcalls.h" 3 extern "C" long double lgammal_r(long double, int * ) throw(); extern "C" long double __lgammal_r(long double, int * ) throw(); # 280 "/usr/include/bits/mathcalls.h" 3 extern "C" long double rintl(long double ) throw(); extern "C" long double __rintl(long double ) throw(); # 283 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nextafterl(long double , long double ) throw() __attribute((const)); extern "C" long double __nextafterl(long double , long double ) throw() __attribute((const)); # 285 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nexttowardl(long double , long double ) throw() __attribute((const)); extern "C" long double __nexttowardl(long double , long double ) throw() __attribute((const)); # 289 "/usr/include/bits/mathcalls.h" 3 extern "C" long double remainderl(long double , long double ) throw(); extern "C" long double __remainderl(long double , long double ) throw(); # 293 "/usr/include/bits/mathcalls.h" 3 extern "C" long double scalbnl(long double , int ) throw(); extern "C" long double __scalbnl(long double , int ) throw(); # 297 "/usr/include/bits/mathcalls.h" 3 extern "C" int ilogbl(long double ) throw(); extern "C" int __ilogbl(long double ) throw(); # 302 "/usr/include/bits/mathcalls.h" 3 extern "C" long double scalblnl(long double , long ) throw(); extern "C" long double __scalblnl(long double , long ) throw(); # 306 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nearbyintl(long double ) throw(); extern "C" long double __nearbyintl(long double ) throw(); # 310 "/usr/include/bits/mathcalls.h" 3 extern "C" long double roundl(long double ) throw() __attribute((const)); extern "C" long double __roundl(long double ) throw() __attribute((const)); # 314 "/usr/include/bits/mathcalls.h" 3 extern "C" long double truncl(long double ) throw() __attribute((const)); extern "C" long double __truncl(long double ) throw() __attribute((const)); # 319 "/usr/include/bits/mathcalls.h" 3 extern "C" long double remquol(long double , long double , int * ) throw(); extern "C" long double __remquol(long double , long double , int * ) throw(); # 326 "/usr/include/bits/mathcalls.h" 3 extern "C" long lrintl(long double ) throw(); extern "C" long __lrintl(long double ) throw(); # 327 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llrintl(long double ) throw(); extern "C" long long __llrintl(long double ) throw(); # 331 "/usr/include/bits/mathcalls.h" 3 extern "C" long lroundl(long double ) throw(); extern "C" long __lroundl(long double ) throw(); # 332 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llroundl(long double ) throw(); extern "C" long long __llroundl(long double ) throw(); # 336 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fdiml(long double , long double ) throw(); extern "C" long double __fdiml(long double , long double ) throw(); # 339 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fmaxl(long double , long double ) throw(); extern "C" long double __fmaxl(long double , long double ) throw(); # 342 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fminl(long double , long double ) throw(); extern "C" long double __fminl(long double , long double ) throw(); # 346 "/usr/include/bits/mathcalls.h" 3 extern "C" int __fpclassifyl(long double ) throw() # 347 "/usr/include/bits/mathcalls.h" 3 __attribute((const)); # 350 "/usr/include/bits/mathcalls.h" 3 extern "C" int __signbitl(long double ) throw() # 351 "/usr/include/bits/mathcalls.h" 3 __attribute((const)); # 355 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fmal(long double , long double , long double ) throw(); extern "C" long double __fmal(long double , long double , long double ) throw(); # 364 "/usr/include/bits/mathcalls.h" 3 extern "C" long double scalbl(long double , long double ) throw(); extern "C" long double __scalbl(long double , long double ) throw(); # 161 "/usr/include/math.h" 3 extern "C" { extern int signgam; } # 203 "/usr/include/math.h" 3 enum { # 204 "/usr/include/math.h" 3 FP_NAN, # 206 "/usr/include/math.h" 3 FP_INFINITE, # 208 "/usr/include/math.h" 3 FP_ZERO, # 210 "/usr/include/math.h" 3 FP_SUBNORMAL, # 212 "/usr/include/math.h" 3 FP_NORMAL # 214 "/usr/include/math.h" 3 }; # 302 "/usr/include/math.h" 3 extern "C" { typedef # 296 "/usr/include/math.h" 3 enum { # 297 "/usr/include/math.h" 3 _IEEE_ = (-1), # 298 "/usr/include/math.h" 3 _SVID_ = 0, # 299 "/usr/include/math.h" 3 _XOPEN_, # 300 "/usr/include/math.h" 3 _POSIX_, # 301 "/usr/include/math.h" 3 _ISOC_ # 302 "/usr/include/math.h" 3 } _LIB_VERSION_TYPE; } # 307 "/usr/include/math.h" 3 extern "C" { extern _LIB_VERSION_TYPE _LIB_VERSION; } # 318 "/usr/include/math.h" 3 extern "C" { struct __exception { # 323 "/usr/include/math.h" 3 int type; # 324 "/usr/include/math.h" 3 char *name; # 325 "/usr/include/math.h" 3 double arg1; # 326 "/usr/include/math.h" 3 double arg2; # 327 "/usr/include/math.h" 3 double retval; # 328 "/usr/include/math.h" 3 }; } # 331 "/usr/include/math.h" 3 extern "C" int matherr(__exception * ) throw(); # 67 "/usr/include/bits/waitstatus.h" 3 extern "C" { union wait { # 69 "/usr/include/bits/waitstatus.h" 3 int w_status; # 71 "/usr/include/bits/waitstatus.h" 3 struct { # 73 "/usr/include/bits/waitstatus.h" 3 unsigned __w_termsig:7; # 74 "/usr/include/bits/waitstatus.h" 3 unsigned __w_coredump:1; # 75 "/usr/include/bits/waitstatus.h" 3 unsigned __w_retcode:8; # 76 "/usr/include/bits/waitstatus.h" 3 unsigned:16; # 84 "/usr/include/bits/waitstatus.h" 3 } __wait_terminated; # 86 "/usr/include/bits/waitstatus.h" 3 struct { # 88 "/usr/include/bits/waitstatus.h" 3 unsigned __w_stopval:8; # 89 "/usr/include/bits/waitstatus.h" 3 unsigned __w_stopsig:8; # 90 "/usr/include/bits/waitstatus.h" 3 unsigned:16; # 97 "/usr/include/bits/waitstatus.h" 3 } __wait_stopped; # 98 "/usr/include/bits/waitstatus.h" 3 }; } # 102 "/usr/include/stdlib.h" 3 extern "C" { typedef # 99 "/usr/include/stdlib.h" 3 struct { # 100 "/usr/include/stdlib.h" 3 int quot; # 101 "/usr/include/stdlib.h" 3 int rem; # 102 "/usr/include/stdlib.h" 3 } div_t; } # 110 "/usr/include/stdlib.h" 3 extern "C" { typedef # 107 "/usr/include/stdlib.h" 3 struct { # 108 "/usr/include/stdlib.h" 3 long quot; # 109 "/usr/include/stdlib.h" 3 long rem; # 110 "/usr/include/stdlib.h" 3 } ldiv_t; } # 122 "/usr/include/stdlib.h" 3 extern "C" { typedef # 119 "/usr/include/stdlib.h" 3 struct { # 120 "/usr/include/stdlib.h" 3 long long quot; # 121 "/usr/include/stdlib.h" 3 long long rem; # 122 "/usr/include/stdlib.h" 3 } lldiv_t; } # 140 "/usr/include/stdlib.h" 3 extern "C" size_t __ctype_get_mb_cur_max() throw(); # 145 "/usr/include/stdlib.h" 3 extern "C" double atof(const char * ) throw() # 146 "/usr/include/stdlib.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 148 "/usr/include/stdlib.h" 3 extern "C" int atoi(const char * ) throw() # 149 "/usr/include/stdlib.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 151 "/usr/include/stdlib.h" 3 extern "C" long atol(const char * ) throw() # 152 "/usr/include/stdlib.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 158 "/usr/include/stdlib.h" 3 extern "C" long long atoll(const char * ) throw() # 159 "/usr/include/stdlib.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 165 "/usr/include/stdlib.h" 3 extern "C" double strtod(const char *__restrict__ , char **__restrict__ ) throw() # 167 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 173 "/usr/include/stdlib.h" 3 extern "C" float strtof(const char *__restrict__ , char **__restrict__ ) throw() # 174 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 176 "/usr/include/stdlib.h" 3 extern "C" long double strtold(const char *__restrict__ , char **__restrict__ ) throw() # 178 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 184 "/usr/include/stdlib.h" 3 extern "C" long strtol(const char *__restrict__ , char **__restrict__ , int ) throw() # 186 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 188 "/usr/include/stdlib.h" 3 extern "C" unsigned long strtoul(const char *__restrict__ , char **__restrict__ , int ) throw() # 190 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 196 "/usr/include/stdlib.h" 3 extern "C" long long strtoq(const char *__restrict__ , char **__restrict__ , int ) throw() # 198 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 201 "/usr/include/stdlib.h" 3 extern "C" unsigned long long strtouq(const char *__restrict__ , char **__restrict__ , int ) throw() # 203 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 210 "/usr/include/stdlib.h" 3 extern "C" long long strtoll(const char *__restrict__ , char **__restrict__ , int ) throw() # 212 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 215 "/usr/include/stdlib.h" 3 extern "C" unsigned long long strtoull(const char *__restrict__ , char **__restrict__ , int ) throw() # 217 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 240 "/usr/include/stdlib.h" 3 extern "C" long strtol_l(const char *__restrict__ , char **__restrict__ , int , __locale_t ) throw() # 242 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 4))); # 244 "/usr/include/stdlib.h" 3 extern "C" unsigned long strtoul_l(const char *__restrict__ , char **__restrict__ , int , __locale_t ) throw() # 247 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 4))); # 250 "/usr/include/stdlib.h" 3 extern "C" long long strtoll_l(const char *__restrict__ , char **__restrict__ , int , __locale_t ) throw() # 253 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 4))); # 256 "/usr/include/stdlib.h" 3 extern "C" unsigned long long strtoull_l(const char *__restrict__ , char **__restrict__ , int , __locale_t ) throw() # 259 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 4))); # 261 "/usr/include/stdlib.h" 3 extern "C" double strtod_l(const char *__restrict__ , char **__restrict__ , __locale_t ) throw() # 263 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 3))); # 265 "/usr/include/stdlib.h" 3 extern "C" float strtof_l(const char *__restrict__ , char **__restrict__ , __locale_t ) throw() # 267 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 3))); # 269 "/usr/include/stdlib.h" 3 extern "C" long double strtold_l(const char *__restrict__ , char **__restrict__ , __locale_t ) throw() # 272 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 3))); # 311 "/usr/include/stdlib.h" 3 extern "C" char *l64a(long ) throw(); # 314 "/usr/include/stdlib.h" 3 extern "C" long a64l(const char * ) throw() # 315 "/usr/include/stdlib.h" 3 __attribute((__pure__)) __attribute((__nonnull__(1))); # 34 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_char u_char; } # 35 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_short u_short; } # 36 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_int u_int; } # 37 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_long u_long; } # 38 "/usr/include/sys/types.h" 3 extern "C" { typedef __quad_t quad_t; } # 39 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_quad_t u_quad_t; } # 40 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsid_t fsid_t; } # 45 "/usr/include/sys/types.h" 3 extern "C" { typedef __loff_t loff_t; } # 49 "/usr/include/sys/types.h" 3 extern "C" { typedef __ino_t ino_t; } # 56 "/usr/include/sys/types.h" 3 extern "C" { typedef __ino64_t ino64_t; } # 61 "/usr/include/sys/types.h" 3 extern "C" { typedef __dev_t dev_t; } # 66 "/usr/include/sys/types.h" 3 extern "C" { typedef __gid_t gid_t; } # 71 "/usr/include/sys/types.h" 3 extern "C" { typedef __mode_t mode_t; } # 76 "/usr/include/sys/types.h" 3 extern "C" { typedef __nlink_t nlink_t; } # 81 "/usr/include/sys/types.h" 3 extern "C" { typedef __uid_t uid_t; } # 87 "/usr/include/sys/types.h" 3 extern "C" { typedef __off_t off_t; } # 94 "/usr/include/sys/types.h" 3 extern "C" { typedef __off64_t off64_t; } # 105 "/usr/include/sys/types.h" 3 extern "C" { typedef __id_t id_t; } # 110 "/usr/include/sys/types.h" 3 extern "C" { typedef __ssize_t ssize_t; } # 116 "/usr/include/sys/types.h" 3 extern "C" { typedef __daddr_t daddr_t; } # 117 "/usr/include/sys/types.h" 3 extern "C" { typedef __caddr_t caddr_t; } # 123 "/usr/include/sys/types.h" 3 extern "C" { typedef __key_t key_t; } # 137 "/usr/include/sys/types.h" 3 extern "C" { typedef __useconds_t useconds_t; } # 141 "/usr/include/sys/types.h" 3 extern "C" { typedef __suseconds_t suseconds_t; } # 151 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned long ulong; } # 152 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned short ushort; } # 153 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned uint; } # 195 "/usr/include/sys/types.h" 3 extern "C" { typedef signed char int8_t __attribute((__mode__(__QI__))); } # 196 "/usr/include/sys/types.h" 3 extern "C" { typedef short int16_t __attribute((__mode__(__HI__))); } # 197 "/usr/include/sys/types.h" 3 extern "C" { typedef int int32_t __attribute((__mode__(__SI__))); } # 198 "/usr/include/sys/types.h" 3 extern "C" { typedef long int64_t __attribute((__mode__(__DI__))); } # 201 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned char u_int8_t __attribute((__mode__(__QI__))); } # 202 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned short u_int16_t __attribute((__mode__(__HI__))); } # 203 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned u_int32_t __attribute((__mode__(__SI__))); } # 204 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned long u_int64_t __attribute((__mode__(__DI__))); } # 206 "/usr/include/sys/types.h" 3 extern "C" { typedef long register_t __attribute((__mode__(__word__))); } # 24 "/usr/include/bits/sigset.h" 3 extern "C" { typedef int __sig_atomic_t; } # 32 "/usr/include/bits/sigset.h" 3 extern "C" { typedef # 30 "/usr/include/bits/sigset.h" 3 struct { # 31 "/usr/include/bits/sigset.h" 3 unsigned long __val[(1024) / ((8) * sizeof(unsigned long))]; # 32 "/usr/include/bits/sigset.h" 3 } __sigset_t; } # 38 "/usr/include/sys/select.h" 3 extern "C" { typedef __sigset_t sigset_t; } # 75 "/usr/include/bits/time.h" 3 extern "C" { struct timeval { # 77 "/usr/include/bits/time.h" 3 __time_t tv_sec; # 78 "/usr/include/bits/time.h" 3 __suseconds_t tv_usec; # 79 "/usr/include/bits/time.h" 3 }; } # 55 "/usr/include/sys/select.h" 3 extern "C" { typedef long __fd_mask; } # 78 "/usr/include/sys/select.h" 3 extern "C" { typedef # 68 "/usr/include/sys/select.h" 3 struct { # 72 "/usr/include/sys/select.h" 3 __fd_mask fds_bits[1024 / (8 * ((int)sizeof(__fd_mask)))]; # 78 "/usr/include/sys/select.h" 3 } fd_set; } # 85 "/usr/include/sys/select.h" 3 extern "C" { typedef __fd_mask fd_mask; } # 109 "/usr/include/sys/select.h" 3 extern "C" int select(int , fd_set *__restrict__ , fd_set *__restrict__ , fd_set *__restrict__ , timeval *__restrict__ ); # 121 "/usr/include/sys/select.h" 3 extern "C" int pselect(int , fd_set *__restrict__ , fd_set *__restrict__ , fd_set *__restrict__ , const timespec *__restrict__ , const __sigset_t *__restrict__ ); # 31 "/usr/include/sys/sysmacros.h" 3 extern "C" unsigned gnu_dev_major(unsigned long long ) throw(); # 34 "/usr/include/sys/sysmacros.h" 3 extern "C" unsigned gnu_dev_minor(unsigned long long ) throw(); # 37 "/usr/include/sys/sysmacros.h" 3 extern "C" unsigned long long gnu_dev_makedev(unsigned , unsigned ) throw(); # 229 "/usr/include/sys/types.h" 3 extern "C" { typedef __blksize_t blksize_t; } # 236 "/usr/include/sys/types.h" 3 extern "C" { typedef __blkcnt_t blkcnt_t; } # 240 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsblkcnt_t fsblkcnt_t; } # 244 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsfilcnt_t fsfilcnt_t; } # 263 "/usr/include/sys/types.h" 3 extern "C" { typedef __blkcnt64_t blkcnt64_t; } # 264 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsblkcnt64_t fsblkcnt64_t; } # 265 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsfilcnt64_t fsfilcnt64_t; } # 50 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef unsigned long pthread_t; } # 57 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 54 "/usr/include/bits/pthreadtypes.h" 3 union { # 55 "/usr/include/bits/pthreadtypes.h" 3 char __size[56]; # 56 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 57 "/usr/include/bits/pthreadtypes.h" 3 } pthread_attr_t; } # 65 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 61 "/usr/include/bits/pthreadtypes.h" 3 struct __pthread_internal_list { # 63 "/usr/include/bits/pthreadtypes.h" 3 __pthread_internal_list *__prev; # 64 "/usr/include/bits/pthreadtypes.h" 3 __pthread_internal_list *__next; # 65 "/usr/include/bits/pthreadtypes.h" 3 } __pthread_list_t; } # 104 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 77 "/usr/include/bits/pthreadtypes.h" 3 union { # 78 "/usr/include/bits/pthreadtypes.h" 3 struct __pthread_mutex_s { # 80 "/usr/include/bits/pthreadtypes.h" 3 int __lock; # 81 "/usr/include/bits/pthreadtypes.h" 3 unsigned __count; # 82 "/usr/include/bits/pthreadtypes.h" 3 int __owner; # 84 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nusers; # 88 "/usr/include/bits/pthreadtypes.h" 3 int __kind; # 90 "/usr/include/bits/pthreadtypes.h" 3 int __spins; # 91 "/usr/include/bits/pthreadtypes.h" 3 __pthread_list_t __list; # 101 "/usr/include/bits/pthreadtypes.h" 3 } __data; # 102 "/usr/include/bits/pthreadtypes.h" 3 char __size[40]; # 103 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 104 "/usr/include/bits/pthreadtypes.h" 3 } pthread_mutex_t; } # 110 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 107 "/usr/include/bits/pthreadtypes.h" 3 union { # 108 "/usr/include/bits/pthreadtypes.h" 3 char __size[4]; # 109 "/usr/include/bits/pthreadtypes.h" 3 int __align; # 110 "/usr/include/bits/pthreadtypes.h" 3 } pthread_mutexattr_t; } # 130 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 116 "/usr/include/bits/pthreadtypes.h" 3 union { # 118 "/usr/include/bits/pthreadtypes.h" 3 struct { # 119 "/usr/include/bits/pthreadtypes.h" 3 int __lock; # 120 "/usr/include/bits/pthreadtypes.h" 3 unsigned __futex; # 121 "/usr/include/bits/pthreadtypes.h" 3 __extension__ unsigned long long __total_seq; # 122 "/usr/include/bits/pthreadtypes.h" 3 __extension__ unsigned long long __wakeup_seq; # 123 "/usr/include/bits/pthreadtypes.h" 3 __extension__ unsigned long long __woken_seq; # 124 "/usr/include/bits/pthreadtypes.h" 3 void *__mutex; # 125 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nwaiters; # 126 "/usr/include/bits/pthreadtypes.h" 3 unsigned __broadcast_seq; # 127 "/usr/include/bits/pthreadtypes.h" 3 } __data; # 128 "/usr/include/bits/pthreadtypes.h" 3 char __size[48]; # 129 "/usr/include/bits/pthreadtypes.h" 3 __extension__ long long __align; # 130 "/usr/include/bits/pthreadtypes.h" 3 } pthread_cond_t; } # 136 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 133 "/usr/include/bits/pthreadtypes.h" 3 union { # 134 "/usr/include/bits/pthreadtypes.h" 3 char __size[4]; # 135 "/usr/include/bits/pthreadtypes.h" 3 int __align; # 136 "/usr/include/bits/pthreadtypes.h" 3 } pthread_condattr_t; } # 140 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef unsigned pthread_key_t; } # 144 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef int pthread_once_t; } # 189 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 151 "/usr/include/bits/pthreadtypes.h" 3 union { # 154 "/usr/include/bits/pthreadtypes.h" 3 struct { # 155 "/usr/include/bits/pthreadtypes.h" 3 int __lock; # 156 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nr_readers; # 157 "/usr/include/bits/pthreadtypes.h" 3 unsigned __readers_wakeup; # 158 "/usr/include/bits/pthreadtypes.h" 3 unsigned __writer_wakeup; # 159 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nr_readers_queued; # 160 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nr_writers_queued; # 161 "/usr/include/bits/pthreadtypes.h" 3 int __writer; # 162 "/usr/include/bits/pthreadtypes.h" 3 int __shared; # 163 "/usr/include/bits/pthreadtypes.h" 3 unsigned long __pad1; # 164 "/usr/include/bits/pthreadtypes.h" 3 unsigned long __pad2; # 167 "/usr/include/bits/pthreadtypes.h" 3 unsigned __flags; # 168 "/usr/include/bits/pthreadtypes.h" 3 } __data; # 187 "/usr/include/bits/pthreadtypes.h" 3 char __size[56]; # 188 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 189 "/usr/include/bits/pthreadtypes.h" 3 } pthread_rwlock_t; } # 195 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 192 "/usr/include/bits/pthreadtypes.h" 3 union { # 193 "/usr/include/bits/pthreadtypes.h" 3 char __size[8]; # 194 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 195 "/usr/include/bits/pthreadtypes.h" 3 } pthread_rwlockattr_t; } # 201 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef volatile int pthread_spinlock_t; } # 210 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 207 "/usr/include/bits/pthreadtypes.h" 3 union { # 208 "/usr/include/bits/pthreadtypes.h" 3 char __size[32]; # 209 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 210 "/usr/include/bits/pthreadtypes.h" 3 } pthread_barrier_t; } # 216 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 213 "/usr/include/bits/pthreadtypes.h" 3 union { # 214 "/usr/include/bits/pthreadtypes.h" 3 char __size[4]; # 215 "/usr/include/bits/pthreadtypes.h" 3 int __align; # 216 "/usr/include/bits/pthreadtypes.h" 3 } pthread_barrierattr_t; } # 327 "/usr/include/stdlib.h" 3 extern "C" long random() throw(); # 330 "/usr/include/stdlib.h" 3 extern "C" void srandom(unsigned ) throw(); # 336 "/usr/include/stdlib.h" 3 extern "C" char *initstate(unsigned , char * , size_t ) throw() # 337 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(2))); # 341 "/usr/include/stdlib.h" 3 extern "C" char *setstate(char * ) throw() __attribute((__nonnull__(1))); # 349 "/usr/include/stdlib.h" 3 extern "C" { struct random_data { # 351 "/usr/include/stdlib.h" 3 int32_t *fptr; # 352 "/usr/include/stdlib.h" 3 int32_t *rptr; # 353 "/usr/include/stdlib.h" 3 int32_t *state; # 354 "/usr/include/stdlib.h" 3 int rand_type; # 355 "/usr/include/stdlib.h" 3 int rand_deg; # 356 "/usr/include/stdlib.h" 3 int rand_sep; # 357 "/usr/include/stdlib.h" 3 int32_t *end_ptr; # 358 "/usr/include/stdlib.h" 3 }; } # 360 "/usr/include/stdlib.h" 3 extern "C" int random_r(random_data *__restrict__ , int32_t *__restrict__ ) throw() # 361 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 363 "/usr/include/stdlib.h" 3 extern "C" int srandom_r(unsigned , random_data * ) throw() # 364 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(2))); # 366 "/usr/include/stdlib.h" 3 extern "C" int initstate_r(unsigned , char *__restrict__ , size_t , random_data *__restrict__ ) throw() # 369 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(2, 4))); # 371 "/usr/include/stdlib.h" 3 extern "C" int setstate_r(char *__restrict__ , random_data *__restrict__ ) throw() # 373 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 380 "/usr/include/stdlib.h" 3 extern "C" int rand() throw(); # 382 "/usr/include/stdlib.h" 3 extern "C" void srand(unsigned ) throw(); # 387 "/usr/include/stdlib.h" 3 extern "C" int rand_r(unsigned * ) throw(); # 395 "/usr/include/stdlib.h" 3 extern "C" double drand48() throw(); # 396 "/usr/include/stdlib.h" 3 extern "C" double erand48(unsigned short [3]) throw() __attribute((__nonnull__(1))); # 399 "/usr/include/stdlib.h" 3 extern "C" long lrand48() throw(); # 400 "/usr/include/stdlib.h" 3 extern "C" long nrand48(unsigned short [3]) throw() # 401 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 404 "/usr/include/stdlib.h" 3 extern "C" long mrand48() throw(); # 405 "/usr/include/stdlib.h" 3 extern "C" long jrand48(unsigned short [3]) throw() # 406 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 409 "/usr/include/stdlib.h" 3 extern "C" void srand48(long ) throw(); # 410 "/usr/include/stdlib.h" 3 extern "C" unsigned short *seed48(unsigned short [3]) throw() # 411 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 412 "/usr/include/stdlib.h" 3 extern "C" void lcong48(unsigned short [7]) throw() __attribute((__nonnull__(1))); # 418 "/usr/include/stdlib.h" 3 extern "C" { struct drand48_data { # 420 "/usr/include/stdlib.h" 3 unsigned short __x[3]; # 421 "/usr/include/stdlib.h" 3 unsigned short __old_x[3]; # 422 "/usr/include/stdlib.h" 3 unsigned short __c; # 423 "/usr/include/stdlib.h" 3 unsigned short __init; # 424 "/usr/include/stdlib.h" 3 unsigned long long __a; # 425 "/usr/include/stdlib.h" 3 }; } # 428 "/usr/include/stdlib.h" 3 extern "C" int drand48_r(drand48_data *__restrict__ , double *__restrict__ ) throw() # 429 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 430 "/usr/include/stdlib.h" 3 extern "C" int erand48_r(unsigned short [3], drand48_data *__restrict__ , double *__restrict__ ) throw() # 432 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 435 "/usr/include/stdlib.h" 3 extern "C" int lrand48_r(drand48_data *__restrict__ , long *__restrict__ ) throw() # 437 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 438 "/usr/include/stdlib.h" 3 extern "C" int nrand48_r(unsigned short [3], drand48_data *__restrict__ , long *__restrict__ ) throw() # 441 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 444 "/usr/include/stdlib.h" 3 extern "C" int mrand48_r(drand48_data *__restrict__ , long *__restrict__ ) throw() # 446 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 447 "/usr/include/stdlib.h" 3 extern "C" int jrand48_r(unsigned short [3], drand48_data *__restrict__ , long *__restrict__ ) throw() # 450 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 453 "/usr/include/stdlib.h" 3 extern "C" int srand48_r(long , drand48_data * ) throw() # 454 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(2))); # 456 "/usr/include/stdlib.h" 3 extern "C" int seed48_r(unsigned short [3], drand48_data * ) throw() # 457 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 459 "/usr/include/stdlib.h" 3 extern "C" int lcong48_r(unsigned short [7], drand48_data * ) throw() # 461 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2))); # 471 "/usr/include/stdlib.h" 3 extern "C" void *malloc(size_t ) throw() __attribute((__malloc__)); # 473 "/usr/include/stdlib.h" 3 extern "C" void *calloc(size_t , size_t ) throw() # 474 "/usr/include/stdlib.h" 3 __attribute((__malloc__)); # 485 "/usr/include/stdlib.h" 3 extern "C" void *realloc(void * , size_t ) throw() # 486 "/usr/include/stdlib.h" 3 __attribute((__warn_unused_result__)); # 488 "/usr/include/stdlib.h" 3 extern "C" void free(void * ) throw(); # 493 "/usr/include/stdlib.h" 3 extern "C" void cfree(void * ) throw(); # 33 "/usr/include/alloca.h" 3 extern "C" void *alloca(size_t ) throw(); # 503 "/usr/include/stdlib.h" 3 extern "C" void *valloc(size_t ) throw() __attribute((__malloc__)); # 508 "/usr/include/stdlib.h" 3 extern "C" int posix_memalign(void ** , size_t , size_t ) throw() # 509 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 514 "/usr/include/stdlib.h" 3 extern "C" void abort() throw() __attribute((__noreturn__)); # 518 "/usr/include/stdlib.h" 3 extern "C" int atexit(void (* )(void)) throw() __attribute((__nonnull__(1))); # 525 "/usr/include/stdlib.h" 3 int at_quick_exit(void (* )(void)) throw() __asm__("at_quick_exit") # 526 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 536 "/usr/include/stdlib.h" 3 extern "C" int on_exit(void (* )(int , void * ), void * ) throw() # 537 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 544 "/usr/include/stdlib.h" 3 extern "C" void exit(int ) throw() __attribute((__noreturn__)); # 552 "/usr/include/stdlib.h" 3 extern "C" void quick_exit(int ) throw() __attribute((__noreturn__)); # 560 "/usr/include/stdlib.h" 3 extern "C" void _Exit(int ) throw() __attribute((__noreturn__)); # 567 "/usr/include/stdlib.h" 3 extern "C" char *getenv(const char * ) throw() __attribute((__nonnull__(1))); # 572 "/usr/include/stdlib.h" 3 extern "C" char *__secure_getenv(const char * ) throw() # 573 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 579 "/usr/include/stdlib.h" 3 extern "C" int putenv(char * ) throw() __attribute((__nonnull__(1))); # 585 "/usr/include/stdlib.h" 3 extern "C" int setenv(const char * , const char * , int ) throw() # 586 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(2))); # 589 "/usr/include/stdlib.h" 3 extern "C" int unsetenv(const char * ) throw() __attribute((__nonnull__(1))); # 596 "/usr/include/stdlib.h" 3 extern "C" int clearenv() throw(); # 606 "/usr/include/stdlib.h" 3 extern "C" char *mktemp(char * ) throw() __attribute((__nonnull__(1))); # 620 "/usr/include/stdlib.h" 3 extern "C" int mkstemp(char * ) __attribute((__nonnull__(1))); # 630 "/usr/include/stdlib.h" 3 extern "C" int mkstemp64(char * ) __attribute((__nonnull__(1))); # 642 "/usr/include/stdlib.h" 3 extern "C" int mkstemps(char * , int ) __attribute((__nonnull__(1))); # 652 "/usr/include/stdlib.h" 3 extern "C" int mkstemps64(char * , int ) # 653 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 663 "/usr/include/stdlib.h" 3 extern "C" char *mkdtemp(char * ) throw() __attribute((__nonnull__(1))); # 674 "/usr/include/stdlib.h" 3 extern "C" int mkostemp(char * , int ) __attribute((__nonnull__(1))); # 684 "/usr/include/stdlib.h" 3 extern "C" int mkostemp64(char * , int ) __attribute((__nonnull__(1))); # 694 "/usr/include/stdlib.h" 3 extern "C" int mkostemps(char * , int , int ) # 695 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 706 "/usr/include/stdlib.h" 3 extern "C" int mkostemps64(char * , int , int ) # 707 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 717 "/usr/include/stdlib.h" 3 extern "C" int system(const char * ); # 724 "/usr/include/stdlib.h" 3 extern "C" char *canonicalize_file_name(const char * ) throw() # 725 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 734 "/usr/include/stdlib.h" 3 extern "C" char *realpath(const char *__restrict__ , char *__restrict__ ) throw(); # 742 "/usr/include/stdlib.h" 3 extern "C" { typedef int (*__compar_fn_t)(const void *, const void *); } # 745 "/usr/include/stdlib.h" 3 extern "C" { typedef __compar_fn_t comparison_fn_t; } # 749 "/usr/include/stdlib.h" 3 extern "C" { typedef int (*__compar_d_fn_t)(const void *, const void *, void *); } # 755 "/usr/include/stdlib.h" 3 extern "C" void *bsearch(const void * , const void * , size_t , size_t , __compar_fn_t ) # 757 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2, 5))); # 761 "/usr/include/stdlib.h" 3 extern "C" void qsort(void * , size_t , size_t , __compar_fn_t ) # 762 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 4))); # 764 "/usr/include/stdlib.h" 3 extern "C" void qsort_r(void * , size_t , size_t , __compar_d_fn_t , void * ) # 766 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 4))); # 771 "/usr/include/stdlib.h" 3 extern "C" int abs(int ) throw() __attribute((const)); # 772 "/usr/include/stdlib.h" 3 extern "C" long labs(long ) throw() __attribute((const)); # 776 "/usr/include/stdlib.h" 3 extern "C" long long llabs(long long ) throw() # 777 "/usr/include/stdlib.h" 3 __attribute((const)); # 785 "/usr/include/stdlib.h" 3 extern "C" div_t div(int , int ) throw() # 786 "/usr/include/stdlib.h" 3 __attribute((const)); # 787 "/usr/include/stdlib.h" 3 extern "C" ldiv_t ldiv(long , long ) throw() # 788 "/usr/include/stdlib.h" 3 __attribute((const)); # 793 "/usr/include/stdlib.h" 3 extern "C" lldiv_t lldiv(long long , long long ) throw() # 795 "/usr/include/stdlib.h" 3 __attribute((const)); # 808 "/usr/include/stdlib.h" 3 extern "C" char *ecvt(double , int , int *__restrict__ , int *__restrict__ ) throw() # 809 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4))); # 814 "/usr/include/stdlib.h" 3 extern "C" char *fcvt(double , int , int *__restrict__ , int *__restrict__ ) throw() # 815 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4))); # 820 "/usr/include/stdlib.h" 3 extern "C" char *gcvt(double , int , char * ) throw() # 821 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3))); # 826 "/usr/include/stdlib.h" 3 extern "C" char *qecvt(long double , int , int *__restrict__ , int *__restrict__ ) throw() # 828 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4))); # 829 "/usr/include/stdlib.h" 3 extern "C" char *qfcvt(long double , int , int *__restrict__ , int *__restrict__ ) throw() # 831 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4))); # 832 "/usr/include/stdlib.h" 3 extern "C" char *qgcvt(long double , int , char * ) throw() # 833 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3))); # 838 "/usr/include/stdlib.h" 3 extern "C" int ecvt_r(double , int , int *__restrict__ , int *__restrict__ , char *__restrict__ , size_t ) throw() # 840 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4, 5))); # 841 "/usr/include/stdlib.h" 3 extern "C" int fcvt_r(double , int , int *__restrict__ , int *__restrict__ , char *__restrict__ , size_t ) throw() # 843 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4, 5))); # 845 "/usr/include/stdlib.h" 3 extern "C" int qecvt_r(long double , int , int *__restrict__ , int *__restrict__ , char *__restrict__ , size_t ) throw() # 848 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4, 5))); # 849 "/usr/include/stdlib.h" 3 extern "C" int qfcvt_r(long double , int , int *__restrict__ , int *__restrict__ , char *__restrict__ , size_t ) throw() # 852 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(3, 4, 5))); # 860 "/usr/include/stdlib.h" 3 extern "C" int mblen(const char * , size_t ) throw(); # 863 "/usr/include/stdlib.h" 3 extern "C" int mbtowc(wchar_t *__restrict__ , const char *__restrict__ , size_t ) throw(); # 867 "/usr/include/stdlib.h" 3 extern "C" int wctomb(char * , wchar_t ) throw(); # 871 "/usr/include/stdlib.h" 3 extern "C" size_t mbstowcs(wchar_t *__restrict__ , const char *__restrict__ , size_t ) throw(); # 874 "/usr/include/stdlib.h" 3 extern "C" size_t wcstombs(char *__restrict__ , const wchar_t *__restrict__ , size_t ) throw(); # 885 "/usr/include/stdlib.h" 3 extern "C" int rpmatch(const char * ) throw() __attribute((__nonnull__(1))); # 896 "/usr/include/stdlib.h" 3 extern "C" int getsubopt(char **__restrict__ , char *const *__restrict__ , char **__restrict__ ) throw() # 899 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1, 2, 3))); # 905 "/usr/include/stdlib.h" 3 extern "C" void setkey(const char * ) throw() __attribute((__nonnull__(1))); # 913 "/usr/include/stdlib.h" 3 extern "C" int posix_openpt(int ); # 921 "/usr/include/stdlib.h" 3 extern "C" int grantpt(int ) throw(); # 925 "/usr/include/stdlib.h" 3 extern "C" int unlockpt(int ) throw(); # 930 "/usr/include/stdlib.h" 3 extern "C" char *ptsname(int ) throw(); # 937 "/usr/include/stdlib.h" 3 extern "C" int ptsname_r(int , char * , size_t ) throw() # 938 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(2))); # 941 "/usr/include/stdlib.h" 3 extern "C" int getpt(); # 948 "/usr/include/stdlib.h" 3 extern "C" int getloadavg(double [], int ) throw() # 949 "/usr/include/stdlib.h" 3 __attribute((__nonnull__(1))); # 69 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 namespace __gnu_cxx __attribute((__visibility__("default"))) { # 71 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Iterator, class _Container> class __normal_iterator; # 74 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 } # 76 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 namespace std __attribute((__visibility__("default"))) { # 78 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __true_type { }; # 79 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __false_type { }; # 81 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< bool __T0> # 82 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __truth_type { # 83 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; }; # 86 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __truth_type< true> { # 87 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; }; # 91 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Sp, class _Tp> # 92 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __traitor { # 94 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = ((bool)_Sp::__value) || ((bool)_Tp::__value)}; # 95 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef typename __truth_type< __value> ::__type __type; # 96 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 99 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class , class > # 100 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __are_same { # 102 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 103 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 104 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 106 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 107 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __are_same< _Tp, _Tp> { # 109 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 110 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 111 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 114 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 115 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_void { # 117 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 118 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 119 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 122 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_void< void> { # 124 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 125 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 126 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 131 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 132 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_integer { # 134 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 135 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 136 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 142 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< bool> { # 144 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 145 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 146 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 149 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< char> { # 151 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 152 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 153 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 156 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< signed char> { # 158 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 159 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 160 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 163 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned char> { # 165 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 166 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 167 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 171 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< wchar_t> { # 173 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 174 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 175 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 195 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< short> { # 197 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 198 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 199 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 202 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned short> { # 204 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 205 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 206 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 209 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< int> { # 211 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 212 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 213 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 216 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned> { # 218 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 219 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 220 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 223 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< long> { # 225 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 226 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 227 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 230 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned long> { # 232 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 233 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 234 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 237 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< long long> { # 239 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 240 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 241 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 244 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned long long> { # 246 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 247 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 248 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 253 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 254 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_floating { # 256 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 257 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 258 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 262 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_floating< float> { # 264 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 265 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 266 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 269 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_floating< double> { # 271 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 272 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 273 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 276 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_floating< long double> { # 278 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 279 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 280 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 285 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 286 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_pointer { # 288 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 289 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 290 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 292 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 293 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_pointer< _Tp *> { # 295 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 296 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 297 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 302 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 303 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_normal_iterator { # 305 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 306 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 307 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 309 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Iterator, class _Container> # 310 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_normal_iterator< __gnu_cxx::__normal_iterator< _Iterator, _Container> > { # 313 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 314 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 315 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 320 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 321 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_arithmetic : public __traitor< __is_integer< _Tp> , __is_floating< _Tp> > { # 323 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 328 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 329 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_fundamental : public __traitor< __is_void< _Tp> , __is_arithmetic< _Tp> > { # 331 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 336 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 337 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_scalar : public __traitor< __is_arithmetic< _Tp> , __is_pointer< _Tp> > { # 339 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 344 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 345 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_char { # 347 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 348 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 349 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 352 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_char< char> { # 354 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 355 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 356 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 360 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_char< wchar_t> { # 362 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 363 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 364 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 367 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 368 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_byte { # 370 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 371 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 372 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 375 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_byte< char> { # 377 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 378 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 379 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 382 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_byte< signed char> { # 384 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 385 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 386 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 389 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template<> struct __is_byte< unsigned char> { # 391 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 392 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 393 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 398 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 399 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_move_iterator { # 401 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value}; # 402 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 403 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 417 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 418 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 class __is_iterator_helper { # 420 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef char __one; # 421 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef struct { char __arr[2]; } __two; # 423 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Up> # 424 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct _Wrap_type { # 425 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 427 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Up> static __one __test(_Wrap_type< typename _Up::iterator_category> *); # 430 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Up> static __two __test(...); # 434 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 public: static const bool __value = ((sizeof(__test< _Tp> (0)) == (1)) || __is_pointer< _Tp> ::__value); # 436 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 438 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 template< class _Tp> # 439 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 struct __is_iterator { # 441 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 enum { __value = __is_iterator_helper< _Tp> ::__value}; # 442 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 typedef typename __truth_type< __value> ::__type __type; # 443 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 }; # 445 "/usr/include/c++/4.5/bits/cpp_type_traits.h" 3 } # 37 "/usr/include/c++/4.5/ext/type_traits.h" 3 namespace __gnu_cxx __attribute((__visibility__("default"))) { # 40 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< bool __T1, class > # 41 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __enable_if { # 42 "/usr/include/c++/4.5/ext/type_traits.h" 3 }; # 44 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp> # 45 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __enable_if< true, _Tp> { # 46 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef _Tp __type; }; # 50 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< bool _Cond, class _Iftrue, class _Iffalse> # 51 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __conditional_type { # 52 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef _Iftrue __type; }; # 54 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Iftrue, class _Iffalse> # 55 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __conditional_type< false, _Iftrue, _Iffalse> { # 56 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef _Iffalse __type; }; # 60 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp> # 61 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __add_unsigned { # 64 "/usr/include/c++/4.5/ext/type_traits.h" 3 private: typedef __enable_if< std::__is_integer< _Tp> ::__value, _Tp> __if_type; # 67 "/usr/include/c++/4.5/ext/type_traits.h" 3 public: typedef typename __enable_if< std::__is_integer< _Tp> ::__value, _Tp> ::__type __type; # 68 "/usr/include/c++/4.5/ext/type_traits.h" 3 }; # 71 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< char> { # 72 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef unsigned char __type; }; # 75 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< signed char> { # 76 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef unsigned char __type; }; # 79 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< short> { # 80 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef unsigned short __type; }; # 83 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< int> { # 84 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef unsigned __type; }; # 87 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< long> { # 88 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef unsigned long __type; }; # 91 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< long long> { # 92 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef unsigned long long __type; }; # 96 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< bool> ; # 99 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __add_unsigned< wchar_t> ; # 103 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp> # 104 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __remove_unsigned { # 107 "/usr/include/c++/4.5/ext/type_traits.h" 3 private: typedef __enable_if< std::__is_integer< _Tp> ::__value, _Tp> __if_type; # 110 "/usr/include/c++/4.5/ext/type_traits.h" 3 public: typedef typename __enable_if< std::__is_integer< _Tp> ::__value, _Tp> ::__type __type; # 111 "/usr/include/c++/4.5/ext/type_traits.h" 3 }; # 114 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< char> { # 115 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef signed char __type; }; # 118 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned char> { # 119 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef signed char __type; }; # 122 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned short> { # 123 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef short __type; }; # 126 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned> { # 127 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef int __type; }; # 130 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned long> { # 131 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef long __type; }; # 134 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned long long> { # 135 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef long long __type; }; # 139 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< bool> ; # 142 "/usr/include/c++/4.5/ext/type_traits.h" 3 template<> struct __remove_unsigned< wchar_t> ; # 146 "/usr/include/c++/4.5/ext/type_traits.h" 3 template < typename _Type > inline bool __is_null_pointer ( _Type * __ptr ) { return __ptr == 0; } # 151 "/usr/include/c++/4.5/ext/type_traits.h" 3 template < typename _Type > inline bool __is_null_pointer ( _Type ) { return false; } # 158 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp, bool __T2 = std::__is_integer< _Tp> ::__value> # 159 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __promote { # 160 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef double __type; }; # 162 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp> # 163 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __promote< _Tp, false> { # 164 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef _Tp __type; }; # 166 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp, class _Up> # 167 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __promote_2 { # 170 "/usr/include/c++/4.5/ext/type_traits.h" 3 private: typedef typename __promote< _Tp, std::__is_integer< _Tp> ::__value> ::__type __type1; # 171 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef typename __promote< _Up, std::__is_integer< _Up> ::__value> ::__type __type2; # 174 "/usr/include/c++/4.5/ext/type_traits.h" 3 public: typedef __typeof__(__type1() + __type2()) __type; # 175 "/usr/include/c++/4.5/ext/type_traits.h" 3 }; # 177 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp, class _Up, class _Vp> # 178 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __promote_3 { # 181 "/usr/include/c++/4.5/ext/type_traits.h" 3 private: typedef typename __promote< _Tp, std::__is_integer< _Tp> ::__value> ::__type __type1; # 182 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef typename __promote< _Up, std::__is_integer< _Up> ::__value> ::__type __type2; # 183 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef typename __promote< _Vp, std::__is_integer< _Vp> ::__value> ::__type __type3; # 186 "/usr/include/c++/4.5/ext/type_traits.h" 3 public: typedef __typeof__((__type1() + __type2()) + __type3()) __type; # 187 "/usr/include/c++/4.5/ext/type_traits.h" 3 }; # 189 "/usr/include/c++/4.5/ext/type_traits.h" 3 template< class _Tp, class _Up, class _Vp, class _Wp> # 190 "/usr/include/c++/4.5/ext/type_traits.h" 3 struct __promote_4 { # 193 "/usr/include/c++/4.5/ext/type_traits.h" 3 private: typedef typename __promote< _Tp, std::__is_integer< _Tp> ::__value> ::__type __type1; # 194 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef typename __promote< _Up, std::__is_integer< _Up> ::__value> ::__type __type2; # 195 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef typename __promote< _Vp, std::__is_integer< _Vp> ::__value> ::__type __type3; # 196 "/usr/include/c++/4.5/ext/type_traits.h" 3 typedef typename __promote< _Wp, std::__is_integer< _Wp> ::__value> ::__type __type4; # 199 "/usr/include/c++/4.5/ext/type_traits.h" 3 public: typedef __typeof__(((__type1() + __type2()) + __type3()) + __type4()) __type; # 200 "/usr/include/c++/4.5/ext/type_traits.h" 3 }; # 202 "/usr/include/c++/4.5/ext/type_traits.h" 3 } # 77 "/usr/include/c++/4.5/cmath" 3 namespace std __attribute((__visibility__("default"))) { # 81 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > _Tp __cmath_power ( _Tp, unsigned int ); # 84 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline _Tp __pow_helper ( _Tp __x, int __n ) { return __n < 0 ? _Tp ( 1 ) / __cmath_power ( __x, - __n ) : __cmath_power ( __x, __n ); } # 94 "/usr/include/c++/4.5/cmath" 3 inline double abs(double __x) # 95 "/usr/include/c++/4.5/cmath" 3 { return __builtin_fabs(__x); } # 98 "/usr/include/c++/4.5/cmath" 3 inline float abs(float __x) # 99 "/usr/include/c++/4.5/cmath" 3 { return __builtin_fabsf(__x); } # 102 "/usr/include/c++/4.5/cmath" 3 inline long double abs(long double __x) # 103 "/usr/include/c++/4.5/cmath" 3 { return __builtin_fabsl(__x); } # 105 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type abs ( _Tp __x ) { return __builtin_fabs ( __x ); } # 111 "/usr/include/c++/4.5/cmath" 3 using ::acos; # 114 "/usr/include/c++/4.5/cmath" 3 inline float acos(float __x) # 115 "/usr/include/c++/4.5/cmath" 3 { return __builtin_acosf(__x); } # 118 "/usr/include/c++/4.5/cmath" 3 inline long double acos(long double __x) # 119 "/usr/include/c++/4.5/cmath" 3 { return __builtin_acosl(__x); } # 121 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type acos ( _Tp __x ) { return __builtin_acos ( __x ); } # 127 "/usr/include/c++/4.5/cmath" 3 using ::asin; # 130 "/usr/include/c++/4.5/cmath" 3 inline float asin(float __x) # 131 "/usr/include/c++/4.5/cmath" 3 { return __builtin_asinf(__x); } # 134 "/usr/include/c++/4.5/cmath" 3 inline long double asin(long double __x) # 135 "/usr/include/c++/4.5/cmath" 3 { return __builtin_asinl(__x); } # 137 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type asin ( _Tp __x ) { return __builtin_asin ( __x ); } # 143 "/usr/include/c++/4.5/cmath" 3 using ::atan; # 146 "/usr/include/c++/4.5/cmath" 3 inline float atan(float __x) # 147 "/usr/include/c++/4.5/cmath" 3 { return __builtin_atanf(__x); } # 150 "/usr/include/c++/4.5/cmath" 3 inline long double atan(long double __x) # 151 "/usr/include/c++/4.5/cmath" 3 { return __builtin_atanl(__x); } # 153 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type atan ( _Tp __x ) { return __builtin_atan ( __x ); } # 159 "/usr/include/c++/4.5/cmath" 3 using ::atan2; # 162 "/usr/include/c++/4.5/cmath" 3 inline float atan2(float __y, float __x) # 163 "/usr/include/c++/4.5/cmath" 3 { return __builtin_atan2f(__y, __x); } # 166 "/usr/include/c++/4.5/cmath" 3 inline long double atan2(long double __y, long double __x) # 167 "/usr/include/c++/4.5/cmath" 3 { return __builtin_atan2l(__y, __x); } # 169 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp, typename _Up > inline typename __gnu_cxx :: __promote_2 < typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value && __is_arithmetic < _Up > :: __value, _Tp > :: __type, _Up > :: __type atan2 ( _Tp __y, _Up __x ) { typedef typename __gnu_cxx :: __promote_2 < _Tp, _Up > :: __type __type; return atan2 ( __type ( __y ), __type ( __x ) ); } # 181 "/usr/include/c++/4.5/cmath" 3 using ::ceil; # 184 "/usr/include/c++/4.5/cmath" 3 inline float ceil(float __x) # 185 "/usr/include/c++/4.5/cmath" 3 { return __builtin_ceilf(__x); } # 188 "/usr/include/c++/4.5/cmath" 3 inline long double ceil(long double __x) # 189 "/usr/include/c++/4.5/cmath" 3 { return __builtin_ceill(__x); } # 191 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type ceil ( _Tp __x ) { return __builtin_ceil ( __x ); } # 197 "/usr/include/c++/4.5/cmath" 3 using ::cos; # 200 "/usr/include/c++/4.5/cmath" 3 inline float cos(float __x) # 201 "/usr/include/c++/4.5/cmath" 3 { return __builtin_cosf(__x); } # 204 "/usr/include/c++/4.5/cmath" 3 inline long double cos(long double __x) # 205 "/usr/include/c++/4.5/cmath" 3 { return __builtin_cosl(__x); } # 207 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type cos ( _Tp __x ) { return __builtin_cos ( __x ); } # 213 "/usr/include/c++/4.5/cmath" 3 using ::cosh; # 216 "/usr/include/c++/4.5/cmath" 3 inline float cosh(float __x) # 217 "/usr/include/c++/4.5/cmath" 3 { return __builtin_coshf(__x); } # 220 "/usr/include/c++/4.5/cmath" 3 inline long double cosh(long double __x) # 221 "/usr/include/c++/4.5/cmath" 3 { return __builtin_coshl(__x); } # 223 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type cosh ( _Tp __x ) { return __builtin_cosh ( __x ); } # 229 "/usr/include/c++/4.5/cmath" 3 using ::exp; # 232 "/usr/include/c++/4.5/cmath" 3 inline float exp(float __x) # 233 "/usr/include/c++/4.5/cmath" 3 { return __builtin_expf(__x); } # 236 "/usr/include/c++/4.5/cmath" 3 inline long double exp(long double __x) # 237 "/usr/include/c++/4.5/cmath" 3 { return __builtin_expl(__x); } # 239 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type exp ( _Tp __x ) { return __builtin_exp ( __x ); } # 245 "/usr/include/c++/4.5/cmath" 3 using ::fabs; # 248 "/usr/include/c++/4.5/cmath" 3 inline float fabs(float __x) # 249 "/usr/include/c++/4.5/cmath" 3 { return __builtin_fabsf(__x); } # 252 "/usr/include/c++/4.5/cmath" 3 inline long double fabs(long double __x) # 253 "/usr/include/c++/4.5/cmath" 3 { return __builtin_fabsl(__x); } # 255 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type fabs ( _Tp __x ) { return __builtin_fabs ( __x ); } # 261 "/usr/include/c++/4.5/cmath" 3 using ::floor; # 264 "/usr/include/c++/4.5/cmath" 3 inline float floor(float __x) # 265 "/usr/include/c++/4.5/cmath" 3 { return __builtin_floorf(__x); } # 268 "/usr/include/c++/4.5/cmath" 3 inline long double floor(long double __x) # 269 "/usr/include/c++/4.5/cmath" 3 { return __builtin_floorl(__x); } # 271 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type floor ( _Tp __x ) { return __builtin_floor ( __x ); } # 277 "/usr/include/c++/4.5/cmath" 3 using ::fmod; # 280 "/usr/include/c++/4.5/cmath" 3 inline float fmod(float __x, float __y) # 281 "/usr/include/c++/4.5/cmath" 3 { return __builtin_fmodf(__x, __y); } # 284 "/usr/include/c++/4.5/cmath" 3 inline long double fmod(long double __x, long double __y) # 285 "/usr/include/c++/4.5/cmath" 3 { return __builtin_fmodl(__x, __y); } # 287 "/usr/include/c++/4.5/cmath" 3 using ::frexp; # 290 "/usr/include/c++/4.5/cmath" 3 inline float frexp(float __x, int *__exp) # 291 "/usr/include/c++/4.5/cmath" 3 { return __builtin_frexpf(__x, __exp); } # 294 "/usr/include/c++/4.5/cmath" 3 inline long double frexp(long double __x, int *__exp) # 295 "/usr/include/c++/4.5/cmath" 3 { return __builtin_frexpl(__x, __exp); } # 297 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type frexp ( _Tp __x, int * __exp ) { return __builtin_frexp ( __x, __exp ); } # 303 "/usr/include/c++/4.5/cmath" 3 using ::ldexp; # 306 "/usr/include/c++/4.5/cmath" 3 inline float ldexp(float __x, int __exp) # 307 "/usr/include/c++/4.5/cmath" 3 { return __builtin_ldexpf(__x, __exp); } # 310 "/usr/include/c++/4.5/cmath" 3 inline long double ldexp(long double __x, int __exp) # 311 "/usr/include/c++/4.5/cmath" 3 { return __builtin_ldexpl(__x, __exp); } # 313 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type ldexp ( _Tp __x, int __exp ) { return __builtin_ldexp ( __x, __exp ); } # 319 "/usr/include/c++/4.5/cmath" 3 using ::log; # 322 "/usr/include/c++/4.5/cmath" 3 inline float log(float __x) # 323 "/usr/include/c++/4.5/cmath" 3 { return __builtin_logf(__x); } # 326 "/usr/include/c++/4.5/cmath" 3 inline long double log(long double __x) # 327 "/usr/include/c++/4.5/cmath" 3 { return __builtin_logl(__x); } # 329 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type log ( _Tp __x ) { return __builtin_log ( __x ); } # 335 "/usr/include/c++/4.5/cmath" 3 using ::log10; # 338 "/usr/include/c++/4.5/cmath" 3 inline float log10(float __x) # 339 "/usr/include/c++/4.5/cmath" 3 { return __builtin_log10f(__x); } # 342 "/usr/include/c++/4.5/cmath" 3 inline long double log10(long double __x) # 343 "/usr/include/c++/4.5/cmath" 3 { return __builtin_log10l(__x); } # 345 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type log10 ( _Tp __x ) { return __builtin_log10 ( __x ); } # 351 "/usr/include/c++/4.5/cmath" 3 using ::modf; # 354 "/usr/include/c++/4.5/cmath" 3 inline float modf(float __x, float *__iptr) # 355 "/usr/include/c++/4.5/cmath" 3 { return __builtin_modff(__x, __iptr); } # 358 "/usr/include/c++/4.5/cmath" 3 inline long double modf(long double __x, long double *__iptr) # 359 "/usr/include/c++/4.5/cmath" 3 { return __builtin_modfl(__x, __iptr); } # 361 "/usr/include/c++/4.5/cmath" 3 using ::pow; # 364 "/usr/include/c++/4.5/cmath" 3 inline float pow(float __x, float __y) # 365 "/usr/include/c++/4.5/cmath" 3 { return __builtin_powf(__x, __y); } # 368 "/usr/include/c++/4.5/cmath" 3 inline long double pow(long double __x, long double __y) # 369 "/usr/include/c++/4.5/cmath" 3 { return __builtin_powl(__x, __y); } # 375 "/usr/include/c++/4.5/cmath" 3 inline double pow(double __x, int __i) # 376 "/usr/include/c++/4.5/cmath" 3 { return __builtin_powi(__x, __i); } # 379 "/usr/include/c++/4.5/cmath" 3 inline float pow(float __x, int __n) # 380 "/usr/include/c++/4.5/cmath" 3 { return __builtin_powif(__x, __n); } # 383 "/usr/include/c++/4.5/cmath" 3 inline long double pow(long double __x, int __n) # 384 "/usr/include/c++/4.5/cmath" 3 { return __builtin_powil(__x, __n); } # 387 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp, typename _Up > inline typename __gnu_cxx :: __promote_2 < typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value && __is_arithmetic < _Up > :: __value, _Tp > :: __type, _Up > :: __type pow ( _Tp __x, _Up __y ) { typedef typename __gnu_cxx :: __promote_2 < _Tp, _Up > :: __type __type; return pow ( __type ( __x ), __type ( __y ) ); } # 399 "/usr/include/c++/4.5/cmath" 3 using ::sin; # 402 "/usr/include/c++/4.5/cmath" 3 inline float sin(float __x) # 403 "/usr/include/c++/4.5/cmath" 3 { return __builtin_sinf(__x); } # 406 "/usr/include/c++/4.5/cmath" 3 inline long double sin(long double __x) # 407 "/usr/include/c++/4.5/cmath" 3 { return __builtin_sinl(__x); } # 409 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type sin ( _Tp __x ) { return __builtin_sin ( __x ); } # 415 "/usr/include/c++/4.5/cmath" 3 using ::sinh; # 418 "/usr/include/c++/4.5/cmath" 3 inline float sinh(float __x) # 419 "/usr/include/c++/4.5/cmath" 3 { return __builtin_sinhf(__x); } # 422 "/usr/include/c++/4.5/cmath" 3 inline long double sinh(long double __x) # 423 "/usr/include/c++/4.5/cmath" 3 { return __builtin_sinhl(__x); } # 425 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type sinh ( _Tp __x ) { return __builtin_sinh ( __x ); } # 431 "/usr/include/c++/4.5/cmath" 3 using ::sqrt; # 434 "/usr/include/c++/4.5/cmath" 3 inline float sqrt(float __x) # 435 "/usr/include/c++/4.5/cmath" 3 { return __builtin_sqrtf(__x); } # 438 "/usr/include/c++/4.5/cmath" 3 inline long double sqrt(long double __x) # 439 "/usr/include/c++/4.5/cmath" 3 { return __builtin_sqrtl(__x); } # 441 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type sqrt ( _Tp __x ) { return __builtin_sqrt ( __x ); } # 447 "/usr/include/c++/4.5/cmath" 3 using ::tan; # 450 "/usr/include/c++/4.5/cmath" 3 inline float tan(float __x) # 451 "/usr/include/c++/4.5/cmath" 3 { return __builtin_tanf(__x); } # 454 "/usr/include/c++/4.5/cmath" 3 inline long double tan(long double __x) # 455 "/usr/include/c++/4.5/cmath" 3 { return __builtin_tanl(__x); } # 457 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type tan ( _Tp __x ) { return __builtin_tan ( __x ); } # 463 "/usr/include/c++/4.5/cmath" 3 using ::tanh; # 466 "/usr/include/c++/4.5/cmath" 3 inline float tanh(float __x) # 467 "/usr/include/c++/4.5/cmath" 3 { return __builtin_tanhf(__x); } # 470 "/usr/include/c++/4.5/cmath" 3 inline long double tanh(long double __x) # 471 "/usr/include/c++/4.5/cmath" 3 { return __builtin_tanhl(__x); } # 473 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type tanh ( _Tp __x ) { return __builtin_tanh ( __x ); } # 479 "/usr/include/c++/4.5/cmath" 3 } # 498 "/usr/include/c++/4.5/cmath" 3 namespace std __attribute((__visibility__("default"))) { # 500 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type fpclassify ( _Tp __f ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_fpclassify ( FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __type ( __f ) ); } # 510 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isfinite ( _Tp __f ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isfinite ( __type ( __f ) ); } # 519 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isinf ( _Tp __f ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isinf ( __type ( __f ) ); } # 528 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isnan ( _Tp __f ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isnan ( __type ( __f ) ); } # 537 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isnormal ( _Tp __f ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isnormal ( __type ( __f ) ); } # 546 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type signbit ( _Tp __f ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_signbit ( __type ( __f ) ); } # 555 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isgreater ( _Tp __f1, _Tp __f2 ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isgreater ( __type ( __f1 ), __type ( __f2 ) ); } # 564 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isgreaterequal ( _Tp __f1, _Tp __f2 ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isgreaterequal ( __type ( __f1 ), __type ( __f2 ) ); } # 573 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isless ( _Tp __f1, _Tp __f2 ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isless ( __type ( __f1 ), __type ( __f2 ) ); } # 582 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type islessequal ( _Tp __f1, _Tp __f2 ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_islessequal ( __type ( __f1 ), __type ( __f2 ) ); } # 591 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type islessgreater ( _Tp __f1, _Tp __f2 ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_islessgreater ( __type ( __f1 ), __type ( __f2 ) ); } # 600 "/usr/include/c++/4.5/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value, int > :: __type isunordered ( _Tp __f1, _Tp __f2 ) { typedef typename __gnu_cxx :: __promote < _Tp > :: __type __type; return __builtin_isunordered ( __type ( __f1 ), __type ( __f2 ) ); } # 609 "/usr/include/c++/4.5/cmath" 3 } # 35 "/usr/include/c++/4.5/bits/cmath.tcc" 3 namespace std __attribute((__visibility__("default"))) { # 37 "/usr/include/c++/4.5/bits/cmath.tcc" 3 template < typename _Tp > inline _Tp __cmath_power ( _Tp __x, unsigned int __n ) { _Tp __y = __n % 2 ? __x : _Tp ( 1 ); while ( __n >>= 1 ) { __x = __x * __x; if ( __n % 2 ) __y = __y * __x; } return __y; } # 53 "/usr/include/c++/4.5/bits/cmath.tcc" 3 } # 49 "/usr/include/c++/4.5/cstddef" 3 namespace std __attribute((__visibility__("default"))) { # 51 "/usr/include/c++/4.5/cstddef" 3 using ::ptrdiff_t; # 52 "/usr/include/c++/4.5/cstddef" 3 using ::size_t; # 54 "/usr/include/c++/4.5/cstddef" 3 } # 100 "/usr/include/c++/4.5/cstdlib" 3 namespace std __attribute((__visibility__("default"))) { # 102 "/usr/include/c++/4.5/cstdlib" 3 using ::div_t; # 103 "/usr/include/c++/4.5/cstdlib" 3 using ::ldiv_t; # 105 "/usr/include/c++/4.5/cstdlib" 3 using ::abort; # 106 "/usr/include/c++/4.5/cstdlib" 3 using ::abs; # 107 "/usr/include/c++/4.5/cstdlib" 3 using ::atexit; # 108 "/usr/include/c++/4.5/cstdlib" 3 using ::atof; # 109 "/usr/include/c++/4.5/cstdlib" 3 using ::atoi; # 110 "/usr/include/c++/4.5/cstdlib" 3 using ::atol; # 111 "/usr/include/c++/4.5/cstdlib" 3 using ::bsearch; # 112 "/usr/include/c++/4.5/cstdlib" 3 using ::calloc; # 113 "/usr/include/c++/4.5/cstdlib" 3 using ::div; # 114 "/usr/include/c++/4.5/cstdlib" 3 using ::exit; # 115 "/usr/include/c++/4.5/cstdlib" 3 using ::free; # 116 "/usr/include/c++/4.5/cstdlib" 3 using ::getenv; # 117 "/usr/include/c++/4.5/cstdlib" 3 using ::labs; # 118 "/usr/include/c++/4.5/cstdlib" 3 using ::ldiv; # 119 "/usr/include/c++/4.5/cstdlib" 3 using ::malloc; # 121 "/usr/include/c++/4.5/cstdlib" 3 using ::mblen; # 122 "/usr/include/c++/4.5/cstdlib" 3 using ::mbstowcs; # 123 "/usr/include/c++/4.5/cstdlib" 3 using ::mbtowc; # 125 "/usr/include/c++/4.5/cstdlib" 3 using ::qsort; # 126 "/usr/include/c++/4.5/cstdlib" 3 using ::rand; # 127 "/usr/include/c++/4.5/cstdlib" 3 using ::realloc; # 128 "/usr/include/c++/4.5/cstdlib" 3 using ::srand; # 129 "/usr/include/c++/4.5/cstdlib" 3 using ::strtod; # 130 "/usr/include/c++/4.5/cstdlib" 3 using ::strtol; # 131 "/usr/include/c++/4.5/cstdlib" 3 using ::strtoul; # 132 "/usr/include/c++/4.5/cstdlib" 3 using ::system; # 134 "/usr/include/c++/4.5/cstdlib" 3 using ::wcstombs; # 135 "/usr/include/c++/4.5/cstdlib" 3 using ::wctomb; # 139 "/usr/include/c++/4.5/cstdlib" 3 inline long abs(long __i) { return labs(__i); } # 142 "/usr/include/c++/4.5/cstdlib" 3 inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } # 144 "/usr/include/c++/4.5/cstdlib" 3 } # 157 "/usr/include/c++/4.5/cstdlib" 3 namespace __gnu_cxx __attribute((__visibility__("default"))) { # 160 "/usr/include/c++/4.5/cstdlib" 3 using ::lldiv_t; # 166 "/usr/include/c++/4.5/cstdlib" 3 using ::_Exit; # 170 "/usr/include/c++/4.5/cstdlib" 3 inline long long abs(long long __x) { return (__x >= (0)) ? __x : (-__x); } # 173 "/usr/include/c++/4.5/cstdlib" 3 using ::llabs; # 176 "/usr/include/c++/4.5/cstdlib" 3 inline lldiv_t div(long long __n, long long __d) # 177 "/usr/include/c++/4.5/cstdlib" 3 { lldiv_t __q; (__q.quot) = (__n / __d); (__q.rem) = (__n % __d); return __q; } # 179 "/usr/include/c++/4.5/cstdlib" 3 using ::lldiv; # 190 "/usr/include/c++/4.5/cstdlib" 3 using ::atoll; # 191 "/usr/include/c++/4.5/cstdlib" 3 using ::strtoll; # 192 "/usr/include/c++/4.5/cstdlib" 3 using ::strtoull; # 194 "/usr/include/c++/4.5/cstdlib" 3 using ::strtof; # 195 "/usr/include/c++/4.5/cstdlib" 3 using ::strtold; # 197 "/usr/include/c++/4.5/cstdlib" 3 } # 199 "/usr/include/c++/4.5/cstdlib" 3 namespace std __attribute((__visibility__("default"))) { # 202 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::lldiv_t; # 204 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::_Exit; # 205 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::abs; # 207 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::llabs; # 208 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::div; # 209 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::lldiv; # 211 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::atoll; # 212 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::strtof; # 213 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::strtoll; # 214 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::strtoull; # 215 "/usr/include/c++/4.5/cstdlib" 3 using __gnu_cxx::strtold; # 217 "/usr/include/c++/4.5/cstdlib" 3 } # 2335 "/usr/local/cuda4.1/cuda/include/math_functions.h" namespace __gnu_cxx { # 2337 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline long long abs(long long); # 2338 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2340 "/usr/local/cuda4.1/cuda/include/math_functions.h" namespace std { # 2342 "/usr/local/cuda4.1/cuda/include/math_functions.h" template< class T> extern inline T __pow_helper(T, int); # 2343 "/usr/local/cuda4.1/cuda/include/math_functions.h" template< class T> extern inline T __cmath_power(T, unsigned); # 2344 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2346 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::abs; # 2347 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::fabs; # 2348 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::ceil; # 2349 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::floor; # 2350 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::sqrt; # 2351 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::pow; # 2352 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::log; # 2353 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::log10; # 2354 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::fmod; # 2355 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::modf; # 2356 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::exp; # 2357 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::frexp; # 2358 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::ldexp; # 2359 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::asin; # 2360 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::sin; # 2361 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::sinh; # 2362 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::acos; # 2363 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::cos; # 2364 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::cosh; # 2365 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::atan; # 2366 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::atan2; # 2367 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::tan; # 2368 "/usr/local/cuda4.1/cuda/include/math_functions.h" using std::tanh; # 2531 "/usr/local/cuda4.1/cuda/include/math_functions.h" namespace std { # 2534 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline long abs(long); # 2535 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float abs(float); # 2536 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline double abs(double); # 2537 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float fabs(float); # 2538 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float ceil(float); # 2539 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float floor(float); # 2540 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float sqrt(float); # 2541 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float pow(float, float); # 2542 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float pow(float, int); # 2543 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline double pow(double, int); # 2544 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float log(float); # 2545 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float log10(float); # 2546 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float fmod(float, float); # 2547 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float modf(float, float *); # 2548 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float exp(float); # 2549 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float frexp(float, int *); # 2550 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float ldexp(float, int); # 2551 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float asin(float); # 2552 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float sin(float); # 2553 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float sinh(float); # 2554 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float acos(float); # 2555 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float cos(float); # 2556 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float cosh(float); # 2557 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float atan(float); # 2558 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float atan2(float, float); # 2559 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float tan(float); # 2560 "/usr/local/cuda4.1/cuda/include/math_functions.h" extern inline float tanh(float); # 2563 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2566 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float logb(float a) # 2567 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2568 "/usr/local/cuda4.1/cuda/include/math_functions.h" return logbf(a); # 2569 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2571 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline int ilogb(float a) # 2572 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2573 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ilogbf(a); # 2574 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2576 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float scalbn(float a, int b) # 2577 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2578 "/usr/local/cuda4.1/cuda/include/math_functions.h" return scalbnf(a, b); # 2579 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2581 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float scalbln(float a, long b) # 2582 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2583 "/usr/local/cuda4.1/cuda/include/math_functions.h" return scalblnf(a, b); # 2584 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2586 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float exp2(float a) # 2587 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2588 "/usr/local/cuda4.1/cuda/include/math_functions.h" return exp2f(a); # 2589 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2591 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float exp10(float a) # 2592 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2593 "/usr/local/cuda4.1/cuda/include/math_functions.h" return exp10f(a); # 2594 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2596 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float expm1(float a) # 2597 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2598 "/usr/local/cuda4.1/cuda/include/math_functions.h" return expm1f(a); # 2599 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2601 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float log2(float a) # 2602 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2603 "/usr/local/cuda4.1/cuda/include/math_functions.h" return log2f(a); # 2604 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2606 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float log1p(float a) # 2607 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2608 "/usr/local/cuda4.1/cuda/include/math_functions.h" return log1pf(a); # 2609 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2611 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float rsqrt(float a) # 2612 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2613 "/usr/local/cuda4.1/cuda/include/math_functions.h" return rsqrtf(a); # 2614 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2616 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float acosh(float a) # 2617 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2618 "/usr/local/cuda4.1/cuda/include/math_functions.h" return acoshf(a); # 2619 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2621 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float asinh(float a) # 2622 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2623 "/usr/local/cuda4.1/cuda/include/math_functions.h" return asinhf(a); # 2624 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2626 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float atanh(float a) # 2627 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2628 "/usr/local/cuda4.1/cuda/include/math_functions.h" return atanhf(a); # 2629 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2631 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float hypot(float a, float b) # 2632 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2633 "/usr/local/cuda4.1/cuda/include/math_functions.h" return hypotf(a, b); # 2634 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2636 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float cbrt(float a) # 2637 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2638 "/usr/local/cuda4.1/cuda/include/math_functions.h" return cbrtf(a); # 2639 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2641 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float rcbrt(float a) # 2642 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2643 "/usr/local/cuda4.1/cuda/include/math_functions.h" return rcbrtf(a); # 2644 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2646 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float sinpi(float a) # 2647 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2648 "/usr/local/cuda4.1/cuda/include/math_functions.h" return sinpif(a); # 2649 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2651 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float cospi(float a) # 2652 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2653 "/usr/local/cuda4.1/cuda/include/math_functions.h" return cospif(a); # 2654 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2656 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline void sincos(float a, float *sptr, float *cptr) # 2657 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2658 "/usr/local/cuda4.1/cuda/include/math_functions.h" sincosf(a, sptr, cptr); # 2659 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2661 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float j0(float a) # 2662 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2663 "/usr/local/cuda4.1/cuda/include/math_functions.h" return j0f(a); # 2664 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2666 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float j1(float a) # 2667 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2668 "/usr/local/cuda4.1/cuda/include/math_functions.h" return j1f(a); # 2669 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2671 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float jn(int n, float a) # 2672 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2673 "/usr/local/cuda4.1/cuda/include/math_functions.h" return jnf(n, a); # 2674 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2676 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float y0(float a) # 2677 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2678 "/usr/local/cuda4.1/cuda/include/math_functions.h" return y0f(a); # 2679 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2681 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float y1(float a) # 2682 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2683 "/usr/local/cuda4.1/cuda/include/math_functions.h" return y1f(a); # 2684 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2686 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float yn(int n, float a) # 2687 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2688 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ynf(n, a); # 2689 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2691 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float erf(float a) # 2692 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2693 "/usr/local/cuda4.1/cuda/include/math_functions.h" return erff(a); # 2694 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2696 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float erfinv(float a) # 2697 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2698 "/usr/local/cuda4.1/cuda/include/math_functions.h" return erfinvf(a); # 2699 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2701 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float erfc(float a) # 2702 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2703 "/usr/local/cuda4.1/cuda/include/math_functions.h" return erfcf(a); # 2704 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2706 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float erfcinv(float a) # 2707 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2708 "/usr/local/cuda4.1/cuda/include/math_functions.h" return erfcinvf(a); # 2709 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2711 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float erfcx(float a) # 2712 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2713 "/usr/local/cuda4.1/cuda/include/math_functions.h" return erfcxf(a); # 2714 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2716 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float lgamma(float a) # 2717 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2718 "/usr/local/cuda4.1/cuda/include/math_functions.h" return lgammaf(a); # 2719 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2721 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float tgamma(float a) # 2722 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2723 "/usr/local/cuda4.1/cuda/include/math_functions.h" return tgammaf(a); # 2724 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2726 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float copysign(float a, float b) # 2727 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2728 "/usr/local/cuda4.1/cuda/include/math_functions.h" return copysignf(a, b); # 2729 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2731 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline double copysign(double a, float b) # 2732 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2733 "/usr/local/cuda4.1/cuda/include/math_functions.h" return copysign(a, (double)b); # 2734 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2736 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float copysign(float a, double b) # 2737 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2738 "/usr/local/cuda4.1/cuda/include/math_functions.h" return copysignf(a, (float)b); # 2739 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2741 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float nextafter(float a, float b) # 2742 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2743 "/usr/local/cuda4.1/cuda/include/math_functions.h" return nextafterf(a, b); # 2744 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2746 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float remainder(float a, float b) # 2747 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2748 "/usr/local/cuda4.1/cuda/include/math_functions.h" return remainderf(a, b); # 2749 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2751 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float remquo(float a, float b, int *quo) # 2752 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2753 "/usr/local/cuda4.1/cuda/include/math_functions.h" return remquof(a, b, quo); # 2754 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2756 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float round(float a) # 2757 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2758 "/usr/local/cuda4.1/cuda/include/math_functions.h" return roundf(a); # 2759 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2761 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline long lround(float a) # 2762 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2763 "/usr/local/cuda4.1/cuda/include/math_functions.h" return lroundf(a); # 2764 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2766 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline long long llround(float a) # 2767 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2768 "/usr/local/cuda4.1/cuda/include/math_functions.h" return llroundf(a); # 2769 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2771 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float trunc(float a) # 2772 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2773 "/usr/local/cuda4.1/cuda/include/math_functions.h" return truncf(a); # 2774 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2776 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float rint(float a) # 2777 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2778 "/usr/local/cuda4.1/cuda/include/math_functions.h" return rintf(a); # 2779 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2781 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline long lrint(float a) # 2782 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2783 "/usr/local/cuda4.1/cuda/include/math_functions.h" return lrintf(a); # 2784 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2786 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline long long llrint(float a) # 2787 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2788 "/usr/local/cuda4.1/cuda/include/math_functions.h" return llrintf(a); # 2789 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2791 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float nearbyint(float a) # 2792 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2793 "/usr/local/cuda4.1/cuda/include/math_functions.h" return nearbyintf(a); # 2794 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2796 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float fdim(float a, float b) # 2797 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2798 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fdimf(a, b); # 2799 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2801 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float fma(float a, float b, float c) # 2802 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2803 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmaf(a, b, c); # 2804 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2806 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float fmax(float a, float b) # 2807 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2808 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmaxf(a, b); # 2809 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2811 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float fmin(float a, float b) # 2812 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2813 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fminf(a, b); # 2814 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2816 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned min(unsigned a, unsigned b) # 2817 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2818 "/usr/local/cuda4.1/cuda/include/math_functions.h" return umin(a, b); # 2819 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2821 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned min(int a, unsigned b) # 2822 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2823 "/usr/local/cuda4.1/cuda/include/math_functions.h" return umin((unsigned)a, b); # 2824 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2826 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned min(unsigned a, int b) # 2827 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2828 "/usr/local/cuda4.1/cuda/include/math_functions.h" return umin(a, (unsigned)b); # 2829 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2831 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline long long min(long long a, long long b) # 2832 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2833 "/usr/local/cuda4.1/cuda/include/math_functions.h" return llmin(a, b); # 2834 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2836 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned long long min(unsigned long long a, unsigned long long b) # 2837 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2838 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ullmin(a, b); # 2839 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2841 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned long long min(long long a, unsigned long long b) # 2842 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2843 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ullmin((unsigned long long)a, b); # 2844 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2846 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned long long min(unsigned long long a, long long b) # 2847 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2848 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ullmin(a, (unsigned long long)b); # 2849 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2851 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float min(float a, float b) # 2852 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2853 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fminf(a, b); # 2854 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2856 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline double min(double a, double b) # 2857 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2858 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmin(a, b); # 2859 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2861 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline double min(float a, double b) # 2862 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2863 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmin((double)a, b); # 2864 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2866 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline double min(double a, float b) # 2867 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2868 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmin(a, (double)b); # 2869 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2871 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned max(unsigned a, unsigned b) # 2872 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2873 "/usr/local/cuda4.1/cuda/include/math_functions.h" return umax(a, b); # 2874 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2876 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned max(int a, unsigned b) # 2877 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2878 "/usr/local/cuda4.1/cuda/include/math_functions.h" return umax((unsigned)a, b); # 2879 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2881 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned max(unsigned a, int b) # 2882 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2883 "/usr/local/cuda4.1/cuda/include/math_functions.h" return umax(a, (unsigned)b); # 2884 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2886 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline long long max(long long a, long long b) # 2887 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2888 "/usr/local/cuda4.1/cuda/include/math_functions.h" return llmax(a, b); # 2889 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2891 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned long long max(unsigned long long a, unsigned long long b) # 2892 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2893 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ullmax(a, b); # 2894 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2896 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned long long max(long long a, unsigned long long b) # 2897 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2898 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ullmax((unsigned long long)a, b); # 2899 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2901 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline unsigned long long max(unsigned long long a, long long b) # 2902 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2903 "/usr/local/cuda4.1/cuda/include/math_functions.h" return ullmax(a, (unsigned long long)b); # 2904 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2906 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline float max(float a, float b) # 2907 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2908 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmaxf(a, b); # 2909 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2911 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline double max(double a, double b) # 2912 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2913 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmax(a, b); # 2914 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2916 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline double max(float a, double b) # 2917 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2918 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmax((double)a, b); # 2919 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 2921 "/usr/local/cuda4.1/cuda/include/math_functions.h" static inline double max(double a, float b) # 2922 "/usr/local/cuda4.1/cuda/include/math_functions.h" { # 2923 "/usr/local/cuda4.1/cuda/include/math_functions.h" return fmax(a, (double)b); # 2924 "/usr/local/cuda4.1/cuda/include/math_functions.h" } # 73 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" template< class T, int dim = 1> # 74 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" struct surface : public surfaceReference { # 76 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" surface() # 77 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" { # 78 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" (channelDesc) = cudaCreateChannelDesc< T> (); # 79 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" } # 81 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" surface(cudaChannelFormatDesc desc) # 82 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" { # 83 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" (channelDesc) = desc; # 84 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" } # 85 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" }; # 87 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" template< int dim> # 88 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" struct surface< void, dim> : public surfaceReference { # 90 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" surface() # 91 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" { # 92 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" (channelDesc) = cudaCreateChannelDesc< void> (); # 93 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" } # 94 "/usr/local/cuda4.1/cuda/include/cuda_surface_types.h" }; # 73 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" template< class T, int texType = 1, cudaTextureReadMode mode = cudaReadModeElementType> # 74 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" struct texture : public textureReference { # 76 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" texture(int norm = 0, cudaTextureFilterMode # 77 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" fMode = cudaFilterModePoint, cudaTextureAddressMode # 78 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" aMode = cudaAddressModeClamp) # 79 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" { # 80 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (normalized) = norm; # 81 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (filterMode) = fMode; # 82 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" ((addressMode)[0]) = aMode; # 83 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" ((addressMode)[1]) = aMode; # 84 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" ((addressMode)[2]) = aMode; # 85 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (channelDesc) = cudaCreateChannelDesc< T> (); # 86 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (sRGB) = 0; # 87 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" } # 89 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" texture(int norm, cudaTextureFilterMode # 90 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" fMode, cudaTextureAddressMode # 91 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" aMode, cudaChannelFormatDesc # 92 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" desc) # 93 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" { # 94 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (normalized) = norm; # 95 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (filterMode) = fMode; # 96 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" ((addressMode)[0]) = aMode; # 97 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" ((addressMode)[1]) = aMode; # 98 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" ((addressMode)[2]) = aMode; # 99 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (channelDesc) = desc; # 100 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" (sRGB) = 0; # 101 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" } # 102 "/usr/local/cuda4.1/cuda/include/cuda_texture_types.h" }; # 1103 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline int mulhi(int a, int b) # 1104 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1106 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1108 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned mulhi(unsigned a, unsigned b) # 1109 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1111 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1113 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned mulhi(int a, unsigned b) # 1114 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1116 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1118 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned mulhi(unsigned a, int b) # 1119 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1121 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1123 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline long long mul64hi(long long a, long long b) # 1124 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1126 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1128 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned long long mul64hi(unsigned long long a, unsigned long long b) # 1129 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1131 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1133 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned long long mul64hi(long long a, unsigned long long b) # 1134 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1136 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1138 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned long long mul64hi(unsigned long long a, long long b) # 1139 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1141 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1143 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline int float_as_int(float a) # 1144 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a; # 1146 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1148 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline float int_as_float(int a) # 1149 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a; # 1151 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1153 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline float saturate(float a) # 1154 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a; # 1156 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1158 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline int mul24(int a, int b) # 1159 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1161 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1163 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned umul24(unsigned a, unsigned b) # 1164 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)b; # 1166 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1168 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline void trap() # 1169 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1; # 1171 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1174 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline void brkpt(int c = 0) # 1175 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)c; # 1177 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1179 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline void syncthreads() # 1180 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1; # 1182 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1184 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline void prof_trigger(int e) # 1185 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)e; # 1202 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1204 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline void threadfence(bool global = true) # 1205 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)global; # 1207 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1209 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline int float2int(float a, cudaRoundMode mode = cudaRoundZero) # 1210 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 1215 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1217 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline unsigned float2uint(float a, cudaRoundMode mode = cudaRoundZero) # 1218 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 1223 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1225 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline float int2float(int a, cudaRoundMode mode = cudaRoundNearest) # 1226 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 1231 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 1233 "/usr/local/cuda4.1/cuda/include/device_functions.h" __attribute__((unused)) static inline float uint2float(unsigned a, cudaRoundMode mode = cudaRoundNearest) # 1234 "/usr/local/cuda4.1/cuda/include/device_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 1239 "/usr/local/cuda4.1/cuda/include/device_functions.h" exit(___);} # 96 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicAdd(int *address, int val) # 97 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 99 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 101 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicAdd(unsigned *address, unsigned val) # 102 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 104 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 106 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicSub(int *address, int val) # 107 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 109 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 111 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicSub(unsigned *address, unsigned val) # 112 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 114 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 116 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicExch(int *address, int val) # 117 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 119 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 121 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicExch(unsigned *address, unsigned val) # 122 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 124 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 126 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline float atomicExch(float *address, float val) # 127 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 129 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 131 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicMin(int *address, int val) # 132 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 134 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 136 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicMin(unsigned *address, unsigned val) # 137 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 139 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 141 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicMax(int *address, int val) # 142 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 144 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 146 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicMax(unsigned *address, unsigned val) # 147 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 149 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 151 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicInc(unsigned *address, unsigned val) # 152 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 154 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 156 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicDec(unsigned *address, unsigned val) # 157 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 159 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 161 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicAnd(int *address, int val) # 162 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 164 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 166 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicAnd(unsigned *address, unsigned val) # 167 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 169 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 171 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicOr(int *address, int val) # 172 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 174 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 176 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicOr(unsigned *address, unsigned val) # 177 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 179 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 181 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicXor(int *address, int val) # 182 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 184 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 186 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicXor(unsigned *address, unsigned val) # 187 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 189 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 191 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicCAS(int *address, int compare, int val) # 192 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)compare;(void)val; # 194 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 196 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicCAS(unsigned *address, unsigned compare, unsigned val) # 197 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)compare;(void)val; # 199 "/usr/local/cuda4.1/cuda/include/sm_11_atomic_functions.h" exit(___);} # 81 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" __attribute__((unused)) static inline unsigned long long atomicAdd(unsigned long long *address, unsigned long long val) # 82 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 84 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" exit(___);} # 86 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" __attribute__((unused)) static inline unsigned long long atomicExch(unsigned long long *address, unsigned long long val) # 87 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 89 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" exit(___);} # 91 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" __attribute__((unused)) static inline unsigned long long atomicCAS(unsigned long long *address, unsigned long long compare, unsigned long long val) # 92 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)compare;(void)val; # 94 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" exit(___);} # 96 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" __attribute__((unused)) static inline bool any(bool cond) # 97 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" {int volatile ___ = 1;(void)cond; # 99 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" exit(___);} # 101 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" __attribute__((unused)) static inline bool all(bool cond) # 102 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" {int volatile ___ = 1;(void)cond; # 104 "/usr/local/cuda4.1/cuda/include/sm_12_atomic_functions.h" exit(___);} # 521 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double fma(double a, double b, double c, cudaRoundMode mode) # 522 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)b;(void)c;(void)mode; # 527 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 529 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double dmul(double a, double b, cudaRoundMode mode = cudaRoundNearest) # 530 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)b;(void)mode; # 535 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 537 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double dadd(double a, double b, cudaRoundMode mode = cudaRoundNearest) # 538 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)b;(void)mode; # 543 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 545 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline int double2int(double a, cudaRoundMode mode = cudaRoundZero) # 546 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 551 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 553 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline unsigned double2uint(double a, cudaRoundMode mode = cudaRoundZero) # 554 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 559 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 561 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline long long double2ll(double a, cudaRoundMode mode = cudaRoundZero) # 562 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 567 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 569 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline unsigned long long double2ull(double a, cudaRoundMode mode = cudaRoundZero) # 570 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 575 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 577 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double ll2double(long long a, cudaRoundMode mode = cudaRoundNearest) # 578 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 583 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 585 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double ull2double(unsigned long long a, cudaRoundMode mode = cudaRoundNearest) # 586 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 591 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 593 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double int2double(int a, cudaRoundMode mode = cudaRoundNearest) # 594 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 596 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 598 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double uint2double(unsigned a, cudaRoundMode mode = cudaRoundNearest) # 599 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 601 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 603 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" __attribute__((unused)) static inline double float2double(float a, cudaRoundMode mode = cudaRoundNearest) # 604 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" {int volatile ___ = 1;(void)a;(void)mode; # 606 "/usr/local/cuda4.1/cuda/include/sm_13_double_functions.h" exit(___);} # 77 "/usr/local/cuda4.1/cuda/include/sm_20_atomic_functions.h" __attribute__((unused)) static inline float atomicAdd(float *address, float val) # 78 "/usr/local/cuda4.1/cuda/include/sm_20_atomic_functions.h" {int volatile ___ = 1;(void)address;(void)val; # 80 "/usr/local/cuda4.1/cuda/include/sm_20_atomic_functions.h" exit(___);} # 239 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" __attribute__((unused)) static inline unsigned ballot(bool pred) # 240 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" {int volatile ___ = 1;(void)pred; # 242 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" exit(___);} # 244 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" __attribute__((unused)) static inline int syncthreads_count(bool pred) # 245 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" {int volatile ___ = 1;(void)pred; # 247 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" exit(___);} # 249 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" __attribute__((unused)) static inline bool syncthreads_and(bool pred) # 250 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" {int volatile ___ = 1;(void)pred; # 252 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" exit(___);} # 254 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" __attribute__((unused)) static inline bool syncthreads_or(bool pred) # 255 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" {int volatile ___ = 1;(void)pred; # 257 "/usr/local/cuda4.1/cuda/include/sm_20_intrinsics.h" exit(___);} # 99 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 100 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1Dread(T *res, surface< void, 1> surf, int x, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 101 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)s;(void)mode; # 108 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 110 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 111 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 112 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 118 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 120 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 121 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1Dread(T *res, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 122 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)mode; # 124 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 127 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 128 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 130 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 133 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline signed char surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 134 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 136 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 139 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 140 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 142 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 145 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 146 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 148 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 151 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 152 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 154 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 157 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 158 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 162 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 165 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 166 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 168 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 171 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 172 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 176 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 179 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 180 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 182 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 185 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 186 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 188 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 191 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 192 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 194 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 197 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 198 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 200 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 203 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 204 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 206 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 209 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 210 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 214 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 217 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 218 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 220 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 223 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 224 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 228 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 231 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 232 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 234 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 237 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 238 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 240 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 243 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 244 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 246 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 249 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 250 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 252 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 255 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 256 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 258 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 261 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 262 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 266 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 269 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 270 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 272 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 275 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 276 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 280 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 283 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 284 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 286 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 289 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline long long surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 290 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 292 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 295 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 296 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 298 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 301 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 302 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 304 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 307 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 308 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 310 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 313 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 314 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 318 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 321 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 322 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 324 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 387 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 388 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 390 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 393 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 394 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 396 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 399 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 400 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 404 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 407 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 408 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)mode; # 412 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 447 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 448 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2Dread(T *res, surface< void, 2> surf, int x, int y, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 449 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)s;(void)mode; # 456 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 458 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 459 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 460 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 466 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 468 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 469 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2Dread(T *res, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 470 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)mode; # 472 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 475 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 476 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 478 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 481 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline signed char surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 482 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 484 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 487 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 488 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 490 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 493 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 494 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 496 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 499 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 500 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 502 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 505 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 506 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 510 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 513 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 514 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 516 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 519 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 520 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 524 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 527 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 528 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 530 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 533 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 534 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 536 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 539 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 540 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 542 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 545 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 546 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 548 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 551 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 552 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 554 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 557 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 558 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 562 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 565 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 566 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 568 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 571 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 572 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 576 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 579 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 580 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 582 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 585 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 586 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 588 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 591 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 592 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 594 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 597 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 598 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 600 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 603 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 604 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 606 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 609 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 610 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 614 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 617 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 618 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 620 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 623 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 624 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 628 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 631 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 632 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 634 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 637 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline long long surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 638 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 640 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 643 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 644 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 646 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 649 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 650 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 652 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 655 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 656 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 658 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 661 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 662 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 666 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 669 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 670 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 672 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 735 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 736 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 738 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 741 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 742 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 744 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 747 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 748 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 752 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 755 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 756 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)mode; # 760 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 795 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 796 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf3Dread(T *res, surface< void, 3> surf, int x, int y, int z, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 797 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)z;(void)s;(void)mode; # 804 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 806 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 807 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 808 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 814 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 816 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 817 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf3Dread(T *res, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 818 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 820 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 823 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 824 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 826 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 829 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline signed char surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 830 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 832 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 835 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 836 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 838 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 841 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 842 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 844 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 847 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 848 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 850 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 853 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 854 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 858 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 861 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 862 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 864 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 867 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char4 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 868 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 872 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 875 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 876 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 878 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 881 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 882 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 884 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 887 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 888 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 890 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 893 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 894 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 896 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 899 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 900 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 902 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 905 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 906 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 910 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 913 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 914 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 916 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 919 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short4 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 920 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 924 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 927 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 928 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 930 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 933 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 934 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 936 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 939 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 940 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 942 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 945 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 946 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 948 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 951 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 952 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 954 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 957 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 958 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 962 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 965 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 966 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 968 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 971 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int4 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 972 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 976 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 979 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 980 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 982 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 985 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline long long surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 986 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 988 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 991 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 992 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 994 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 997 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 998 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1000 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1003 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 1004 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1006 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1009 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 1010 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1014 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1017 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 1018 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1020 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1083 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 1084 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1086 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1089 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float1 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 1090 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1092 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1095 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float2 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 1096 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1100 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1103 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float4 surf3Dread(surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode) # 1104 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 1108 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1143 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1144 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1DLayeredread(T *res, surface< void, 241> surf, int x, int layer, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1145 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)layer;(void)s;(void)mode; # 1152 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1154 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 1155 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1156 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1162 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1164 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1165 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1DLayeredread(T *res, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1166 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)layer;(void)mode; # 1168 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1171 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1172 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1174 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1177 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline signed char surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1178 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1180 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1183 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1184 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1186 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1189 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1190 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1192 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1195 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1196 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1198 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1201 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1202 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1206 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1209 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1210 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1212 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1215 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char4 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1216 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1220 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1223 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1224 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1226 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1229 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1230 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1232 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1235 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1236 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1238 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1241 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1242 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1244 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1247 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1248 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1250 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1253 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1254 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1258 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1261 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1262 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1264 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1267 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short4 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1268 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1272 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1275 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1276 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1278 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1281 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1282 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1284 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1287 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1288 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1290 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1293 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1294 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1296 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1299 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1300 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1302 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1305 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1306 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1310 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1313 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1314 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1316 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1319 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int4 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1320 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1324 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1327 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1328 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1330 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1333 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline long long surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1334 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1336 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1339 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1340 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1342 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1345 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1346 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1348 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1351 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1352 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1354 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1357 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1358 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1362 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1365 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1366 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1368 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1431 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1432 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1434 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1437 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float1 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1438 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1440 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1443 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float2 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1444 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1448 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1451 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float4 surf1DLayeredread(surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode) # 1452 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)layer;(void)mode; # 1456 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1491 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1492 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2DLayeredread(T *res, surface< void, 242> surf, int x, int y, int layer, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1493 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)layer;(void)s;(void)mode; # 1500 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1502 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 1503 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1504 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1510 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1512 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1513 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2DLayeredread(T *res, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1514 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1516 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1519 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1520 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1522 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1525 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline signed char surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1526 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1528 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1531 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1532 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1534 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1537 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1538 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1540 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1543 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1544 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1546 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1549 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1550 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1554 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1557 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1558 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1560 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1563 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char4 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1564 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1568 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1571 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1572 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1574 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1577 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1578 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1580 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1583 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1584 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1586 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1589 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1590 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1592 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1595 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1596 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1598 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1601 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1602 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1606 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1609 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1610 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1612 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1615 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short4 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1616 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1620 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1623 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1624 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1626 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1629 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1630 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1632 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1635 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1636 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1638 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1641 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1642 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1644 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1647 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1648 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1650 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1653 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1654 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1658 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1661 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1662 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1664 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1667 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int4 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1668 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1672 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1675 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1676 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1678 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1681 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline long long surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1682 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1684 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1687 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1688 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1690 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1693 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1694 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1696 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1699 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1700 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1702 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1705 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1706 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1710 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1713 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1714 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1716 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1779 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1780 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1782 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1785 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float1 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1786 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1788 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1791 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float2 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1792 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1796 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1799 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float4 surf2DLayeredread(surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode) # 1800 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 1804 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1839 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1840 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapread(T *res, surface< void, 12> surf, int x, int y, int face, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1841 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)face;(void)s;(void)mode; # 1848 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1850 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 1851 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1852 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1858 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1860 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1861 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapread(T *res, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1862 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1864 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1867 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1868 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1870 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1873 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline signed char surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1874 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1876 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1879 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1880 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1882 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1885 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1886 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1888 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1891 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1892 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1894 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1897 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1898 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1902 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1905 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1906 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1908 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1911 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char4 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1912 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1916 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1919 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1920 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1922 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1925 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1926 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1928 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1931 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1932 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1934 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1937 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1938 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1940 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1943 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1944 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1946 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1949 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1950 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1954 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1957 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1958 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1960 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1963 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short4 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1964 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1968 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1971 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1972 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1974 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1977 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1978 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1980 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1983 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1984 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1986 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1989 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1990 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1992 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 1995 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 1996 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 1998 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2001 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2002 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2006 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2009 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2010 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2012 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2015 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int4 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2016 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2020 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2023 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2024 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2026 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2029 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline long long surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2030 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2032 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2035 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2036 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2038 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2041 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2042 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2044 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2047 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2048 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2050 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2053 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2054 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2058 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2061 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2062 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2064 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2127 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2128 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2130 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2133 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float1 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2134 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2136 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2139 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float2 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2140 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2144 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2147 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float4 surfCubemapread(surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode) # 2148 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 2152 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2188 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 2189 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapLayeredread(T *res, surface< void, 252> surf, int x, int y, int layerFace, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2190 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)layerFace;(void)s;(void)mode; # 2197 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2199 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 2200 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2201 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2207 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2209 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 2210 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapLayeredread(T *res, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2211 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)res;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2213 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2216 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2217 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2219 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2222 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline signed char surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2223 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2225 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2228 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2229 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2231 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2234 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2235 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2237 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2240 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2241 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2243 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2246 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2247 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2251 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2254 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2255 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2257 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2260 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline char4 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2261 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2265 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2268 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2269 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2271 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2274 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2275 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2277 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2280 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2281 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2283 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2286 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2287 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2289 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2292 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2293 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2295 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2298 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2299 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2303 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2306 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2307 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2309 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2312 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline short4 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2313 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2317 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2320 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2321 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2323 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2326 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2327 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2329 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2332 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2333 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2335 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2338 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2339 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2341 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2344 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2345 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2347 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2350 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2351 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2355 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2358 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2359 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2361 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2364 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline int4 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2365 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2369 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2372 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2373 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2375 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2378 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline long long surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2379 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2381 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2384 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2385 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2387 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2390 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2391 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2393 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2396 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2397 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2399 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2402 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2403 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2407 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2410 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2411 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2413 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2476 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2477 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2479 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2482 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float1 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2483 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2485 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2488 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float2 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2489 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2493 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2496 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template<> __attribute__((unused)) inline float4 surfCubemapLayeredread(surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode) # 2497 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 2501 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2537 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 2538 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1Dwrite(T val, surface< void, 1> surf, int x, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2539 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)s;(void)mode; # 2557 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2559 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 2560 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1Dwrite(T val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2561 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2563 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2566 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2567 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2569 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2571 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(signed char val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2572 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2574 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2576 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned char val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2577 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2579 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2581 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2582 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2584 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2586 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uchar1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2587 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2589 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2591 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2592 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2594 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2596 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uchar2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2597 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2599 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2601 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2602 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2604 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2606 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uchar4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2607 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2609 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2611 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2612 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2614 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2616 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned short val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2617 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2619 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2621 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2622 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2624 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2626 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ushort1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2627 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2629 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2631 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2632 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2634 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2636 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ushort2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2637 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2639 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2641 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2642 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2644 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2646 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ushort4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2647 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2649 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2651 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2652 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2654 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2656 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2657 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2659 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2661 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2662 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2664 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2666 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uint1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2667 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2669 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2671 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2672 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2674 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2676 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uint2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2677 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2679 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2681 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2682 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2684 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2686 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uint4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2687 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2689 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2691 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(long long val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2692 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2694 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2696 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned long long val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2697 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2699 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2701 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(longlong1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2702 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2704 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2706 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ulonglong1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2707 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2709 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2711 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(longlong2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2712 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2714 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2716 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ulonglong2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2717 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2719 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2765 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2766 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2768 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2770 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2771 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2773 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2775 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2776 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2778 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2780 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2781 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)mode; # 2783 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2819 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 2820 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2Dwrite(T val, surface< void, 2> surf, int x, int y, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2821 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)s;(void)mode; # 2839 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2841 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 2842 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2Dwrite(T val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2843 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2845 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2848 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2849 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2851 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2853 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(signed char val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2854 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2856 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2858 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned char val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2859 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2861 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2863 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2864 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2866 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2868 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uchar1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2869 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2871 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2873 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2874 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2876 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2878 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uchar2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2879 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2881 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2883 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2884 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2886 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2888 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uchar4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2889 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2891 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2893 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2894 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2896 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2898 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned short val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2899 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2901 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2903 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2904 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2906 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2908 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ushort1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2909 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2911 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2913 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2914 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2916 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2918 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ushort2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2919 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2921 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2923 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2924 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2926 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2928 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ushort4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2929 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2931 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2933 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2934 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2936 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2938 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2939 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2941 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2943 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2944 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2946 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2948 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uint1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2949 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2951 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2953 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2954 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2956 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2958 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uint2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2959 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2961 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2963 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2964 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2966 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2968 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uint4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2969 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2971 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2973 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(long long val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2974 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2976 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2978 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned long long val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2979 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2981 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2983 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(longlong1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2984 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2986 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2988 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ulonglong1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2989 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2991 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2993 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(longlong2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2994 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 2996 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 2998 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ulonglong2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 2999 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 3001 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3047 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3048 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 3050 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3052 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3053 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 3055 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3057 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3058 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 3060 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3062 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3063 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)mode; # 3065 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3101 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3102 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf3Dwrite(T val, surface< void, 3> surf, int x, int y, int z, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3103 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)s;(void)mode; # 3121 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3123 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3124 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf3Dwrite(T val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3125 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3127 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3130 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(char val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3131 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3133 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3135 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(signed char val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3136 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3138 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3140 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(unsigned char val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3141 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3143 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3145 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(char1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3146 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3148 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3150 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(uchar1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3151 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3153 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3155 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(char2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3156 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3158 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3160 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(uchar2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3161 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3163 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3165 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(char4 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3166 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3168 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3170 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(uchar4 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3171 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3173 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3175 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(short val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3176 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3178 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3180 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(unsigned short val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3181 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3183 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3185 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(short1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3186 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3188 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3190 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(ushort1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3191 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3193 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3195 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(short2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3196 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3198 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3200 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(ushort2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3201 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3203 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3205 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(short4 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3206 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3208 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3210 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(ushort4 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3211 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3213 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3215 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(int val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3216 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3218 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3220 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(unsigned val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3221 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3223 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3225 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(int1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3226 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3228 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3230 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(uint1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3231 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3233 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3235 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(int2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3236 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3238 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3240 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(uint2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3241 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3243 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3245 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(int4 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3246 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3248 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3250 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(uint4 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3251 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3253 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3255 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(long long val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3256 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3258 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3260 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(unsigned long long val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3261 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3263 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3265 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(longlong1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3266 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3268 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3270 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(ulonglong1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3271 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3273 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3275 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(longlong2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3276 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3278 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3280 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(ulonglong2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3281 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3283 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3329 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(float val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3330 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3332 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3334 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(float1 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3335 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3337 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3339 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(float2 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3340 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3342 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3344 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf3Dwrite(float4 val, surface< void, 3> surf, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3345 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)z;(void)mode; # 3347 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3383 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3384 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1DLayeredwrite(T val, surface< void, 241> surf, int x, int layer, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3385 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)s;(void)mode; # 3403 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3405 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3406 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf1DLayeredwrite(T val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3407 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3409 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3412 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(char val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3413 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3415 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3417 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(signed char val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3418 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3420 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3422 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(unsigned char val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3423 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3425 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3427 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(char1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3428 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3430 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3432 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(uchar1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3433 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3435 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3437 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(char2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3438 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3440 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3442 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(uchar2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3443 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3445 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3447 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(char4 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3448 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3450 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3452 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(uchar4 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3453 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3455 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3457 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(short val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3458 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3460 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3462 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(unsigned short val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3463 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3465 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3467 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(short1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3468 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3470 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3472 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(ushort1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3473 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3475 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3477 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(short2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3478 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3480 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3482 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(ushort2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3483 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3485 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3487 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(short4 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3488 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3490 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3492 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(ushort4 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3493 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3495 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3497 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(int val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3498 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3500 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3502 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(unsigned val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3503 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3505 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3507 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(int1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3508 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3510 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3512 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(uint1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3513 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3515 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3517 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(int2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3518 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3520 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3522 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(uint2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3523 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3525 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3527 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(int4 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3528 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3530 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3532 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(uint4 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3533 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3535 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3537 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(long long val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3538 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3540 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3542 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(unsigned long long val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3543 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3545 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3547 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(longlong1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3548 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3550 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3552 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(ulonglong1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3553 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3555 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3557 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(longlong2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3558 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3560 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3562 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(ulonglong2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3563 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3565 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3611 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(float val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3612 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3614 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3616 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(float1 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3617 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3619 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3621 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(float2 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3622 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3624 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3626 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf1DLayeredwrite(float4 val, surface< void, 241> surf, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3627 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)layer;(void)mode; # 3629 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3665 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3666 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2DLayeredwrite(T val, surface< void, 242> surf, int x, int y, int layer, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3667 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)s;(void)mode; # 3685 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3687 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3688 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surf2DLayeredwrite(T val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3689 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3691 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3694 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(char val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3695 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3697 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3699 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(signed char val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3700 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3702 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3704 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(unsigned char val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3705 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3707 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3709 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(char1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3710 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3712 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3714 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(uchar1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3715 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3717 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3719 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(char2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3720 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3722 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3724 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(uchar2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3725 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3727 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3729 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(char4 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3730 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3732 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3734 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(uchar4 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3735 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3737 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3739 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(short val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3740 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3742 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3744 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(unsigned short val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3745 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3747 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3749 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(short1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3750 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3752 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3754 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(ushort1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3755 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3757 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3759 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(short2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3760 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3762 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3764 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(ushort2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3765 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3767 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3769 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(short4 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3770 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3772 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3774 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(ushort4 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3775 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3777 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3779 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(int val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3780 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3782 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3784 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(unsigned val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3785 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3787 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3789 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(int1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3790 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3792 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3794 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(uint1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3795 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3797 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3799 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(int2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3800 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3802 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3804 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(uint2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3805 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3807 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3809 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(int4 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3810 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3812 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3814 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(uint4 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3815 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3817 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3819 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(long long val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3820 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3822 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3824 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(unsigned long long val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3825 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3827 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3829 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(longlong1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3830 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3832 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3834 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(ulonglong1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3835 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3837 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3839 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(longlong2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3840 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3842 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3844 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(ulonglong2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3845 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3847 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3893 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(float val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3894 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3896 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3898 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(float1 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3899 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3901 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3903 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(float2 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3904 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3906 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3908 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surf2DLayeredwrite(float4 val, surface< void, 242> surf, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3909 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layer;(void)mode; # 3911 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3947 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3948 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapwrite(T val, surface< void, 12> surf, int x, int y, int face, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3949 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)s;(void)mode; # 3967 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3969 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 3970 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapwrite(T val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3971 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 3973 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3976 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(char val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3977 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 3979 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3981 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(signed char val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3982 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 3984 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3986 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(unsigned char val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3987 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 3989 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3991 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(char1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3992 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 3994 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 3996 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(uchar1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 3997 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 3999 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4001 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(char2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4002 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4004 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4006 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(uchar2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4007 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4009 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4011 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(char4 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4012 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4014 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4016 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(uchar4 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4017 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4019 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4021 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(short val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4022 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4024 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4026 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(unsigned short val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4027 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4029 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4031 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(short1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4032 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4034 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4036 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(ushort1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4037 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4039 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4041 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(short2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4042 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4044 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4046 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(ushort2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4047 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4049 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4051 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(short4 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4052 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4054 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4056 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(ushort4 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4057 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4059 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4061 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(int val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4062 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4064 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4066 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(unsigned val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4067 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4069 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4071 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(int1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4072 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4074 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4076 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(uint1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4077 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4079 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4081 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(int2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4082 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4084 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4086 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(uint2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4087 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4089 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4091 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(int4 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4092 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4094 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4096 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(uint4 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4097 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4099 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4101 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(long long val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4102 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4104 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4106 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(unsigned long long val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4107 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4109 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4111 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(longlong1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4112 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4114 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4116 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(ulonglong1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4117 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4119 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4121 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(longlong2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4122 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4124 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4126 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(ulonglong2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4127 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4129 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4175 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(float val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4176 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4178 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4180 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(float1 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4181 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4183 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4185 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(float2 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4186 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4188 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4190 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapwrite(float4 val, surface< void, 12> surf, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4191 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)face;(void)mode; # 4193 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4229 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 4230 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapLayeredwrite(T val, surface< void, 252> surf, int x, int y, int layerFace, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4231 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)s;(void)mode; # 4249 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4251 "/usr/local/cuda4.1/cuda/include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 4252 "/usr/local/cuda4.1/cuda/include/surface_functions.h" surfCubemapLayeredwrite(T val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4253 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4255 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4258 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(char val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4259 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4261 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4263 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(signed char val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4264 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4266 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4268 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(unsigned char val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4269 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4271 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4273 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(char1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4274 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4276 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4278 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(uchar1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4279 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4281 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4283 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(char2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4284 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4286 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4288 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(uchar2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4289 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4291 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4293 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(char4 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4294 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4296 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4298 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(uchar4 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4299 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4301 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4303 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(short val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4304 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4306 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4308 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(unsigned short val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4309 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4311 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4313 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(short1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4314 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4316 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4318 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(ushort1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4319 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4321 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4323 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(short2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4324 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4326 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4328 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(ushort2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4329 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4331 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4333 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(short4 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4334 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4336 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4338 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(ushort4 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4339 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4341 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4343 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(int val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4344 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4346 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4348 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(unsigned val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4349 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4351 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4353 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(int1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4354 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4356 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4358 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(uint1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4359 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4361 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4363 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(int2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4364 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4366 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4368 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(uint2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4369 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4371 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4373 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(int4 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4374 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4376 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4378 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(uint4 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4379 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4381 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4383 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(long long val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4384 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4386 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4388 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(unsigned long long val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4389 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4391 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4393 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(longlong1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4394 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4396 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4398 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(ulonglong1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4399 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4401 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4403 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(longlong2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4404 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4406 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4408 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(ulonglong2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4409 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4411 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4457 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(float val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4458 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4460 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4462 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(float1 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4463 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4465 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4467 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(float2 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4468 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4470 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 4472 "/usr/local/cuda4.1/cuda/include/surface_functions.h" __attribute__((unused)) static inline void surfCubemapLayeredwrite(float4 val, surface< void, 252> surf, int x, int y, int layerFace, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 4473 "/usr/local/cuda4.1/cuda/include/surface_functions.h" {int volatile ___ = 1;(void)val;(void)surf;(void)x;(void)y;(void)layerFace;(void)mode; # 4475 "/usr/local/cuda4.1/cuda/include/surface_functions.h" exit(___);} # 96 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex1Dfetch(texture< char, 1, cudaReadModeElementType> t, int x) # 97 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 105 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 107 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex1Dfetch(texture< signed char, 1, cudaReadModeElementType> t, int x) # 108 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 112 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 114 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex1Dfetch(texture< unsigned char, 1, cudaReadModeElementType> t, int x) # 115 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 119 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 121 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex1Dfetch(texture< char1, 1, cudaReadModeElementType> t, int x) # 122 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 126 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 128 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex1Dfetch(texture< uchar1, 1, cudaReadModeElementType> t, int x) # 129 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 133 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 135 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex1Dfetch(texture< char2, 1, cudaReadModeElementType> t, int x) # 136 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 140 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 142 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex1Dfetch(texture< uchar2, 1, cudaReadModeElementType> t, int x) # 143 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 147 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 149 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex1Dfetch(texture< char4, 1, cudaReadModeElementType> t, int x) # 150 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 154 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 156 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex1Dfetch(texture< uchar4, 1, cudaReadModeElementType> t, int x) # 157 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 161 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 169 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex1Dfetch(texture< short, 1, cudaReadModeElementType> t, int x) # 170 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 174 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 176 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex1Dfetch(texture< unsigned short, 1, cudaReadModeElementType> t, int x) # 177 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 181 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 183 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex1Dfetch(texture< short1, 1, cudaReadModeElementType> t, int x) # 184 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 188 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 190 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex1Dfetch(texture< ushort1, 1, cudaReadModeElementType> t, int x) # 191 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 195 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 197 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex1Dfetch(texture< short2, 1, cudaReadModeElementType> t, int x) # 198 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 202 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 204 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex1Dfetch(texture< ushort2, 1, cudaReadModeElementType> t, int x) # 205 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 209 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 211 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex1Dfetch(texture< short4, 1, cudaReadModeElementType> t, int x) # 212 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 216 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 218 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex1Dfetch(texture< ushort4, 1, cudaReadModeElementType> t, int x) # 219 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 223 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 231 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex1Dfetch(texture< int, 1, cudaReadModeElementType> t, int x) # 232 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 236 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 238 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex1Dfetch(texture< unsigned, 1, cudaReadModeElementType> t, int x) # 239 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 243 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 245 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex1Dfetch(texture< int1, 1, cudaReadModeElementType> t, int x) # 246 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 250 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 252 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex1Dfetch(texture< uint1, 1, cudaReadModeElementType> t, int x) # 253 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 257 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 259 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex1Dfetch(texture< int2, 1, cudaReadModeElementType> t, int x) # 260 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 264 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 266 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex1Dfetch(texture< uint2, 1, cudaReadModeElementType> t, int x) # 267 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 271 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 273 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex1Dfetch(texture< int4, 1, cudaReadModeElementType> t, int x) # 274 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 278 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 280 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex1Dfetch(texture< uint4, 1, cudaReadModeElementType> t, int x) # 281 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 285 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 359 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< float, 1, cudaReadModeElementType> t, int x) # 360 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 364 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 366 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< float1, 1, cudaReadModeElementType> t, int x) # 367 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 371 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 373 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< float2, 1, cudaReadModeElementType> t, int x) # 374 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 378 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 380 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< float4, 1, cudaReadModeElementType> t, int x) # 381 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 385 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 393 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< char, 1, cudaReadModeNormalizedFloat> t, int x) # 394 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 403 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 405 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< signed char, 1, cudaReadModeNormalizedFloat> t, int x) # 406 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 411 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 413 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< unsigned char, 1, cudaReadModeNormalizedFloat> t, int x) # 414 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 419 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 421 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< char1, 1, cudaReadModeNormalizedFloat> t, int x) # 422 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 427 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 429 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< uchar1, 1, cudaReadModeNormalizedFloat> t, int x) # 430 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 435 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 437 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< char2, 1, cudaReadModeNormalizedFloat> t, int x) # 438 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 443 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 445 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< uchar2, 1, cudaReadModeNormalizedFloat> t, int x) # 446 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 451 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 453 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< char4, 1, cudaReadModeNormalizedFloat> t, int x) # 454 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 459 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 461 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< uchar4, 1, cudaReadModeNormalizedFloat> t, int x) # 462 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 467 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 475 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< short, 1, cudaReadModeNormalizedFloat> t, int x) # 476 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 481 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 483 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< unsigned short, 1, cudaReadModeNormalizedFloat> t, int x) # 484 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 489 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 491 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< short1, 1, cudaReadModeNormalizedFloat> t, int x) # 492 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 497 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 499 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< ushort1, 1, cudaReadModeNormalizedFloat> t, int x) # 500 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 505 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 507 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< short2, 1, cudaReadModeNormalizedFloat> t, int x) # 508 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 513 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 515 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< ushort2, 1, cudaReadModeNormalizedFloat> t, int x) # 516 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 521 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 523 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< short4, 1, cudaReadModeNormalizedFloat> t, int x) # 524 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 529 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 531 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< ushort4, 1, cudaReadModeNormalizedFloat> t, int x) # 532 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 537 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 545 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex1D(texture< char, 1, cudaReadModeElementType> t, float x) # 546 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 554 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 556 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex1D(texture< signed char, 1, cudaReadModeElementType> t, float x) # 557 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 561 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 563 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex1D(texture< unsigned char, 1, cudaReadModeElementType> t, float x) # 564 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 568 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 570 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex1D(texture< char1, 1, cudaReadModeElementType> t, float x) # 571 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 575 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 577 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex1D(texture< uchar1, 1, cudaReadModeElementType> t, float x) # 578 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 582 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 584 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex1D(texture< char2, 1, cudaReadModeElementType> t, float x) # 585 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 589 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 591 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex1D(texture< uchar2, 1, cudaReadModeElementType> t, float x) # 592 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 596 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 598 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex1D(texture< char4, 1, cudaReadModeElementType> t, float x) # 599 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 603 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 605 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex1D(texture< uchar4, 1, cudaReadModeElementType> t, float x) # 606 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 610 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 618 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex1D(texture< short, 1, cudaReadModeElementType> t, float x) # 619 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 623 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 625 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex1D(texture< unsigned short, 1, cudaReadModeElementType> t, float x) # 626 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 630 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 632 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex1D(texture< short1, 1, cudaReadModeElementType> t, float x) # 633 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 637 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 639 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex1D(texture< ushort1, 1, cudaReadModeElementType> t, float x) # 640 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 644 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 646 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex1D(texture< short2, 1, cudaReadModeElementType> t, float x) # 647 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 651 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 653 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex1D(texture< ushort2, 1, cudaReadModeElementType> t, float x) # 654 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 658 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 660 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex1D(texture< short4, 1, cudaReadModeElementType> t, float x) # 661 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 665 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 667 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex1D(texture< ushort4, 1, cudaReadModeElementType> t, float x) # 668 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 672 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 680 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex1D(texture< int, 1, cudaReadModeElementType> t, float x) # 681 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 685 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 687 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex1D(texture< unsigned, 1, cudaReadModeElementType> t, float x) # 688 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 692 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 694 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex1D(texture< int1, 1, cudaReadModeElementType> t, float x) # 695 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 699 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 701 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex1D(texture< uint1, 1, cudaReadModeElementType> t, float x) # 702 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 706 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 708 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex1D(texture< int2, 1, cudaReadModeElementType> t, float x) # 709 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 713 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 715 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex1D(texture< uint2, 1, cudaReadModeElementType> t, float x) # 716 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 720 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 722 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex1D(texture< int4, 1, cudaReadModeElementType> t, float x) # 723 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 727 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 729 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex1D(texture< uint4, 1, cudaReadModeElementType> t, float x) # 730 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 734 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 814 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< float, 1, cudaReadModeElementType> t, float x) # 815 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 819 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 821 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< float1, 1, cudaReadModeElementType> t, float x) # 822 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 826 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 828 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< float2, 1, cudaReadModeElementType> t, float x) # 829 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 833 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 835 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< float4, 1, cudaReadModeElementType> t, float x) # 836 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 840 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 848 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< char, 1, cudaReadModeNormalizedFloat> t, float x) # 849 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 858 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 860 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< signed char, 1, cudaReadModeNormalizedFloat> t, float x) # 861 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 866 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 868 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< unsigned char, 1, cudaReadModeNormalizedFloat> t, float x) # 869 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 874 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 876 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< char1, 1, cudaReadModeNormalizedFloat> t, float x) # 877 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 882 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 884 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< uchar1, 1, cudaReadModeNormalizedFloat> t, float x) # 885 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 890 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 892 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< char2, 1, cudaReadModeNormalizedFloat> t, float x) # 893 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 898 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 900 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< uchar2, 1, cudaReadModeNormalizedFloat> t, float x) # 901 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 906 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 908 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< char4, 1, cudaReadModeNormalizedFloat> t, float x) # 909 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 914 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 916 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< uchar4, 1, cudaReadModeNormalizedFloat> t, float x) # 917 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 922 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 930 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< short, 1, cudaReadModeNormalizedFloat> t, float x) # 931 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 936 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 938 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< unsigned short, 1, cudaReadModeNormalizedFloat> t, float x) # 939 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 944 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 946 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< short1, 1, cudaReadModeNormalizedFloat> t, float x) # 947 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 952 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 954 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< ushort1, 1, cudaReadModeNormalizedFloat> t, float x) # 955 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 960 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 962 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< short2, 1, cudaReadModeNormalizedFloat> t, float x) # 963 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 968 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 970 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< ushort2, 1, cudaReadModeNormalizedFloat> t, float x) # 971 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 976 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 978 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< short4, 1, cudaReadModeNormalizedFloat> t, float x) # 979 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 984 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 986 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< ushort4, 1, cudaReadModeNormalizedFloat> t, float x) # 987 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x; # 992 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1000 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex2D(texture< char, 2, cudaReadModeElementType> t, float x, float y) # 1001 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1009 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1011 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex2D(texture< signed char, 2, cudaReadModeElementType> t, float x, float y) # 1012 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1016 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1018 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex2D(texture< unsigned char, 2, cudaReadModeElementType> t, float x, float y) # 1019 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1023 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1025 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex2D(texture< char1, 2, cudaReadModeElementType> t, float x, float y) # 1026 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1030 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1032 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex2D(texture< uchar1, 2, cudaReadModeElementType> t, float x, float y) # 1033 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1037 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1039 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex2D(texture< char2, 2, cudaReadModeElementType> t, float x, float y) # 1040 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1044 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1046 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex2D(texture< uchar2, 2, cudaReadModeElementType> t, float x, float y) # 1047 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1051 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1053 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2D(texture< char4, 2, cudaReadModeElementType> t, float x, float y) # 1054 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1058 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1060 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2D(texture< uchar4, 2, cudaReadModeElementType> t, float x, float y) # 1061 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1065 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1073 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex2D(texture< short, 2, cudaReadModeElementType> t, float x, float y) # 1074 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1078 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1080 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex2D(texture< unsigned short, 2, cudaReadModeElementType> t, float x, float y) # 1081 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1085 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1087 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex2D(texture< short1, 2, cudaReadModeElementType> t, float x, float y) # 1088 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1092 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1094 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex2D(texture< ushort1, 2, cudaReadModeElementType> t, float x, float y) # 1095 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1099 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1101 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex2D(texture< short2, 2, cudaReadModeElementType> t, float x, float y) # 1102 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1106 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1108 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex2D(texture< ushort2, 2, cudaReadModeElementType> t, float x, float y) # 1109 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1113 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1115 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2D(texture< short4, 2, cudaReadModeElementType> t, float x, float y) # 1116 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1120 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1122 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2D(texture< ushort4, 2, cudaReadModeElementType> t, float x, float y) # 1123 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1127 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1135 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex2D(texture< int, 2, cudaReadModeElementType> t, float x, float y) # 1136 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1140 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1142 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex2D(texture< unsigned, 2, cudaReadModeElementType> t, float x, float y) # 1143 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1147 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1149 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex2D(texture< int1, 2, cudaReadModeElementType> t, float x, float y) # 1150 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1154 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1156 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex2D(texture< uint1, 2, cudaReadModeElementType> t, float x, float y) # 1157 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1161 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1163 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex2D(texture< int2, 2, cudaReadModeElementType> t, float x, float y) # 1164 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1168 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1170 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex2D(texture< uint2, 2, cudaReadModeElementType> t, float x, float y) # 1171 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1175 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1177 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2D(texture< int4, 2, cudaReadModeElementType> t, float x, float y) # 1178 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1182 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1184 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2D(texture< uint4, 2, cudaReadModeElementType> t, float x, float y) # 1185 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1189 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1263 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< float, 2, cudaReadModeElementType> t, float x, float y) # 1264 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1268 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1270 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< float1, 2, cudaReadModeElementType> t, float x, float y) # 1271 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1275 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1277 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< float2, 2, cudaReadModeElementType> t, float x, float y) # 1278 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1282 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1284 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< float4, 2, cudaReadModeElementType> t, float x, float y) # 1285 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1289 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1297 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< char, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1298 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1307 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1309 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< signed char, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1310 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1315 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1317 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< unsigned char, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1318 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1323 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1325 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< char1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1326 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1331 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1333 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< uchar1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1334 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1339 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1341 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< char2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1342 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1347 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1349 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< uchar2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1350 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1355 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1357 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< char4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1358 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1363 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1365 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< uchar4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1366 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1371 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1379 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< short, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1380 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1385 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1387 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< unsigned short, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1388 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1393 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1395 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< short1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1396 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1401 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1403 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< ushort1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1404 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1409 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1411 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< short2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1412 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1417 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1419 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< ushort2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1420 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1425 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1427 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< short4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1428 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1433 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1435 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< ushort4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1436 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y; # 1441 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1449 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex1DLayered(texture< char, 241, cudaReadModeElementType> t, float x, int layer) # 1450 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1458 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1460 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex1DLayered(texture< signed char, 241, cudaReadModeElementType> t, float x, int layer) # 1461 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1465 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1467 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex1DLayered(texture< unsigned char, 241, cudaReadModeElementType> t, float x, int layer) # 1468 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1472 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1474 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex1DLayered(texture< char1, 241, cudaReadModeElementType> t, float x, int layer) # 1475 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1479 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1481 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex1DLayered(texture< uchar1, 241, cudaReadModeElementType> t, float x, int layer) # 1482 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1486 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1488 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex1DLayered(texture< char2, 241, cudaReadModeElementType> t, float x, int layer) # 1489 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1493 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1495 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex1DLayered(texture< uchar2, 241, cudaReadModeElementType> t, float x, int layer) # 1496 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1500 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1502 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex1DLayered(texture< char4, 241, cudaReadModeElementType> t, float x, int layer) # 1503 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1507 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1509 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex1DLayered(texture< uchar4, 241, cudaReadModeElementType> t, float x, int layer) # 1510 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1514 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1522 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex1DLayered(texture< short, 241, cudaReadModeElementType> t, float x, int layer) # 1523 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1527 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1529 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex1DLayered(texture< unsigned short, 241, cudaReadModeElementType> t, float x, int layer) # 1530 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1534 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1536 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex1DLayered(texture< short1, 241, cudaReadModeElementType> t, float x, int layer) # 1537 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1541 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1543 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex1DLayered(texture< ushort1, 241, cudaReadModeElementType> t, float x, int layer) # 1544 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1548 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1550 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex1DLayered(texture< short2, 241, cudaReadModeElementType> t, float x, int layer) # 1551 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1555 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1557 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex1DLayered(texture< ushort2, 241, cudaReadModeElementType> t, float x, int layer) # 1558 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1562 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1564 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex1DLayered(texture< short4, 241, cudaReadModeElementType> t, float x, int layer) # 1565 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1569 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1571 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex1DLayered(texture< ushort4, 241, cudaReadModeElementType> t, float x, int layer) # 1572 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1576 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1584 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex1DLayered(texture< int, 241, cudaReadModeElementType> t, float x, int layer) # 1585 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1589 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1591 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex1DLayered(texture< unsigned, 241, cudaReadModeElementType> t, float x, int layer) # 1592 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1596 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1598 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex1DLayered(texture< int1, 241, cudaReadModeElementType> t, float x, int layer) # 1599 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1603 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1605 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex1DLayered(texture< uint1, 241, cudaReadModeElementType> t, float x, int layer) # 1606 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1610 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1612 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex1DLayered(texture< int2, 241, cudaReadModeElementType> t, float x, int layer) # 1613 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1617 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1619 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex1DLayered(texture< uint2, 241, cudaReadModeElementType> t, float x, int layer) # 1620 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1624 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1626 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex1DLayered(texture< int4, 241, cudaReadModeElementType> t, float x, int layer) # 1627 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1631 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1633 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex1DLayered(texture< uint4, 241, cudaReadModeElementType> t, float x, int layer) # 1634 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1638 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1712 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1DLayered(texture< float, 241, cudaReadModeElementType> t, float x, int layer) # 1713 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1717 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1719 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1DLayered(texture< float1, 241, cudaReadModeElementType> t, float x, int layer) # 1720 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1724 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1726 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1DLayered(texture< float2, 241, cudaReadModeElementType> t, float x, int layer) # 1727 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1731 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1733 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1DLayered(texture< float4, 241, cudaReadModeElementType> t, float x, int layer) # 1734 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1738 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1746 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1DLayered(texture< char, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1747 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1756 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1758 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1DLayered(texture< signed char, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1759 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1764 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1766 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1DLayered(texture< unsigned char, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1767 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1772 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1774 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1DLayered(texture< char1, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1775 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1780 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1782 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1DLayered(texture< uchar1, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1783 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1788 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1790 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1DLayered(texture< char2, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1791 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1796 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1798 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1DLayered(texture< uchar2, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1799 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1804 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1806 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1DLayered(texture< char4, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1807 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1812 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1814 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1DLayered(texture< uchar4, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1815 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1820 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1828 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1DLayered(texture< short, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1829 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1834 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1836 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1DLayered(texture< unsigned short, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1837 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1842 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1844 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1DLayered(texture< short1, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1845 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1850 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1852 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1DLayered(texture< ushort1, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1853 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1858 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1860 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1DLayered(texture< short2, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1861 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1866 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1868 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1DLayered(texture< ushort2, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1869 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1874 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1876 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1DLayered(texture< short4, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1877 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1882 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1884 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1DLayered(texture< ushort4, 241, cudaReadModeNormalizedFloat> t, float x, int layer) # 1885 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)layer; # 1890 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1898 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex2DLayered(texture< char, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1899 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1907 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1909 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex2DLayered(texture< signed char, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1910 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1914 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1916 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex2DLayered(texture< unsigned char, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1917 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1921 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1923 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex2DLayered(texture< char1, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1924 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1928 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1930 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex2DLayered(texture< uchar1, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1931 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1935 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1937 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex2DLayered(texture< char2, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1938 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1942 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1944 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex2DLayered(texture< uchar2, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1945 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1949 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1951 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2DLayered(texture< char4, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1952 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1956 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1958 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2DLayered(texture< uchar4, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1959 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1963 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1971 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex2DLayered(texture< short, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1972 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1976 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1978 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex2DLayered(texture< unsigned short, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1979 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1983 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1985 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex2DLayered(texture< short1, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1986 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1990 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1992 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex2DLayered(texture< ushort1, 242, cudaReadModeElementType> t, float x, float y, int layer) # 1993 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 1997 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 1999 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex2DLayered(texture< short2, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2000 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2004 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2006 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex2DLayered(texture< ushort2, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2007 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2011 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2013 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2DLayered(texture< short4, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2014 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2018 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2020 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2DLayered(texture< ushort4, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2021 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2025 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2033 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex2DLayered(texture< int, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2034 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2038 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2040 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex2DLayered(texture< unsigned, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2041 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2045 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2047 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex2DLayered(texture< int1, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2048 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2052 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2054 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex2DLayered(texture< uint1, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2055 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2059 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2061 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex2DLayered(texture< int2, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2062 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2066 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2068 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex2DLayered(texture< uint2, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2069 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2073 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2075 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2DLayered(texture< int4, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2076 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2080 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2082 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2DLayered(texture< uint4, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2083 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2087 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2161 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2DLayered(texture< float, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2162 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2166 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2168 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2DLayered(texture< float1, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2169 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2173 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2175 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2DLayered(texture< float2, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2176 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2180 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2182 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2DLayered(texture< float4, 242, cudaReadModeElementType> t, float x, float y, int layer) # 2183 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2187 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2195 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2DLayered(texture< char, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2196 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2205 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2207 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2DLayered(texture< signed char, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2208 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2213 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2215 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2DLayered(texture< unsigned char, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2216 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2221 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2223 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2DLayered(texture< char1, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2224 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2229 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2231 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2DLayered(texture< uchar1, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2232 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2237 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2239 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2DLayered(texture< char2, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2240 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2245 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2247 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2DLayered(texture< uchar2, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2248 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2253 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2255 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2DLayered(texture< char4, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2256 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2261 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2263 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2DLayered(texture< uchar4, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2264 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2269 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2277 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2DLayered(texture< short, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2278 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2283 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2285 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2DLayered(texture< unsigned short, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2286 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2291 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2293 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2DLayered(texture< short1, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2294 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2299 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2301 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2DLayered(texture< ushort1, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2302 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2307 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2309 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2DLayered(texture< short2, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2310 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2315 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2317 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2DLayered(texture< ushort2, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2318 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2323 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2325 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2DLayered(texture< short4, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2326 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2331 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2333 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2DLayered(texture< ushort4, 242, cudaReadModeNormalizedFloat> t, float x, float y, int layer) # 2334 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)layer; # 2339 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2347 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex3D(texture< char, 3, cudaReadModeElementType> t, float x, float y, float z) # 2348 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2356 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2358 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex3D(texture< signed char, 3, cudaReadModeElementType> t, float x, float y, float z) # 2359 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2363 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2365 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex3D(texture< unsigned char, 3, cudaReadModeElementType> t, float x, float y, float z) # 2366 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2370 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2372 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex3D(texture< char1, 3, cudaReadModeElementType> t, float x, float y, float z) # 2373 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2377 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2379 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex3D(texture< uchar1, 3, cudaReadModeElementType> t, float x, float y, float z) # 2380 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2384 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2386 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex3D(texture< char2, 3, cudaReadModeElementType> t, float x, float y, float z) # 2387 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2391 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2393 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex3D(texture< uchar2, 3, cudaReadModeElementType> t, float x, float y, float z) # 2394 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2398 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2400 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex3D(texture< char4, 3, cudaReadModeElementType> t, float x, float y, float z) # 2401 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2405 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2407 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex3D(texture< uchar4, 3, cudaReadModeElementType> t, float x, float y, float z) # 2408 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2412 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2420 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex3D(texture< short, 3, cudaReadModeElementType> t, float x, float y, float z) # 2421 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2425 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2427 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex3D(texture< unsigned short, 3, cudaReadModeElementType> t, float x, float y, float z) # 2428 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2432 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2434 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex3D(texture< short1, 3, cudaReadModeElementType> t, float x, float y, float z) # 2435 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2439 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2441 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex3D(texture< ushort1, 3, cudaReadModeElementType> t, float x, float y, float z) # 2442 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2446 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2448 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex3D(texture< short2, 3, cudaReadModeElementType> t, float x, float y, float z) # 2449 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2453 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2455 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex3D(texture< ushort2, 3, cudaReadModeElementType> t, float x, float y, float z) # 2456 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2460 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2462 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex3D(texture< short4, 3, cudaReadModeElementType> t, float x, float y, float z) # 2463 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2467 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2469 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex3D(texture< ushort4, 3, cudaReadModeElementType> t, float x, float y, float z) # 2470 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2474 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2482 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex3D(texture< int, 3, cudaReadModeElementType> t, float x, float y, float z) # 2483 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2487 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2489 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex3D(texture< unsigned, 3, cudaReadModeElementType> t, float x, float y, float z) # 2490 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2494 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2496 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex3D(texture< int1, 3, cudaReadModeElementType> t, float x, float y, float z) # 2497 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2501 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2503 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex3D(texture< uint1, 3, cudaReadModeElementType> t, float x, float y, float z) # 2504 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2508 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2510 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex3D(texture< int2, 3, cudaReadModeElementType> t, float x, float y, float z) # 2511 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2515 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2517 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex3D(texture< uint2, 3, cudaReadModeElementType> t, float x, float y, float z) # 2518 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2522 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2524 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex3D(texture< int4, 3, cudaReadModeElementType> t, float x, float y, float z) # 2525 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2529 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2531 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex3D(texture< uint4, 3, cudaReadModeElementType> t, float x, float y, float z) # 2532 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2536 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2610 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< float, 3, cudaReadModeElementType> t, float x, float y, float z) # 2611 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2615 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2617 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< float1, 3, cudaReadModeElementType> t, float x, float y, float z) # 2618 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2622 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2624 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< float2, 3, cudaReadModeElementType> t, float x, float y, float z) # 2625 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2629 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2631 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< float4, 3, cudaReadModeElementType> t, float x, float y, float z) # 2632 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2636 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2644 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< char, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2645 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2654 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2656 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< signed char, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2657 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2662 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2664 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< unsigned char, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2665 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2670 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2672 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< char1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2673 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2678 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2680 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< uchar1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2681 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2686 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2688 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< char2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2689 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2694 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2696 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< uchar2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2697 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2702 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2704 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< char4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2705 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2710 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2712 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< uchar4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2713 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2718 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2726 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< short, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2727 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2732 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2734 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< unsigned short, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2735 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2740 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2742 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< short1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2743 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2748 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2750 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< ushort1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2751 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2756 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2758 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< short2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2759 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2764 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2766 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< ushort2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2767 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2772 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2774 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< short4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2775 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2780 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2782 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< ushort4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 2783 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2788 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2796 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char texCubemap(texture< char, 12, cudaReadModeElementType> t, float x, float y, float z) # 2797 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2805 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2807 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char texCubemap(texture< signed char, 12, cudaReadModeElementType> t, float x, float y, float z) # 2808 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2812 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2814 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char texCubemap(texture< unsigned char, 12, cudaReadModeElementType> t, float x, float y, float z) # 2815 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2819 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2821 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 texCubemap(texture< char1, 12, cudaReadModeElementType> t, float x, float y, float z) # 2822 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2826 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2828 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 texCubemap(texture< uchar1, 12, cudaReadModeElementType> t, float x, float y, float z) # 2829 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2833 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2835 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 texCubemap(texture< char2, 12, cudaReadModeElementType> t, float x, float y, float z) # 2836 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2840 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2842 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 texCubemap(texture< uchar2, 12, cudaReadModeElementType> t, float x, float y, float z) # 2843 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2847 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2849 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 texCubemap(texture< char4, 12, cudaReadModeElementType> t, float x, float y, float z) # 2850 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2854 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2856 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 texCubemap(texture< uchar4, 12, cudaReadModeElementType> t, float x, float y, float z) # 2857 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2861 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2869 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short texCubemap(texture< short, 12, cudaReadModeElementType> t, float x, float y, float z) # 2870 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2874 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2876 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short texCubemap(texture< unsigned short, 12, cudaReadModeElementType> t, float x, float y, float z) # 2877 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2881 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2883 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 texCubemap(texture< short1, 12, cudaReadModeElementType> t, float x, float y, float z) # 2884 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2888 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2890 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 texCubemap(texture< ushort1, 12, cudaReadModeElementType> t, float x, float y, float z) # 2891 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2895 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2897 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 texCubemap(texture< short2, 12, cudaReadModeElementType> t, float x, float y, float z) # 2898 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2902 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2904 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 texCubemap(texture< ushort2, 12, cudaReadModeElementType> t, float x, float y, float z) # 2905 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2909 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2911 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 texCubemap(texture< short4, 12, cudaReadModeElementType> t, float x, float y, float z) # 2912 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2916 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2918 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 texCubemap(texture< ushort4, 12, cudaReadModeElementType> t, float x, float y, float z) # 2919 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2923 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2931 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int texCubemap(texture< int, 12, cudaReadModeElementType> t, float x, float y, float z) # 2932 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2936 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2938 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned texCubemap(texture< unsigned, 12, cudaReadModeElementType> t, float x, float y, float z) # 2939 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2943 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2945 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 texCubemap(texture< int1, 12, cudaReadModeElementType> t, float x, float y, float z) # 2946 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2950 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2952 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 texCubemap(texture< uint1, 12, cudaReadModeElementType> t, float x, float y, float z) # 2953 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2957 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2959 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 texCubemap(texture< int2, 12, cudaReadModeElementType> t, float x, float y, float z) # 2960 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2964 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2966 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 texCubemap(texture< uint2, 12, cudaReadModeElementType> t, float x, float y, float z) # 2967 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2971 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2973 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 texCubemap(texture< int4, 12, cudaReadModeElementType> t, float x, float y, float z) # 2974 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2978 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 2980 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 texCubemap(texture< uint4, 12, cudaReadModeElementType> t, float x, float y, float z) # 2981 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 2985 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3059 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemap(texture< float, 12, cudaReadModeElementType> t, float x, float y, float z) # 3060 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3064 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3066 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemap(texture< float1, 12, cudaReadModeElementType> t, float x, float y, float z) # 3067 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3071 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3073 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemap(texture< float2, 12, cudaReadModeElementType> t, float x, float y, float z) # 3074 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3078 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3080 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemap(texture< float4, 12, cudaReadModeElementType> t, float x, float y, float z) # 3081 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3085 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3093 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemap(texture< char, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3094 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3103 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3105 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemap(texture< signed char, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3106 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3111 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3113 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemap(texture< unsigned char, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3114 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3119 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3121 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemap(texture< char1, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3122 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3127 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3129 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemap(texture< uchar1, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3130 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3135 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3137 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemap(texture< char2, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3138 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3143 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3145 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemap(texture< uchar2, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3146 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3151 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3153 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemap(texture< char4, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3154 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3159 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3161 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemap(texture< uchar4, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3162 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3167 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3175 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemap(texture< short, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3176 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3181 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3183 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemap(texture< unsigned short, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3184 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3189 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3191 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemap(texture< short1, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3192 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3197 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3199 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemap(texture< ushort1, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3200 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3205 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3207 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemap(texture< short2, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3208 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3213 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3215 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemap(texture< ushort2, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3216 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3221 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3223 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemap(texture< short4, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3224 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3229 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3231 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemap(texture< ushort4, 12, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 3232 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z; # 3237 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3245 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char texCubemapLayered(texture< char, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3246 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3254 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3256 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char texCubemapLayered(texture< signed char, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3257 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3261 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3263 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char texCubemapLayered(texture< unsigned char, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3264 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3268 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3270 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 texCubemapLayered(texture< char1, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3271 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3275 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3277 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 texCubemapLayered(texture< uchar1, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3278 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3282 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3284 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 texCubemapLayered(texture< char2, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3285 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3289 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3291 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 texCubemapLayered(texture< uchar2, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3292 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3296 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3298 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 texCubemapLayered(texture< char4, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3299 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3303 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3305 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 texCubemapLayered(texture< uchar4, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3306 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3310 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3318 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short texCubemapLayered(texture< short, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3319 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3323 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3325 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short texCubemapLayered(texture< unsigned short, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3326 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3330 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3332 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 texCubemapLayered(texture< short1, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3333 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3337 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3339 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 texCubemapLayered(texture< ushort1, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3340 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3344 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3346 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 texCubemapLayered(texture< short2, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3347 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3351 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3353 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 texCubemapLayered(texture< ushort2, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3354 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3358 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3360 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 texCubemapLayered(texture< short4, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3361 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3365 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3367 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 texCubemapLayered(texture< ushort4, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3368 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3372 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3380 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int texCubemapLayered(texture< int, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3381 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3385 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3387 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned texCubemapLayered(texture< unsigned, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3388 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3392 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3394 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 texCubemapLayered(texture< int1, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3395 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3399 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3401 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 texCubemapLayered(texture< uint1, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3402 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3406 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3408 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 texCubemapLayered(texture< int2, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3409 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3413 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3415 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 texCubemapLayered(texture< uint2, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3416 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3420 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3422 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 texCubemapLayered(texture< int4, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3423 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3427 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3429 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 texCubemapLayered(texture< uint4, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3430 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3434 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3508 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemapLayered(texture< float, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3509 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3513 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3515 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemapLayered(texture< float1, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3516 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3520 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3522 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemapLayered(texture< float2, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3523 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3527 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3529 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemapLayered(texture< float4, 252, cudaReadModeElementType> t, float x, float y, float z, int layer) # 3530 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3534 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3542 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemapLayered(texture< char, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3543 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3552 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3554 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemapLayered(texture< signed char, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3555 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3560 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3562 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemapLayered(texture< unsigned char, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3563 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3568 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3570 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemapLayered(texture< char1, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3571 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3576 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3578 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemapLayered(texture< uchar1, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3579 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3584 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3586 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemapLayered(texture< char2, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3587 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3592 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3594 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemapLayered(texture< uchar2, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3595 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3600 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3602 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemapLayered(texture< char4, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3603 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3608 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3610 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemapLayered(texture< uchar4, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3611 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3616 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3624 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemapLayered(texture< short, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3625 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3630 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3632 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float texCubemapLayered(texture< unsigned short, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3633 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3638 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3640 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemapLayered(texture< short1, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3641 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3646 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3648 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 texCubemapLayered(texture< ushort1, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3649 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3654 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3656 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemapLayered(texture< short2, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3657 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3662 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3664 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 texCubemapLayered(texture< ushort2, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3665 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3670 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3672 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemapLayered(texture< short4, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3673 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3678 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3680 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 texCubemapLayered(texture< ushort4, 252, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer) # 3681 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)z;(void)layer; # 3686 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3780 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3781 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3783 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3785 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< signed char, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3786 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3788 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3790 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< unsigned char, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3791 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3793 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3795 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3796 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3798 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3800 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3801 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3803 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3805 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3806 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3808 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3810 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3811 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3813 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3815 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3816 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3818 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3820 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3821 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3823 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3825 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3826 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3828 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3830 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3831 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3833 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3835 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3836 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3838 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3840 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< unsigned short, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3841 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3843 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3845 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3846 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3848 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3850 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3851 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3853 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3855 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3856 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3858 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3860 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3861 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3863 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3865 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3866 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3868 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3870 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3871 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3873 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3875 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3876 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3878 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3880 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3881 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3883 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3885 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3886 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3888 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3890 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< unsigned, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3891 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3893 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3895 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3896 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3898 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3900 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3901 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3903 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3905 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3906 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3908 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3910 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3911 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3913 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3915 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3916 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3918 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3920 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3921 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3923 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3925 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3926 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3928 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3930 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3931 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3933 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3935 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3936 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3938 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3940 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3941 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3943 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3945 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3946 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3948 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3950 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3951 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3953 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3955 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 3956 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3958 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3967 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< char, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 3968 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3970 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3972 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< signed char, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 3973 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3975 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3977 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< unsigned char, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 3978 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3980 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3982 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< char1, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 3983 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3985 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3987 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< uchar1, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 3988 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3990 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3992 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< char2, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 3993 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 3995 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 3997 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< uchar2, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 3998 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4000 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4002 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< char3, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4003 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4005 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4007 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< uchar3, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4008 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4010 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4012 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< char4, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4013 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4015 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4017 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< uchar4, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4018 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4020 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4022 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< short, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4023 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4025 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4027 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< unsigned short, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4028 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4030 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4032 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< short1, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4033 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4035 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4037 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< ushort1, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4038 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4040 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4042 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< short2, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4043 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4045 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4047 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< ushort2, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4048 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4050 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4052 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< short3, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4053 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4055 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4057 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< ushort3, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4058 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4060 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4062 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< short4, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4063 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4065 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 4067 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< ushort4, 2, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0) # 4068 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" {int volatile ___ = 1;(void)t;(void)x;(void)y;(void)comp; # 4070 "/usr/local/cuda4.1/cuda/include/texture_fetch_functions.h" exit(___);} # 66 "/usr/local/cuda4.1/cuda/include/device_launch_parameters.h" extern "C" { extern const uint3 threadIdx; } # 67 "/usr/local/cuda4.1/cuda/include/device_launch_parameters.h" extern "C" { extern const uint3 blockIdx; } # 68 "/usr/local/cuda4.1/cuda/include/device_launch_parameters.h" extern "C" { extern const dim3 blockDim; } # 69 "/usr/local/cuda4.1/cuda/include/device_launch_parameters.h" extern "C" { extern const dim3 gridDim; } # 70 "/usr/local/cuda4.1/cuda/include/device_launch_parameters.h" extern "C" { extern const int warpSize; } # 120 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 121 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaSetupArgument(T # 122 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" arg, size_t # 123 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset) # 125 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 126 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaSetupArgument((const void *)(&arg), sizeof(T), offset); # 127 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 159 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaEventCreate(cudaEvent_t * # 160 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" event, unsigned # 161 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" flags) # 163 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 164 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaEventCreateWithFlags(event, flags); # 165 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 222 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaMallocHost(void ** # 223 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" ptr, size_t # 224 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size, unsigned # 225 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" flags) # 227 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 228 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaHostAlloc(ptr, size, flags); # 229 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 231 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 232 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaHostAlloc(T ** # 233 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" ptr, size_t # 234 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size, unsigned # 235 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" flags) # 237 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 238 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaHostAlloc((void **)((void *)ptr), size, flags); # 239 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 241 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 242 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaHostGetDevicePointer(T ** # 243 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" pDevice, void * # 244 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" pHost, unsigned # 245 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" flags) # 247 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 248 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaHostGetDevicePointer((void **)((void *)pDevice), pHost, flags); # 249 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 251 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 252 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaMalloc(T ** # 253 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, size_t # 254 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size) # 256 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 257 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMalloc((void **)((void *)devPtr), size); # 258 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 260 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 261 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaMallocHost(T ** # 262 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" ptr, size_t # 263 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size, unsigned # 264 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" flags = (0)) # 266 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 267 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMallocHost((void **)((void *)ptr), size, flags); # 268 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 270 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 271 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaMallocPitch(T ** # 272 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, size_t * # 273 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" pitch, size_t # 274 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" width, size_t # 275 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" height) # 277 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 278 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMallocPitch((void **)((void *)devPtr), pitch, width, height); # 279 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 289 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaMemcpyToSymbol(char * # 290 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, const void * # 291 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" src, size_t # 292 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 293 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 294 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyHostToDevice) # 296 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 297 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyToSymbol((const char *)symbol, src, count, offset, kind); # 298 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 300 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 301 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaMemcpyToSymbol(const T & # 302 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, const void * # 303 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" src, size_t # 304 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 305 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 306 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyHostToDevice) # 308 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 309 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyToSymbol((const char *)(&symbol), src, count, offset, kind); # 310 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 312 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaMemcpyToSymbolAsync(char * # 313 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, const void * # 314 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" src, size_t # 315 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 316 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 317 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyHostToDevice, cudaStream_t # 318 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" stream = 0) # 320 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 321 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyToSymbolAsync((const char *)symbol, src, count, offset, kind, stream); # 322 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 324 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 325 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaMemcpyToSymbolAsync(const T & # 326 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, const void * # 327 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" src, size_t # 328 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 329 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 330 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyHostToDevice, cudaStream_t # 331 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" stream = 0) # 333 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 334 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyToSymbolAsync((const char *)(&symbol), src, count, offset, kind, stream); # 335 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 343 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaMemcpyFromSymbol(void * # 344 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" dst, char * # 345 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, size_t # 346 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 347 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 348 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost) # 350 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 351 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyFromSymbol(dst, (const char *)symbol, count, offset, kind); # 352 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 354 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 355 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaMemcpyFromSymbol(void * # 356 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" dst, const T & # 357 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, size_t # 358 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 359 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 360 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost) # 362 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 363 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyFromSymbol(dst, (const char *)(&symbol), count, offset, kind); # 364 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 366 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaMemcpyFromSymbolAsync(void * # 367 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" dst, char * # 368 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, size_t # 369 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 370 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 371 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost, cudaStream_t # 372 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" stream = 0) # 374 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 375 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyFromSymbolAsync(dst, (const char *)symbol, count, offset, kind, stream); # 376 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 378 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 379 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaMemcpyFromSymbolAsync(void * # 380 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" dst, const T & # 381 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol, size_t # 382 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" count, size_t # 383 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 384 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost, cudaStream_t # 385 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" stream = 0) # 387 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 388 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaMemcpyFromSymbolAsync(dst, (const char *)(&symbol), count, offset, kind, stream); # 389 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 391 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaGetSymbolAddress(void ** # 392 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, char * # 393 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol) # 395 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 396 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaGetSymbolAddress(devPtr, (const char *)symbol); # 397 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 424 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 425 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaGetSymbolAddress(void ** # 426 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, const T & # 427 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol) # 429 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 430 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaGetSymbolAddress(devPtr, (const char *)(&symbol)); # 431 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 439 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" static inline cudaError_t cudaGetSymbolSize(size_t * # 440 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size, char * # 441 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol) # 443 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 444 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaGetSymbolSize(size, (const char *)symbol); # 445 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 472 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 473 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaGetSymbolSize(size_t * # 474 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size, const T & # 475 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" symbol) # 477 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 478 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaGetSymbolSize(size, (const char *)(&symbol)); # 479 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 521 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 522 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindTexture(size_t * # 523 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 524 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex, const void * # 525 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, const cudaChannelFormatDesc & # 526 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" desc, size_t # 527 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size = (((2147483647) * 2U) + 1U)) # 529 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 530 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaBindTexture(offset, &tex, devPtr, &desc, size); # 531 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 566 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 567 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindTexture(size_t * # 568 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 569 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex, const void * # 570 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, size_t # 571 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" size = (((2147483647) * 2U) + 1U)) # 573 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 574 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaBindTexture(offset, tex, devPtr, (tex.channelDesc), size); # 575 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 622 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 623 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindTexture2D(size_t * # 624 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 625 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex, const void * # 626 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, const cudaChannelFormatDesc & # 627 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" desc, size_t # 628 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" width, size_t # 629 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" height, size_t # 630 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" pitch) # 632 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 633 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaBindTexture2D(offset, &tex, devPtr, &desc, width, height, pitch); # 634 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 680 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 681 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindTexture2D(size_t * # 682 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 683 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex, const void * # 684 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" devPtr, size_t # 685 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" width, size_t # 686 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" height, size_t # 687 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" pitch) # 689 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 690 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaBindTexture2D(offset, &tex, devPtr, &(tex.texture< T, dim, readMode> ::channelDesc), width, height, pitch); # 691 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 722 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 723 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindTextureToArray(const texture< T, dim, readMode> & # 724 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex, const cudaArray * # 725 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" array, const cudaChannelFormatDesc & # 726 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" desc) # 728 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 729 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaBindTextureToArray(&tex, array, &desc); # 730 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 760 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 761 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindTextureToArray(const texture< T, dim, readMode> & # 762 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex, const cudaArray * # 763 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" array) # 765 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 766 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaChannelFormatDesc desc; # 767 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaError_t err = cudaGetChannelDesc(&desc, array); # 769 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return (err == (cudaSuccess)) ? cudaBindTextureToArray(tex, array, desc) : err; # 770 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 799 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 800 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaUnbindTexture(const texture< T, dim, readMode> & # 801 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex) # 803 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 804 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaUnbindTexture(&tex); # 805 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 839 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 840 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaGetTextureAlignmentOffset(size_t * # 841 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 842 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" tex) # 844 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 845 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaGetTextureAlignmentOffset(offset, &tex); # 846 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 900 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 901 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaFuncSetCacheConfig(T * # 902 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" func, cudaFuncCache # 903 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cacheConfig) # 905 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 906 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaFuncSetCacheConfig((const char *)func, cacheConfig); # 907 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 944 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 945 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaLaunch(T * # 946 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" entry) # 948 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 949 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaLaunch((const char *)entry); # 950 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 984 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T> inline cudaError_t # 985 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaFuncGetAttributes(cudaFuncAttributes * # 986 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" attr, T * # 987 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" entry) # 989 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 990 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaFuncGetAttributes(attr, (const char *)entry); # 991 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 1013 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim> inline cudaError_t # 1014 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindSurfaceToArray(const surface< T, dim> & # 1015 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" surf, const cudaArray * # 1016 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" array, const cudaChannelFormatDesc & # 1017 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" desc) # 1019 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 1020 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return cudaBindSurfaceToArray(&surf, array, &desc); # 1021 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 1042 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" template< class T, int dim> inline cudaError_t # 1043 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaBindSurfaceToArray(const surface< T, dim> & # 1044 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" surf, const cudaArray * # 1045 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" array) # 1047 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" { # 1048 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaChannelFormatDesc desc; # 1049 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" cudaError_t err = cudaGetChannelDesc(&desc, array); # 1051 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" return (err == (cudaSuccess)) ? cudaBindSurfaceToArray(surf, array, desc) : err; # 1052 "/usr/local/cuda4.1/cuda/include/cuda_runtime.h" } # 45 "/usr/include/stdio.h" 3 struct _IO_FILE; # 49 "/usr/include/stdio.h" 3 extern "C" { typedef _IO_FILE FILE; } # 65 "/usr/include/stdio.h" 3 extern "C" { typedef _IO_FILE __FILE; } # 95 "/usr/include/wchar.h" 3 extern "C" { typedef # 84 "/usr/include/wchar.h" 3 struct { # 85 "/usr/include/wchar.h" 3 int __count; # 87 "/usr/include/wchar.h" 3 union { # 89 "/usr/include/wchar.h" 3 unsigned __wch; # 93 "/usr/include/wchar.h" 3 char __wchb[4]; # 94 "/usr/include/wchar.h" 3 } __value; # 95 "/usr/include/wchar.h" 3 } __mbstate_t; } # 26 "/usr/include/_G_config.h" 3 extern "C" { typedef # 23 "/usr/include/_G_config.h" 3 struct { # 24 "/usr/include/_G_config.h" 3 __off_t __pos; # 25 "/usr/include/_G_config.h" 3 __mbstate_t __state; # 26 "/usr/include/_G_config.h" 3 } _G_fpos_t; } # 31 "/usr/include/_G_config.h" 3 extern "C" { typedef # 28 "/usr/include/_G_config.h" 3 struct { # 29 "/usr/include/_G_config.h" 3 __off64_t __pos; # 30 "/usr/include/_G_config.h" 3 __mbstate_t __state; # 31 "/usr/include/_G_config.h" 3 } _G_fpos64_t; } # 53 "/usr/include/_G_config.h" 3 extern "C" { typedef short _G_int16_t __attribute((__mode__(__HI__))); } # 54 "/usr/include/_G_config.h" 3 extern "C" { typedef int _G_int32_t __attribute((__mode__(__SI__))); } # 55 "/usr/include/_G_config.h" 3 extern "C" { typedef unsigned short _G_uint16_t __attribute((__mode__(__HI__))); } # 56 "/usr/include/_G_config.h" 3 extern "C" { typedef unsigned _G_uint32_t __attribute((__mode__(__SI__))); } # 40 "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include/stdarg.h" 3 extern "C" { typedef __builtin_va_list __gnuc_va_list; } # 170 "/usr/include/libio.h" 3 struct _IO_jump_t; struct _IO_FILE; # 180 "/usr/include/libio.h" 3 extern "C" { typedef void _IO_lock_t; } # 186 "/usr/include/libio.h" 3 extern "C" { struct _IO_marker { # 187 "/usr/include/libio.h" 3 _IO_marker *_next; # 188 "/usr/include/libio.h" 3 _IO_FILE *_sbuf; # 192 "/usr/include/libio.h" 3 int _pos; # 203 "/usr/include/libio.h" 3 }; } # 206 "/usr/include/libio.h" 3 enum __codecvt_result { # 208 "/usr/include/libio.h" 3 __codecvt_ok, # 209 "/usr/include/libio.h" 3 __codecvt_partial, # 210 "/usr/include/libio.h" 3 __codecvt_error, # 211 "/usr/include/libio.h" 3 __codecvt_noconv # 212 "/usr/include/libio.h" 3 }; # 271 "/usr/include/libio.h" 3 extern "C" { struct _IO_FILE { # 272 "/usr/include/libio.h" 3 int _flags; # 277 "/usr/include/libio.h" 3 char *_IO_read_ptr; # 278 "/usr/include/libio.h" 3 char *_IO_read_end; # 279 "/usr/include/libio.h" 3 char *_IO_read_base; # 280 "/usr/include/libio.h" 3 char *_IO_write_base; # 281 "/usr/include/libio.h" 3 char *_IO_write_ptr; # 282 "/usr/include/libio.h" 3 char *_IO_write_end; # 283 "/usr/include/libio.h" 3 char *_IO_buf_base; # 284 "/usr/include/libio.h" 3 char *_IO_buf_end; # 286 "/usr/include/libio.h" 3 char *_IO_save_base; # 287 "/usr/include/libio.h" 3 char *_IO_backup_base; # 288 "/usr/include/libio.h" 3 char *_IO_save_end; # 290 "/usr/include/libio.h" 3 _IO_marker *_markers; # 292 "/usr/include/libio.h" 3 _IO_FILE *_chain; # 294 "/usr/include/libio.h" 3 int _fileno; # 298 "/usr/include/libio.h" 3 int _flags2; # 300 "/usr/include/libio.h" 3 __off_t _old_offset; # 304 "/usr/include/libio.h" 3 unsigned short _cur_column; # 305 "/usr/include/libio.h" 3 signed char _vtable_offset; # 306 "/usr/include/libio.h" 3 char _shortbuf[1]; # 310 "/usr/include/libio.h" 3 _IO_lock_t *_lock; # 319 "/usr/include/libio.h" 3 __off64_t _offset; # 328 "/usr/include/libio.h" 3 void *__pad1; # 329 "/usr/include/libio.h" 3 void *__pad2; # 330 "/usr/include/libio.h" 3 void *__pad3; # 331 "/usr/include/libio.h" 3 void *__pad4; # 332 "/usr/include/libio.h" 3 size_t __pad5; # 334 "/usr/include/libio.h" 3 int _mode; # 336 "/usr/include/libio.h" 3 char _unused2[(((15) * sizeof(int)) - ((4) * sizeof(void *))) - sizeof(size_t)]; # 338 "/usr/include/libio.h" 3 }; } # 344 "/usr/include/libio.h" 3 struct _IO_FILE_plus; # 346 "/usr/include/libio.h" 3 extern "C" { extern _IO_FILE_plus _IO_2_1_stdin_; } # 347 "/usr/include/libio.h" 3 extern "C" { extern _IO_FILE_plus _IO_2_1_stdout_; } # 348 "/usr/include/libio.h" 3 extern "C" { extern _IO_FILE_plus _IO_2_1_stderr_; } # 364 "/usr/include/libio.h" 3 extern "C" { typedef __ssize_t __io_read_fn(void * , char * , size_t ); } # 372 "/usr/include/libio.h" 3 extern "C" { typedef __ssize_t __io_write_fn(void * , const char * , size_t ); } # 381 "/usr/include/libio.h" 3 extern "C" { typedef int __io_seek_fn(void * , __off64_t * , int ); } # 384 "/usr/include/libio.h" 3 extern "C" { typedef int __io_close_fn(void * ); } # 389 "/usr/include/libio.h" 3 extern "C" { typedef __io_read_fn cookie_read_function_t; } # 390 "/usr/include/libio.h" 3 extern "C" { typedef __io_write_fn cookie_write_function_t; } # 391 "/usr/include/libio.h" 3 extern "C" { typedef __io_seek_fn cookie_seek_function_t; } # 392 "/usr/include/libio.h" 3 extern "C" { typedef __io_close_fn cookie_close_function_t; } # 401 "/usr/include/libio.h" 3 extern "C" { typedef # 396 "/usr/include/libio.h" 3 struct { # 397 "/usr/include/libio.h" 3 __io_read_fn *read; # 398 "/usr/include/libio.h" 3 __io_write_fn *write; # 399 "/usr/include/libio.h" 3 __io_seek_fn *seek; # 400 "/usr/include/libio.h" 3 __io_close_fn *close; # 401 "/usr/include/libio.h" 3 } _IO_cookie_io_functions_t; } # 402 "/usr/include/libio.h" 3 extern "C" { typedef _IO_cookie_io_functions_t cookie_io_functions_t; } # 404 "/usr/include/libio.h" 3 struct _IO_cookie_file; # 407 "/usr/include/libio.h" 3 extern "C" void _IO_cookie_init(_IO_cookie_file * , int , void * , _IO_cookie_io_functions_t ); # 416 "/usr/include/libio.h" 3 extern "C" int __underflow(_IO_FILE *); # 417 "/usr/include/libio.h" 3 extern "C" int __uflow(_IO_FILE *); # 418 "/usr/include/libio.h" 3 extern "C" int __overflow(_IO_FILE *, int); # 460 "/usr/include/libio.h" 3 extern "C" int _IO_getc(_IO_FILE * ); # 461 "/usr/include/libio.h" 3 extern "C" int _IO_putc(int , _IO_FILE * ); # 462 "/usr/include/libio.h" 3 extern "C" int _IO_feof(_IO_FILE * ) throw(); # 463 "/usr/include/libio.h" 3 extern "C" int _IO_ferror(_IO_FILE * ) throw(); # 465 "/usr/include/libio.h" 3 extern "C" int _IO_peekc_locked(_IO_FILE * ); # 471 "/usr/include/libio.h" 3 extern "C" void _IO_flockfile(_IO_FILE *) throw(); # 472 "/usr/include/libio.h" 3 extern "C" void _IO_funlockfile(_IO_FILE *) throw(); # 473 "/usr/include/libio.h" 3 extern "C" int _IO_ftrylockfile(_IO_FILE *) throw(); # 490 "/usr/include/libio.h" 3 extern "C" int _IO_vfscanf(_IO_FILE *__restrict__, const char *__restrict__, __gnuc_va_list, int *__restrict__); # 492 "/usr/include/libio.h" 3 extern "C" int _IO_vfprintf(_IO_FILE *__restrict__, const char *__restrict__, __gnuc_va_list); # 494 "/usr/include/libio.h" 3 extern "C" __ssize_t _IO_padn(_IO_FILE *, int, __ssize_t); # 495 "/usr/include/libio.h" 3 extern "C" size_t _IO_sgetn(_IO_FILE *, void *, size_t); # 497 "/usr/include/libio.h" 3 extern "C" __off64_t _IO_seekoff(_IO_FILE *, __off64_t, int, int); # 498 "/usr/include/libio.h" 3 extern "C" __off64_t _IO_seekpos(_IO_FILE *, __off64_t, int); # 500 "/usr/include/libio.h" 3 extern "C" void _IO_free_backup_area(_IO_FILE *) throw(); # 80 "/usr/include/stdio.h" 3 extern "C" { typedef __gnuc_va_list va_list; } # 111 "/usr/include/stdio.h" 3 extern "C" { typedef _G_fpos_t fpos_t; } # 117 "/usr/include/stdio.h" 3 extern "C" { typedef _G_fpos64_t fpos64_t; } # 165 "/usr/include/stdio.h" 3 extern "C" { extern _IO_FILE *stdin; } # 166 "/usr/include/stdio.h" 3 extern "C" { extern _IO_FILE *stdout; } # 167 "/usr/include/stdio.h" 3 extern "C" { extern _IO_FILE *stderr; } # 175 "/usr/include/stdio.h" 3 extern "C" int remove(const char * ) throw(); # 177 "/usr/include/stdio.h" 3 extern "C" int rename(const char * , const char * ) throw(); # 182 "/usr/include/stdio.h" 3 extern "C" int renameat(int , const char * , int , const char * ) throw(); # 192 "/usr/include/stdio.h" 3 extern "C" FILE *tmpfile(); # 202 "/usr/include/stdio.h" 3 extern "C" FILE *tmpfile64(); # 206 "/usr/include/stdio.h" 3 extern "C" char *tmpnam(char * ) throw(); # 212 "/usr/include/stdio.h" 3 extern "C" char *tmpnam_r(char * ) throw(); # 224 "/usr/include/stdio.h" 3 extern "C" char *tempnam(const char * , const char * ) throw() # 225 "/usr/include/stdio.h" 3 __attribute((__malloc__)); # 234 "/usr/include/stdio.h" 3 extern "C" int fclose(FILE * ); # 239 "/usr/include/stdio.h" 3 extern "C" int fflush(FILE * ); # 249 "/usr/include/stdio.h" 3 extern "C" int fflush_unlocked(FILE * ); # 259 "/usr/include/stdio.h" 3 extern "C" int fcloseall(); # 269 "/usr/include/stdio.h" 3 extern "C" FILE *fopen(const char *__restrict__ , const char *__restrict__ ); # 275 "/usr/include/stdio.h" 3 extern "C" FILE *freopen(const char *__restrict__ , const char *__restrict__ , FILE *__restrict__ ); # 294 "/usr/include/stdio.h" 3 extern "C" FILE *fopen64(const char *__restrict__ , const char *__restrict__ ); # 296 "/usr/include/stdio.h" 3 extern "C" FILE *freopen64(const char *__restrict__ , const char *__restrict__ , FILE *__restrict__ ); # 303 "/usr/include/stdio.h" 3 extern "C" FILE *fdopen(int , const char * ) throw(); # 309 "/usr/include/stdio.h" 3 extern "C" FILE *fopencookie(void *__restrict__ , const char *__restrict__ , _IO_cookie_io_functions_t ) throw(); # 316 "/usr/include/stdio.h" 3 extern "C" FILE *fmemopen(void * , size_t , const char * ) throw(); # 322 "/usr/include/stdio.h" 3 extern "C" FILE *open_memstream(char ** , size_t * ) throw(); # 329 "/usr/include/stdio.h" 3 extern "C" void setbuf(FILE *__restrict__ , char *__restrict__ ) throw(); # 333 "/usr/include/stdio.h" 3 extern "C" int setvbuf(FILE *__restrict__ , char *__restrict__ , int , size_t ) throw(); # 340 "/usr/include/stdio.h" 3 extern "C" void setbuffer(FILE *__restrict__ , char *__restrict__ , size_t ) throw(); # 344 "/usr/include/stdio.h" 3 extern "C" void setlinebuf(FILE * ) throw(); # 353 "/usr/include/stdio.h" 3 extern "C" int fprintf(FILE *__restrict__ , const char *__restrict__ , ...); # 359 "/usr/include/stdio.h" 3 extern "C" int printf(const char *__restrict__ , ...); # 361 "/usr/include/stdio.h" 3 extern "C" int sprintf(char *__restrict__ , const char *__restrict__ , ...) throw(); # 368 "/usr/include/stdio.h" 3 extern "C" int vfprintf(FILE *__restrict__ , const char *__restrict__ , __gnuc_va_list ); # 374 "/usr/include/stdio.h" 3 extern "C" int vprintf(const char *__restrict__ , __gnuc_va_list ); # 376 "/usr/include/stdio.h" 3 extern "C" int vsprintf(char *__restrict__ , const char *__restrict__ , __gnuc_va_list ) throw(); # 383 "/usr/include/stdio.h" 3 extern "C" int snprintf(char *__restrict__ , size_t , const char *__restrict__ , ...) throw() # 385 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 3, 4))); # 387 "/usr/include/stdio.h" 3 extern "C" int vsnprintf(char *__restrict__ , size_t , const char *__restrict__ , __gnuc_va_list ) throw() # 389 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 3, 0))); # 396 "/usr/include/stdio.h" 3 extern "C" int vasprintf(char **__restrict__ , const char *__restrict__ , __gnuc_va_list ) throw() # 398 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 2, 0))); # 399 "/usr/include/stdio.h" 3 extern "C" int __asprintf(char **__restrict__ , const char *__restrict__ , ...) throw() # 401 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 2, 3))); # 402 "/usr/include/stdio.h" 3 extern "C" int asprintf(char **__restrict__ , const char *__restrict__ , ...) throw() # 404 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 2, 3))); # 414 "/usr/include/stdio.h" 3 extern "C" int vdprintf(int , const char *__restrict__ , __gnuc_va_list ) # 416 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 2, 0))); # 417 "/usr/include/stdio.h" 3 extern "C" int dprintf(int , const char *__restrict__ , ...) # 418 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 2, 3))); # 427 "/usr/include/stdio.h" 3 extern "C" int fscanf(FILE *__restrict__ , const char *__restrict__ , ...); # 433 "/usr/include/stdio.h" 3 extern "C" int scanf(const char *__restrict__ , ...); # 435 "/usr/include/stdio.h" 3 extern "C" int sscanf(const char *__restrict__ , const char *__restrict__ , ...) throw(); # 473 "/usr/include/stdio.h" 3 extern "C" int vfscanf(FILE *__restrict__ , const char *__restrict__ , __gnuc_va_list ) # 475 "/usr/include/stdio.h" 3 __attribute((__format__(__scanf__, 2, 0))); # 481 "/usr/include/stdio.h" 3 extern "C" int vscanf(const char *__restrict__ , __gnuc_va_list ) # 482 "/usr/include/stdio.h" 3 __attribute((__format__(__scanf__, 1, 0))); # 485 "/usr/include/stdio.h" 3 extern "C" int vsscanf(const char *__restrict__ , const char *__restrict__ , __gnuc_va_list ) throw() # 487 "/usr/include/stdio.h" 3 __attribute((__format__(__scanf__, 2, 0))); # 533 "/usr/include/stdio.h" 3 extern "C" int fgetc(FILE * ); # 534 "/usr/include/stdio.h" 3 extern "C" int getc(FILE * ); # 540 "/usr/include/stdio.h" 3 extern "C" int getchar(); # 552 "/usr/include/stdio.h" 3 extern "C" int getc_unlocked(FILE * ); # 553 "/usr/include/stdio.h" 3 extern "C" int getchar_unlocked(); # 563 "/usr/include/stdio.h" 3 extern "C" int fgetc_unlocked(FILE * ); # 575 "/usr/include/stdio.h" 3 extern "C" int fputc(int , FILE * ); # 576 "/usr/include/stdio.h" 3 extern "C" int putc(int , FILE * ); # 582 "/usr/include/stdio.h" 3 extern "C" int putchar(int ); # 596 "/usr/include/stdio.h" 3 extern "C" int fputc_unlocked(int , FILE * ); # 604 "/usr/include/stdio.h" 3 extern "C" int putc_unlocked(int , FILE * ); # 605 "/usr/include/stdio.h" 3 extern "C" int putchar_unlocked(int ); # 612 "/usr/include/stdio.h" 3 extern "C" int getw(FILE * ); # 615 "/usr/include/stdio.h" 3 extern "C" int putw(int , FILE * ); # 624 "/usr/include/stdio.h" 3 extern "C" char *fgets(char *__restrict__ , int , FILE *__restrict__ ); # 632 "/usr/include/stdio.h" 3 extern "C" char *gets(char * ); # 642 "/usr/include/stdio.h" 3 extern "C" char *fgets_unlocked(char *__restrict__ , int , FILE *__restrict__ ); # 658 "/usr/include/stdio.h" 3 extern "C" __ssize_t __getdelim(char **__restrict__ , size_t *__restrict__ , int , FILE *__restrict__ ); # 661 "/usr/include/stdio.h" 3 extern "C" __ssize_t getdelim(char **__restrict__ , size_t *__restrict__ , int , FILE *__restrict__ ); # 671 "/usr/include/stdio.h" 3 extern "C" __ssize_t getline(char **__restrict__ , size_t *__restrict__ , FILE *__restrict__ ); # 682 "/usr/include/stdio.h" 3 extern "C" int fputs(const char *__restrict__ , FILE *__restrict__ ); # 688 "/usr/include/stdio.h" 3 extern "C" int puts(const char * ); # 695 "/usr/include/stdio.h" 3 extern "C" int ungetc(int , FILE * ); # 702 "/usr/include/stdio.h" 3 extern "C" size_t fread(void *__restrict__ , size_t , size_t , FILE *__restrict__ ); # 708 "/usr/include/stdio.h" 3 extern "C" size_t fwrite(const void *__restrict__ , size_t , size_t , FILE *__restrict__ ); # 719 "/usr/include/stdio.h" 3 extern "C" int fputs_unlocked(const char *__restrict__ , FILE *__restrict__ ); # 730 "/usr/include/stdio.h" 3 extern "C" size_t fread_unlocked(void *__restrict__ , size_t , size_t , FILE *__restrict__ ); # 732 "/usr/include/stdio.h" 3 extern "C" size_t fwrite_unlocked(const void *__restrict__ , size_t , size_t , FILE *__restrict__ ); # 742 "/usr/include/stdio.h" 3 extern "C" int fseek(FILE * , long , int ); # 747 "/usr/include/stdio.h" 3 extern "C" long ftell(FILE * ); # 752 "/usr/include/stdio.h" 3 extern "C" void rewind(FILE * ); # 766 "/usr/include/stdio.h" 3 extern "C" int fseeko(FILE * , __off_t , int ); # 771 "/usr/include/stdio.h" 3 extern "C" __off_t ftello(FILE * ); # 791 "/usr/include/stdio.h" 3 extern "C" int fgetpos(FILE *__restrict__ , fpos_t *__restrict__ ); # 796 "/usr/include/stdio.h" 3 extern "C" int fsetpos(FILE * , const fpos_t * ); # 811 "/usr/include/stdio.h" 3 extern "C" int fseeko64(FILE * , __off64_t , int ); # 812 "/usr/include/stdio.h" 3 extern "C" __off64_t ftello64(FILE * ); # 813 "/usr/include/stdio.h" 3 extern "C" int fgetpos64(FILE *__restrict__ , fpos64_t *__restrict__ ); # 814 "/usr/include/stdio.h" 3 extern "C" int fsetpos64(FILE * , const fpos64_t * ); # 819 "/usr/include/stdio.h" 3 extern "C" void clearerr(FILE * ) throw(); # 821 "/usr/include/stdio.h" 3 extern "C" int feof(FILE * ) throw(); # 823 "/usr/include/stdio.h" 3 extern "C" int ferror(FILE * ) throw(); # 828 "/usr/include/stdio.h" 3 extern "C" void clearerr_unlocked(FILE * ) throw(); # 829 "/usr/include/stdio.h" 3 extern "C" int feof_unlocked(FILE * ) throw(); # 830 "/usr/include/stdio.h" 3 extern "C" int ferror_unlocked(FILE * ) throw(); # 839 "/usr/include/stdio.h" 3 extern "C" void perror(const char * ); # 27 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern int sys_nerr; } # 28 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern const char *const sys_errlist[]; } # 31 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern int _sys_nerr; } # 32 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern const char *const _sys_errlist[]; } # 851 "/usr/include/stdio.h" 3 extern "C" int fileno(FILE * ) throw(); # 856 "/usr/include/stdio.h" 3 extern "C" int fileno_unlocked(FILE * ) throw(); # 866 "/usr/include/stdio.h" 3 extern "C" FILE *popen(const char * , const char * ); # 872 "/usr/include/stdio.h" 3 extern "C" int pclose(FILE * ); # 878 "/usr/include/stdio.h" 3 extern "C" char *ctermid(char * ) throw(); # 884 "/usr/include/stdio.h" 3 extern "C" char *cuserid(char * ); # 889 "/usr/include/stdio.h" 3 struct obstack; # 892 "/usr/include/stdio.h" 3 extern "C" int obstack_printf(obstack *__restrict__ , const char *__restrict__ , ...) throw() # 894 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 2, 3))); # 895 "/usr/include/stdio.h" 3 extern "C" int obstack_vprintf(obstack *__restrict__ , const char *__restrict__ , __gnuc_va_list ) throw() # 898 "/usr/include/stdio.h" 3 __attribute((__format__(__printf__, 2, 0))); # 906 "/usr/include/stdio.h" 3 extern "C" void flockfile(FILE * ) throw(); # 910 "/usr/include/stdio.h" 3 extern "C" int ftrylockfile(FILE * ) throw(); # 913 "/usr/include/stdio.h" 3 extern "C" void funlockfile(FILE * ) throw(); # 157 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef unsigned long long CUdeviceptr; } # 164 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef int CUdevice; } # 165 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef struct CUctx_st *CUcontext; } # 166 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef struct CUmod_st *CUmodule; } # 167 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef struct CUfunc_st *CUfunction; } # 168 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef struct CUarray_st *CUarray; } # 169 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef struct CUtexref_st *CUtexref; } # 170 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef struct CUsurfref_st *CUsurfref; } # 171 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef CUevent_st *CUevent; } # 172 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef CUstream_st *CUstream; } # 173 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef struct CUgraphicsResource_st *CUgraphicsResource; } # 177 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 175 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUuuid_st { # 176 "/usr/local/cuda4.1/cuda/include/cuda.h" char bytes[16]; # 177 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUuuid; } # 189 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 187 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUipcEventHandle_st { # 188 "/usr/local/cuda4.1/cuda/include/cuda.h" char reserved[64]; # 189 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUipcEventHandle; } # 193 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 191 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUipcMemHandle_st { # 192 "/usr/local/cuda4.1/cuda/include/cuda.h" char reserved[64]; # 193 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUipcMemHandle; } # 212 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 200 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUctx_flags_enum { # 201 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_SCHED_AUTO, # 202 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_SCHED_SPIN, # 203 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_SCHED_YIELD, # 204 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_SCHED_BLOCKING_SYNC = 4, # 205 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_BLOCKING_SYNC = 4, # 208 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_SCHED_MASK = 7, # 209 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_MAP_HOST, # 210 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_LMEM_RESIZE_TO_MAX = 16, # 211 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CTX_FLAGS_MASK = 31 # 212 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUctx_flags; } # 222 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 217 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUevent_flags_enum { # 218 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_EVENT_DEFAULT, # 219 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_EVENT_BLOCKING_SYNC, # 220 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_EVENT_DISABLE_TIMING, # 221 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_EVENT_INTERPROCESS = 4 # 222 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUevent_flags; } # 236 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 227 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUarray_format_enum { # 228 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_UNSIGNED_INT8 = 1, # 229 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_UNSIGNED_INT16, # 230 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_UNSIGNED_INT32, # 231 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_SIGNED_INT8 = 8, # 232 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_SIGNED_INT16, # 233 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_SIGNED_INT32, # 234 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_HALF = 16, # 235 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_AD_FORMAT_FLOAT = 32 # 236 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUarray_format; } # 246 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 241 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUaddress_mode_enum { # 242 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TR_ADDRESS_MODE_WRAP, # 243 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TR_ADDRESS_MODE_CLAMP, # 244 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TR_ADDRESS_MODE_MIRROR, # 245 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TR_ADDRESS_MODE_BORDER # 246 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUaddress_mode; } # 254 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 251 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUfilter_mode_enum { # 252 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TR_FILTER_MODE_POINT, # 253 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TR_FILTER_MODE_LINEAR # 254 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUfilter_mode; } # 337 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 259 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUdevice_attribute_enum { # 260 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1, # 261 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, # 262 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, # 263 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, # 264 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, # 265 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, # 266 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, # 267 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, # 268 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = 8, # 269 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, # 270 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_WARP_SIZE, # 271 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_PITCH, # 272 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, # 273 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = 12, # 274 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_CLOCK_RATE, # 275 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, # 276 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, # 277 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, # 278 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, # 279 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_INTEGRATED, # 280 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, # 281 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_COMPUTE_MODE, # 282 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, # 283 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, # 284 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, # 285 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, # 286 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, # 287 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, # 288 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, # 289 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, # 290 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, # 291 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = 27, # 292 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT, # 293 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES, # 294 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT, # 295 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, # 296 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_ECC_ENABLED, # 297 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, # 298 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, # 299 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_TCC_DRIVER, # 300 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, # 301 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, # 302 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, # 303 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, # 304 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, # 305 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, # 306 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, # 307 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, # 308 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER, # 309 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, # 310 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, # 311 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, # 312 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, # 313 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, # 314 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, # 315 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, # 316 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, # 317 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, # 318 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, # 319 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, # 320 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, # 321 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, # 322 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, # 323 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, # 324 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, # 325 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, # 326 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, # 327 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, # 328 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, # 329 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, # 330 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, # 331 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, # 332 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, # 333 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, # 334 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, # 335 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, # 336 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH # 337 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUdevice_attribute; } # 353 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 342 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUdevprop_st { # 343 "/usr/local/cuda4.1/cuda/include/cuda.h" int maxThreadsPerBlock; # 344 "/usr/local/cuda4.1/cuda/include/cuda.h" int maxThreadsDim[3]; # 345 "/usr/local/cuda4.1/cuda/include/cuda.h" int maxGridSize[3]; # 346 "/usr/local/cuda4.1/cuda/include/cuda.h" int sharedMemPerBlock; # 347 "/usr/local/cuda4.1/cuda/include/cuda.h" int totalConstantMemory; # 348 "/usr/local/cuda4.1/cuda/include/cuda.h" int SIMDWidth; # 349 "/usr/local/cuda4.1/cuda/include/cuda.h" int memPitch; # 350 "/usr/local/cuda4.1/cuda/include/cuda.h" int regsPerBlock; # 351 "/usr/local/cuda4.1/cuda/include/cuda.h" int clockRate; # 352 "/usr/local/cuda4.1/cuda/include/cuda.h" int textureAlign; # 353 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUdevprop; } # 363 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 358 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUpointer_attribute_enum { # 359 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_POINTER_ATTRIBUTE_CONTEXT = 1, # 360 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_POINTER_ATTRIBUTE_MEMORY_TYPE, # 361 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_POINTER_ATTRIBUTE_DEVICE_POINTER, # 362 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_POINTER_ATTRIBUTE_HOST_POINTER # 363 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUpointer_attribute; } # 418 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 368 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUfunction_attribute_enum { # 374 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK, # 381 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES, # 387 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES, # 392 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES, # 397 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_NUM_REGS, # 406 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_PTX_VERSION, # 415 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_BINARY_VERSION, # 417 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_ATTRIBUTE_MAX # 418 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUfunction_attribute; } # 428 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 423 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUfunc_cache_enum { # 424 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_CACHE_PREFER_NONE, # 425 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_CACHE_PREFER_SHARED, # 426 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_CACHE_PREFER_L1, # 427 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_FUNC_CACHE_PREFER_EQUAL # 428 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUfunc_cache; } # 438 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 433 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUmemorytype_enum { # 434 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_MEMORYTYPE_HOST = 1, # 435 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_MEMORYTYPE_DEVICE, # 436 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_MEMORYTYPE_ARRAY, # 437 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_MEMORYTYPE_UNIFIED # 438 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUmemorytype; } # 448 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 443 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUcomputemode_enum { # 444 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_COMPUTEMODE_DEFAULT, # 445 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_COMPUTEMODE_EXCLUSIVE, # 446 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_COMPUTEMODE_PROHIBITED, # 447 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_COMPUTEMODE_EXCLUSIVE_PROCESS # 448 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUcomputemode; } # 540 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 453 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUjit_option_enum { # 459 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_MAX_REGISTERS, # 472 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_THREADS_PER_BLOCK, # 479 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_WALL_TIME, # 487 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_INFO_LOG_BUFFER, # 495 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, # 503 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_ERROR_LOG_BUFFER, # 511 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, # 518 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_OPTIMIZATION_LEVEL, # 525 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_TARGET_FROM_CUCONTEXT, # 531 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_TARGET, # 538 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_JIT_FALLBACK_STRATEGY # 540 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUjit_option; } # 553 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 545 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUjit_target_enum { # 547 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TARGET_COMPUTE_10, # 548 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TARGET_COMPUTE_11, # 549 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TARGET_COMPUTE_12, # 550 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TARGET_COMPUTE_13, # 551 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TARGET_COMPUTE_20, # 552 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_TARGET_COMPUTE_21 # 553 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUjit_target; } # 564 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 558 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUjit_fallback_enum { # 560 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_PREFER_PTX, # 562 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_PREFER_BINARY # 564 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUjit_fallback; } # 575 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 569 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUgraphicsRegisterFlags_enum { # 570 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_REGISTER_FLAGS_NONE, # 571 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY, # 572 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD, # 573 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 4, # 574 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8 # 575 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUgraphicsRegisterFlags; } # 584 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 580 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUgraphicsMapResourceFlags_enum { # 581 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE, # 582 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY, # 583 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD # 584 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUgraphicsMapResourceFlags; } # 596 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 589 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUarray_cubemap_face_enum { # 590 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CUBEMAP_FACE_POSITIVE_X, # 591 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CUBEMAP_FACE_NEGATIVE_X, # 592 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CUBEMAP_FACE_POSITIVE_Y, # 593 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CUBEMAP_FACE_NEGATIVE_Y, # 594 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CUBEMAP_FACE_POSITIVE_Z, # 595 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_CUBEMAP_FACE_NEGATIVE_Z # 596 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUarray_cubemap_face; } # 605 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 601 "/usr/local/cuda4.1/cuda/include/cuda.h" enum CUlimit_enum { # 602 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_LIMIT_STACK_SIZE, # 603 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_LIMIT_PRINTF_FIFO_SIZE, # 604 "/usr/local/cuda4.1/cuda/include/cuda.h" CU_LIMIT_MALLOC_HEAP_SIZE # 605 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUlimit; } # 914 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 610 "/usr/local/cuda4.1/cuda/include/cuda.h" enum cudaError_enum { # 616 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_SUCCESS, # 622 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_INVALID_VALUE, # 628 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_OUT_OF_MEMORY, # 634 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NOT_INITIALIZED, # 639 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_DEINITIALIZED, # 645 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_PROFILER_DISABLED, # 650 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_PROFILER_NOT_INITIALIZED, # 655 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_PROFILER_ALREADY_STARTED, # 660 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_PROFILER_ALREADY_STOPPED, # 665 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NO_DEVICE = 100, # 671 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_INVALID_DEVICE, # 678 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_INVALID_IMAGE = 200, # 688 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_INVALID_CONTEXT, # 697 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_CONTEXT_ALREADY_CURRENT, # 702 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_MAP_FAILED = 205, # 707 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_UNMAP_FAILED, # 713 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_ARRAY_IS_MAPPED, # 718 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_ALREADY_MAPPED, # 726 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NO_BINARY_FOR_GPU, # 731 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_ALREADY_ACQUIRED, # 736 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NOT_MAPPED, # 742 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NOT_MAPPED_AS_ARRAY, # 748 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NOT_MAPPED_AS_POINTER, # 754 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_ECC_UNCORRECTABLE, # 760 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_UNSUPPORTED_LIMIT, # 767 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_CONTEXT_ALREADY_IN_USE, # 772 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_INVALID_SOURCE = 300, # 777 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_FILE_NOT_FOUND, # 782 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND, # 787 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_SHARED_OBJECT_INIT_FAILED, # 792 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_OPERATING_SYSTEM, # 799 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_INVALID_HANDLE = 400, # 806 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NOT_FOUND = 500, # 815 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_NOT_READY = 600, # 826 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_LAUNCH_FAILED = 700, # 837 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, # 848 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_LAUNCH_TIMEOUT, # 854 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, # 861 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED, # 868 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_PEER_ACCESS_NOT_ENABLED, # 874 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 708, # 881 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_CONTEXT_IS_DESTROYED, # 889 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_ASSERT, # 896 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_TOO_MANY_PEERS, # 902 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED, # 908 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED, # 913 "/usr/local/cuda4.1/cuda/include/cuda.h" CUDA_ERROR_UNKNOWN = 999 # 914 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUresult; } # 976 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 955 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUDA_MEMCPY2D_st { # 956 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcXInBytes; # 957 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcY; # 959 "/usr/local/cuda4.1/cuda/include/cuda.h" CUmemorytype srcMemoryType; # 960 "/usr/local/cuda4.1/cuda/include/cuda.h" const void *srcHost; # 961 "/usr/local/cuda4.1/cuda/include/cuda.h" CUdeviceptr srcDevice; # 962 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray srcArray; # 963 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcPitch; # 965 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstXInBytes; # 966 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstY; # 968 "/usr/local/cuda4.1/cuda/include/cuda.h" CUmemorytype dstMemoryType; # 969 "/usr/local/cuda4.1/cuda/include/cuda.h" void *dstHost; # 970 "/usr/local/cuda4.1/cuda/include/cuda.h" CUdeviceptr dstDevice; # 971 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray dstArray; # 972 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstPitch; # 974 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t WidthInBytes; # 975 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Height; # 976 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUDA_MEMCPY2D; } # 1009 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 981 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUDA_MEMCPY3D_st { # 982 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcXInBytes; # 983 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcY; # 984 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcZ; # 985 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcLOD; # 986 "/usr/local/cuda4.1/cuda/include/cuda.h" CUmemorytype srcMemoryType; # 987 "/usr/local/cuda4.1/cuda/include/cuda.h" const void *srcHost; # 988 "/usr/local/cuda4.1/cuda/include/cuda.h" CUdeviceptr srcDevice; # 989 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray srcArray; # 990 "/usr/local/cuda4.1/cuda/include/cuda.h" void *reserved0; # 991 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcPitch; # 992 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcHeight; # 994 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstXInBytes; # 995 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstY; # 996 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstZ; # 997 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstLOD; # 998 "/usr/local/cuda4.1/cuda/include/cuda.h" CUmemorytype dstMemoryType; # 999 "/usr/local/cuda4.1/cuda/include/cuda.h" void *dstHost; # 1000 "/usr/local/cuda4.1/cuda/include/cuda.h" CUdeviceptr dstDevice; # 1001 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray dstArray; # 1002 "/usr/local/cuda4.1/cuda/include/cuda.h" void *reserved1; # 1003 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstPitch; # 1004 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstHeight; # 1006 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t WidthInBytes; # 1007 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Height; # 1008 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Depth; # 1009 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUDA_MEMCPY3D; } # 1042 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 1014 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUDA_MEMCPY3D_PEER_st { # 1015 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcXInBytes; # 1016 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcY; # 1017 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcZ; # 1018 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcLOD; # 1019 "/usr/local/cuda4.1/cuda/include/cuda.h" CUmemorytype srcMemoryType; # 1020 "/usr/local/cuda4.1/cuda/include/cuda.h" const void *srcHost; # 1021 "/usr/local/cuda4.1/cuda/include/cuda.h" CUdeviceptr srcDevice; # 1022 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray srcArray; # 1023 "/usr/local/cuda4.1/cuda/include/cuda.h" CUcontext srcContext; # 1024 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcPitch; # 1025 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t srcHeight; # 1027 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstXInBytes; # 1028 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstY; # 1029 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstZ; # 1030 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstLOD; # 1031 "/usr/local/cuda4.1/cuda/include/cuda.h" CUmemorytype dstMemoryType; # 1032 "/usr/local/cuda4.1/cuda/include/cuda.h" void *dstHost; # 1033 "/usr/local/cuda4.1/cuda/include/cuda.h" CUdeviceptr dstDevice; # 1034 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray dstArray; # 1035 "/usr/local/cuda4.1/cuda/include/cuda.h" CUcontext dstContext; # 1036 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstPitch; # 1037 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t dstHeight; # 1039 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t WidthInBytes; # 1040 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Height; # 1041 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Depth; # 1042 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUDA_MEMCPY3D_PEER; } # 1054 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 1047 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUDA_ARRAY_DESCRIPTOR_st { # 1049 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Width; # 1050 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Height; # 1052 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray_format Format; # 1053 "/usr/local/cuda4.1/cuda/include/cuda.h" unsigned NumChannels; # 1054 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUDA_ARRAY_DESCRIPTOR; } # 1068 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" { typedef # 1059 "/usr/local/cuda4.1/cuda/include/cuda.h" struct CUDA_ARRAY3D_DESCRIPTOR_st { # 1061 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Width; # 1062 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Height; # 1063 "/usr/local/cuda4.1/cuda/include/cuda.h" size_t Depth; # 1065 "/usr/local/cuda4.1/cuda/include/cuda.h" CUarray_format Format; # 1066 "/usr/local/cuda4.1/cuda/include/cuda.h" unsigned NumChannels; # 1067 "/usr/local/cuda4.1/cuda/include/cuda.h" unsigned Flags; # 1068 "/usr/local/cuda4.1/cuda/include/cuda.h" } CUDA_ARRAY3D_DESCRIPTOR; } # 1195 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuInit(unsigned ); # 1222 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDriverGetVersion(int * ); # 1260 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceGet(CUdevice * , int ); # 1286 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceGetCount(int * ); # 1315 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceGetName(char * , int , CUdevice ); # 1344 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceComputeCapability(int * , int * , CUdevice ); # 1372 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceTotalMem_v2(size_t * , CUdevice ); # 1432 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceGetProperties(CUdevprop * , CUdevice ); # 1597 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceGetAttribute(int * , CUdevice_attribute , CUdevice ); # 1697 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxCreate_v2(CUcontext * , unsigned , CUdevice ); # 1736 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxDestroy_v2(CUcontext ); # 1786 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxAttach(CUcontext * , unsigned ); # 1821 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxDetach(CUcontext ); # 1857 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxPushCurrent_v2(CUcontext ); # 1890 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxPopCurrent_v2(CUcontext * ); # 1916 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxSetCurrent(CUcontext ); # 1935 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxGetCurrent(CUcontext * ); # 1964 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxGetDevice(CUdevice * ); # 1992 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxSynchronize(); # 2053 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxSetLimit(CUlimit , size_t ); # 2086 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxGetLimit(size_t * , CUlimit ); # 2128 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxGetCacheConfig(CUfunc_cache * ); # 2177 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxSetCacheConfig(CUfunc_cache ); # 2212 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxGetApiVersion(CUcontext , unsigned * ); # 2261 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleLoad(CUmodule * , const char * ); # 2295 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleLoadData(CUmodule * , const void * ); # 2374 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleLoadDataEx(CUmodule * , const void * , unsigned , CUjit_option * , void ** ); # 2414 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleLoadFatBinary(CUmodule * , const void * ); # 2439 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleUnload(CUmodule ); # 2469 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleGetFunction(CUfunction * , CUmodule , const char * ); # 2503 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleGetGlobal_v2(CUdeviceptr * , size_t * , CUmodule , const char * ); # 2537 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleGetTexRef(CUtexref * , CUmodule , const char * ); # 2568 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuModuleGetSurfRef(CUsurfref * , CUmodule , const char * ); # 2611 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemGetInfo_v2(size_t * , size_t * ); # 2644 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemAlloc_v2(CUdeviceptr * , size_t ); # 2705 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemAllocPitch_v2(CUdeviceptr * , size_t * , size_t , size_t , unsigned ); # 2734 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemFree_v2(CUdeviceptr ); # 2767 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemGetAddressRange_v2(CUdeviceptr * , size_t * , CUdeviceptr ); # 2813 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemAllocHost_v2(void ** , size_t ); # 2843 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemFreeHost(void * ); # 2925 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemHostAlloc(void ** , size_t , unsigned ); # 2963 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemHostGetDevicePointer_v2(CUdeviceptr * , void * , unsigned ); # 2988 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemHostGetFlags(unsigned * , void * ); # 3015 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceGetByPCIBusId(CUdevice * , char * ); # 3043 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceGetPCIBusId(char * , int , CUdevice ); # 3082 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuIpcGetEventHandle(CUipcEventHandle * , CUevent ); # 3115 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuIpcOpenEventHandle(CUevent * , CUipcEventHandle ); # 3149 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuIpcGetMemHandle(CUipcMemHandle * , CUdeviceptr ); # 3188 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuIpcOpenMemHandle(CUdeviceptr * , CUipcMemHandle ); # 3216 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuIpcCloseMemHandle(CUdeviceptr ); # 3278 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemHostRegister(void * , size_t , unsigned ); # 3301 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemHostUnregister(void * ); # 3337 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy(CUdeviceptr , CUdeviceptr , size_t ); # 3370 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyPeer(CUdeviceptr , CUcontext , CUdeviceptr , CUcontext , size_t ); # 3406 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyHtoD_v2(CUdeviceptr , const void * , size_t ); # 3439 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyDtoH_v2(void * , CUdeviceptr , size_t ); # 3472 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyDtoD_v2(CUdeviceptr , CUdeviceptr , size_t ); # 3506 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyDtoA_v2(CUarray , size_t , CUdeviceptr , size_t ); # 3542 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyAtoD_v2(CUdeviceptr , CUarray , size_t , size_t ); # 3576 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyHtoA_v2(CUarray , size_t , const void * , size_t ); # 3610 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyAtoH_v2(void * , CUarray , size_t , size_t ); # 3648 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyAtoA_v2(CUarray , size_t , CUarray , size_t , size_t ); # 3808 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy2D_v2(const CUDA_MEMCPY2D * ); # 3966 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D * ); # 4133 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy3D_v2(const CUDA_MEMCPY3D * ); # 4164 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER * ); # 4204 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyAsync(CUdeviceptr , CUdeviceptr , size_t , CUstream ); # 4235 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyPeerAsync(CUdeviceptr , CUcontext , CUdeviceptr , CUcontext , size_t , CUstream ); # 4277 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyHtoDAsync_v2(CUdeviceptr , const void * , size_t , CUstream ); # 4317 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyDtoHAsync_v2(void * , CUdeviceptr , size_t , CUstream ); # 4354 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyDtoDAsync_v2(CUdeviceptr , CUdeviceptr , size_t , CUstream ); # 4396 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyHtoAAsync_v2(CUarray , size_t , const void * , size_t , CUstream ); # 4438 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpyAtoHAsync_v2(void * , CUarray , size_t , size_t , CUstream ); # 4609 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D * , CUstream ); # 4784 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D * , CUstream ); # 4809 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER * , CUstream ); # 4844 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD8_v2(CUdeviceptr , unsigned char , size_t ); # 4877 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD16_v2(CUdeviceptr , unsigned short , size_t ); # 4910 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD32_v2(CUdeviceptr , unsigned , size_t ); # 4948 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD2D8_v2(CUdeviceptr , size_t , unsigned char , size_t , size_t ); # 4987 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD2D16_v2(CUdeviceptr , size_t , unsigned short , size_t , size_t ); # 5026 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD2D32_v2(CUdeviceptr , size_t , unsigned , size_t , size_t ); # 5063 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD8Async(CUdeviceptr , unsigned char , size_t , CUstream ); # 5100 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD16Async(CUdeviceptr , unsigned short , size_t , CUstream ); # 5136 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD32Async(CUdeviceptr , unsigned , size_t , CUstream ); # 5178 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD2D8Async(CUdeviceptr , size_t , unsigned char , size_t , size_t , CUstream ); # 5221 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD2D16Async(CUdeviceptr , size_t , unsigned short , size_t , size_t , CUstream ); # 5264 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuMemsetD2D32Async(CUdeviceptr , size_t , unsigned , size_t , size_t , CUstream ); # 5367 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuArrayCreate_v2(CUarray * , const CUDA_ARRAY_DESCRIPTOR * ); # 5400 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR * , CUarray ); # 5431 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuArrayDestroy(CUarray ); # 5611 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuArray3DCreate_v2(CUarray * , const CUDA_ARRAY3D_DESCRIPTOR * ); # 5647 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR * , CUarray ); # 5854 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuPointerGetAttribute(void * , CUpointer_attribute , CUdeviceptr ); # 5891 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuStreamCreate(CUstream * , unsigned ); # 5933 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuStreamWaitEvent(CUstream , CUevent , unsigned ); # 5957 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuStreamQuery(CUstream ); # 5982 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuStreamSynchronize(CUstream ); # 6010 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuStreamDestroy_v2(CUstream ); # 6059 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuEventCreate(CUevent * , unsigned ); # 6097 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuEventRecord(CUevent , CUstream ); # 6128 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuEventQuery(CUevent ); # 6162 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuEventSynchronize(CUevent ); # 6191 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuEventDestroy_v2(CUevent ); # 6235 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuEventElapsedTime(float * , CUevent , CUevent ); # 6298 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuFuncGetAttribute(int * , CUfunction_attribute , CUfunction ); # 6340 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuFuncSetCacheConfig(CUfunction , CUfunc_cache ); # 6456 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuLaunchKernel(CUfunction , unsigned , unsigned , unsigned , unsigned , unsigned , unsigned , unsigned , CUstream , void ** , void ** ); # 6512 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuFuncSetBlockShape(CUfunction , int , int , int ); # 6546 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuFuncSetSharedSize(CUfunction , unsigned ); # 6578 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuParamSetSize(CUfunction , unsigned ); # 6611 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuParamSeti(CUfunction , int , unsigned ); # 6644 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuParamSetf(CUfunction , int , float ); # 6679 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuParamSetv(CUfunction , int , void * , unsigned ); # 6716 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuLaunch(CUfunction ); # 6755 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuLaunchGrid(CUfunction , int , int ); # 6799 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuLaunchGridAsync(CUfunction , int , int , CUstream ); # 6824 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuParamSetTexRef(CUfunction , int , CUtexref ); # 6865 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefSetArray(CUtexref , CUarray , unsigned ); # 6909 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefSetAddress_v2(size_t * , CUtexref , CUdeviceptr , size_t ); # 6961 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefSetAddress2D_v3(CUtexref , const CUDA_ARRAY_DESCRIPTOR * , CUdeviceptr , size_t ); # 6990 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefSetFormat(CUtexref , CUarray_format , int ); # 7030 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefSetAddressMode(CUtexref , int , CUaddress_mode ); # 7063 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefSetFilterMode(CUtexref , CUfilter_mode ); # 7098 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefSetFlags(CUtexref , unsigned ); # 7124 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefGetAddress_v2(CUdeviceptr * , CUtexref ); # 7150 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefGetArray(CUarray * , CUtexref ); # 7176 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefGetAddressMode(CUaddress_mode * , CUtexref , int ); # 7200 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefGetFilterMode(CUfilter_mode * , CUtexref ); # 7226 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefGetFormat(CUarray_format * , int * , CUtexref ); # 7249 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefGetFlags(unsigned * , CUtexref ); # 7283 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefCreate(CUtexref * ); # 7303 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuTexRefDestroy(CUtexref ); # 7341 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuSurfRefSetArray(CUsurfref , CUarray , unsigned ); # 7362 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuSurfRefGetArray(CUarray * , CUsurfref ); # 7400 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuDeviceCanAccessPeer(int * , CUdevice , CUdevice ); # 7447 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxEnablePeerAccess(CUcontext , unsigned ); # 7472 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuCtxDisablePeerAccess(CUcontext ); # 7513 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuGraphicsUnregisterResource(CUgraphicsResource ); # 7551 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuGraphicsSubResourceGetMappedArray(CUarray * , CUgraphicsResource , unsigned , unsigned ); # 7585 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr * , size_t * , CUgraphicsResource ); # 7626 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource , unsigned ); # 7664 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuGraphicsMapResources(unsigned , CUgraphicsResource * , CUstream ); # 7699 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuGraphicsUnmapResources(unsigned , CUgraphicsResource * , CUstream ); # 7703 "/usr/local/cuda4.1/cuda/include/cuda.h" extern "C" CUresult cuGetExportTable(const void ** , const CUuuid * ); # 60 "./sdk/cutil.h" enum CUTBoolean { # 62 "./sdk/cutil.h" CUTFalse, # 63 "./sdk/cutil.h" CUTTrue # 64 "./sdk/cutil.h" }; # 72 "./sdk/cutil.h" extern "C" void cutFree(void * ); # 90 "./sdk/cutil.h" extern "C" void cutCheckBankAccess(unsigned , unsigned , unsigned , unsigned , unsigned , unsigned , const char * , const int , const char * , const int ); # 103 "./sdk/cutil.h" extern "C" char *cutFindFilePath(const char * , const char * ); # 118 "./sdk/cutil.h" extern "C" CUTBoolean cutReadFilef(const char * , float ** , unsigned * , bool = false); # 134 "./sdk/cutil.h" extern "C" CUTBoolean cutReadFiled(const char * , double ** , unsigned * , bool = false); # 150 "./sdk/cutil.h" extern "C" CUTBoolean cutReadFilei(const char * , int ** , unsigned * , bool = false); # 165 "./sdk/cutil.h" extern "C" CUTBoolean cutReadFileui(const char * , unsigned ** , unsigned * , bool = false); # 181 "./sdk/cutil.h" extern "C" CUTBoolean cutReadFileb(const char * , char ** , unsigned * , bool = false); # 197 "./sdk/cutil.h" extern "C" CUTBoolean cutReadFileub(const char * , unsigned char ** , unsigned * , bool = false); # 211 "./sdk/cutil.h" extern "C" CUTBoolean cutWriteFilef(const char * , const float * , unsigned , const float , bool = false); # 225 "./sdk/cutil.h" extern "C" CUTBoolean cutWriteFiled(const char * , const float * , unsigned , const double , bool = false); # 237 "./sdk/cutil.h" extern "C" CUTBoolean cutWriteFilei(const char * , const int * , unsigned , bool = false); # 249 "./sdk/cutil.h" extern "C" CUTBoolean cutWriteFileui(const char * , const unsigned * , unsigned , bool = false); # 261 "./sdk/cutil.h" extern "C" CUTBoolean cutWriteFileb(const char * , const char * , unsigned , bool = false); # 273 "./sdk/cutil.h" extern "C" CUTBoolean cutWriteFileub(const char * , const unsigned char * , unsigned , bool = false); # 289 "./sdk/cutil.h" extern "C" CUTBoolean cutLoadPGMub(const char * , unsigned char ** , unsigned * , unsigned * ); # 302 "./sdk/cutil.h" extern "C" CUTBoolean cutLoadPPMub(const char * , unsigned char ** , unsigned * , unsigned * ); # 316 "./sdk/cutil.h" extern "C" CUTBoolean cutLoadPPM4ub(const char * , unsigned char ** , unsigned * , unsigned * ); # 332 "./sdk/cutil.h" extern "C" CUTBoolean cutLoadPGMi(const char * , unsigned ** , unsigned * , unsigned * ); # 348 "./sdk/cutil.h" extern "C" CUTBoolean cutLoadPGMs(const char * , unsigned short ** , unsigned * , unsigned * ); # 363 "./sdk/cutil.h" extern "C" CUTBoolean cutLoadPGMf(const char * , float ** , unsigned * , unsigned * ); # 375 "./sdk/cutil.h" extern "C" CUTBoolean cutSavePGMub(const char * , unsigned char * , unsigned , unsigned ); # 387 "./sdk/cutil.h" extern "C" CUTBoolean cutSavePPMub(const char * , unsigned char * , unsigned , unsigned ); # 400 "./sdk/cutil.h" extern "C" CUTBoolean cutSavePPM4ub(const char * , unsigned char * , unsigned , unsigned ); # 412 "./sdk/cutil.h" extern "C" CUTBoolean cutSavePGMi(const char * , unsigned * , unsigned , unsigned ); # 424 "./sdk/cutil.h" extern "C" CUTBoolean cutSavePGMs(const char * , unsigned short * , unsigned , unsigned ); # 436 "./sdk/cutil.h" extern "C" CUTBoolean cutSavePGMf(const char * , float * , unsigned , unsigned ); # 457 "./sdk/cutil.h" extern "C" CUTBoolean cutCheckCmdLineFlag(const int , const char ** , const char * ); # 471 "./sdk/cutil.h" extern "C" CUTBoolean cutGetCmdLineArgumenti(const int , const char ** , const char * , int * ); # 485 "./sdk/cutil.h" extern "C" CUTBoolean cutGetCmdLineArgumentf(const int , const char ** , const char * , float * ); # 499 "./sdk/cutil.h" extern "C" CUTBoolean cutGetCmdLineArgumentstr(const int , const char ** , const char * , char ** ); # 514 "./sdk/cutil.h" extern "C" CUTBoolean cutGetCmdLineArgumentListstr(const int , const char ** , const char * , char ** , unsigned * ); # 528 "./sdk/cutil.h" extern "C" CUTBoolean cutCheckCondition(int , const char * , const int ); # 540 "./sdk/cutil.h" extern "C" CUTBoolean cutComparef(const float * , const float * , const unsigned ); # 553 "./sdk/cutil.h" extern "C" CUTBoolean cutComparei(const int * , const int * , const unsigned ); # 567 "./sdk/cutil.h" extern "C" CUTBoolean cutCompareuit(const unsigned * , const unsigned * , const unsigned , const float , const float ); # 580 "./sdk/cutil.h" extern "C" CUTBoolean cutCompareub(const unsigned char * , const unsigned char * , const unsigned ); # 595 "./sdk/cutil.h" extern "C" CUTBoolean cutCompareubt(const unsigned char * , const unsigned char * , const unsigned , const float , const float ); # 609 "./sdk/cutil.h" extern "C" CUTBoolean cutCompareube(const unsigned char * , const unsigned char * , const unsigned , const float ); # 623 "./sdk/cutil.h" extern "C" CUTBoolean cutComparefe(const float * , const float * , const unsigned , const float ); # 638 "./sdk/cutil.h" extern "C" CUTBoolean cutComparefet(const float * , const float * , const unsigned , const float , const float ); # 653 "./sdk/cutil.h" extern "C" CUTBoolean cutCompareL2fe(const float * , const float * , const unsigned , const float ); # 668 "./sdk/cutil.h" extern "C" CUTBoolean cutComparePPM(const char * , const char * , const float , const float , bool = false); # 681 "./sdk/cutil.h" extern "C" CUTBoolean cutCreateTimer(unsigned * ); # 690 "./sdk/cutil.h" extern "C" CUTBoolean cutDeleteTimer(unsigned ); # 698 "./sdk/cutil.h" extern "C" CUTBoolean cutStartTimer(const unsigned ); # 706 "./sdk/cutil.h" extern "C" CUTBoolean cutStopTimer(const unsigned ); # 714 "./sdk/cutil.h" extern "C" CUTBoolean cutResetTimer(const unsigned ); # 723 "./sdk/cutil.h" extern "C" float cutGetTimerValue(const unsigned ); # 734 "./sdk/cutil.h" extern "C" float cutGetAverageTimerValue(const unsigned ); # 30 "./sdk/cutil_inline_bankchecker.h" inline void __cutilBankChecker(unsigned tidx, unsigned tidy, unsigned tidz, unsigned # 31 "./sdk/cutil_inline_bankchecker.h" bdimx, unsigned bdimy, unsigned bdimz, char * # 32 "./sdk/cutil_inline_bankchecker.h" aname, int index, char *file, int line) # 33 "./sdk/cutil_inline_bankchecker.h" { # 34 "./sdk/cutil_inline_bankchecker.h" cutCheckBankAccess(tidx, tidy, tidz, bdimx, bdimy, bdimz, file, line, aname, index); # 35 "./sdk/cutil_inline_bankchecker.h" } # 60 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { typedef float2 cuFloatComplex; } # 62 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline float cuCrealf(cuFloatComplex x) # 63 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 64 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return x.x; # 65 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 67 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline float cuCimagf(cuFloatComplex x) # 68 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 69 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return x.y; # 70 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 72 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuFloatComplex make_cuFloatComplex(float # 73 "/usr/local/cuda4.1/cuda/include/cuComplex.h" r, float i) # 74 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 75 "/usr/local/cuda4.1/cuda/include/cuComplex.h" cuFloatComplex res; # 76 "/usr/local/cuda4.1/cuda/include/cuComplex.h" (res.x) = r; # 77 "/usr/local/cuda4.1/cuda/include/cuComplex.h" (res.y) = i; # 78 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return res; # 79 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 81 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuFloatComplex cuConjf(cuFloatComplex x) # 82 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 83 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuFloatComplex(cuCrealf(x), -cuCimagf(x)); # 84 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 85 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuFloatComplex cuCaddf(cuFloatComplex x, cuFloatComplex # 86 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 87 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 88 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuFloatComplex(cuCrealf(x) + cuCrealf(y), cuCimagf(x) + cuCimagf(y)); # 90 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 92 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuFloatComplex cuCsubf(cuFloatComplex x, cuFloatComplex # 93 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 94 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 95 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuFloatComplex(cuCrealf(x) - cuCrealf(y), cuCimagf(x) - cuCimagf(y)); # 97 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 104 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuFloatComplex cuCmulf(cuFloatComplex x, cuFloatComplex # 105 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 106 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 107 "/usr/local/cuda4.1/cuda/include/cuComplex.h" cuFloatComplex prod; # 108 "/usr/local/cuda4.1/cuda/include/cuComplex.h" prod = make_cuFloatComplex((cuCrealf(x) * cuCrealf(y)) - (cuCimagf(x) * cuCimagf(y)), (cuCrealf(x) * cuCimagf(y)) + (cuCimagf(x) * cuCrealf(y))); # 112 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return prod; # 113 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 120 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuFloatComplex cuCdivf(cuFloatComplex x, cuFloatComplex # 121 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 122 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 123 "/usr/local/cuda4.1/cuda/include/cuComplex.h" cuFloatComplex quot; # 124 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float s = (fabsf(cuCrealf(y)) + fabsf(cuCimagf(y))); # 125 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float oos = ((1.0F) / s); # 126 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float ars = (cuCrealf(x) * oos); # 127 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float ais = (cuCimagf(x) * oos); # 128 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float brs = (cuCrealf(y) * oos); # 129 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float bis = (cuCimagf(y) * oos); # 130 "/usr/local/cuda4.1/cuda/include/cuComplex.h" s = ((brs * brs) + (bis * bis)); # 131 "/usr/local/cuda4.1/cuda/include/cuComplex.h" oos = ((1.0F) / s); # 132 "/usr/local/cuda4.1/cuda/include/cuComplex.h" quot = make_cuFloatComplex(((ars * brs) + (ais * bis)) * oos, ((ais * brs) - (ars * bis)) * oos); # 134 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return quot; # 135 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 145 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline float cuCabsf(cuFloatComplex x) # 146 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 147 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float a = cuCrealf(x); # 148 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float b = cuCimagf(x); # 149 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float v, w, t; # 150 "/usr/local/cuda4.1/cuda/include/cuComplex.h" a = fabsf(a); # 151 "/usr/local/cuda4.1/cuda/include/cuComplex.h" b = fabsf(b); # 152 "/usr/local/cuda4.1/cuda/include/cuComplex.h" if (a > b) { # 153 "/usr/local/cuda4.1/cuda/include/cuComplex.h" v = a; # 154 "/usr/local/cuda4.1/cuda/include/cuComplex.h" w = b; # 155 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } else { # 156 "/usr/local/cuda4.1/cuda/include/cuComplex.h" v = b; # 157 "/usr/local/cuda4.1/cuda/include/cuComplex.h" w = a; # 158 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 159 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = (w / v); # 160 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = ((1.0F) + (t * t)); # 161 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = (v * sqrtf(t)); # 162 "/usr/local/cuda4.1/cuda/include/cuComplex.h" if (((v == (0.0F)) || (v > (3.402823466e+38F))) || (w > (3.402823466e+38F))) { # 163 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = (v + w); # 164 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 165 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return t; # 166 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 169 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { typedef double2 cuDoubleComplex; } # 171 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline double cuCreal(cuDoubleComplex x) # 172 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 173 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return x.x; # 174 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 176 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline double cuCimag(cuDoubleComplex x) # 177 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 178 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return x.y; # 179 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 181 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuDoubleComplex make_cuDoubleComplex(double # 182 "/usr/local/cuda4.1/cuda/include/cuComplex.h" r, double i) # 183 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 184 "/usr/local/cuda4.1/cuda/include/cuComplex.h" cuDoubleComplex res; # 185 "/usr/local/cuda4.1/cuda/include/cuComplex.h" (res.x) = r; # 186 "/usr/local/cuda4.1/cuda/include/cuComplex.h" (res.y) = i; # 187 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return res; # 188 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 190 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuDoubleComplex cuConj(cuDoubleComplex x) # 191 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 192 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuDoubleComplex(cuCreal(x), -cuCimag(x)); # 193 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 195 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuDoubleComplex cuCadd(cuDoubleComplex x, cuDoubleComplex # 196 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 197 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 198 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuDoubleComplex(cuCreal(x) + cuCreal(y), cuCimag(x) + cuCimag(y)); # 200 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 202 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuDoubleComplex cuCsub(cuDoubleComplex x, cuDoubleComplex # 203 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 204 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 205 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuDoubleComplex(cuCreal(x) - cuCreal(y), cuCimag(x) - cuCimag(y)); # 207 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 214 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuDoubleComplex cuCmul(cuDoubleComplex x, cuDoubleComplex # 215 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 216 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 217 "/usr/local/cuda4.1/cuda/include/cuComplex.h" cuDoubleComplex prod; # 218 "/usr/local/cuda4.1/cuda/include/cuComplex.h" prod = make_cuDoubleComplex((cuCreal(x) * cuCreal(y)) - (cuCimag(x) * cuCimag(y)), (cuCreal(x) * cuCimag(y)) + (cuCimag(x) * cuCreal(y))); # 222 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return prod; # 223 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 230 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline cuDoubleComplex cuCdiv(cuDoubleComplex x, cuDoubleComplex # 231 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 232 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 233 "/usr/local/cuda4.1/cuda/include/cuComplex.h" cuDoubleComplex quot; # 234 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double s = (fabs(cuCreal(y)) + fabs(cuCimag(y))); # 235 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double oos = ((1.0) / s); # 236 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double ars = (cuCreal(x) * oos); # 237 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double ais = (cuCimag(x) * oos); # 238 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double brs = (cuCreal(y) * oos); # 239 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double bis = (cuCimag(y) * oos); # 240 "/usr/local/cuda4.1/cuda/include/cuComplex.h" s = ((brs * brs) + (bis * bis)); # 241 "/usr/local/cuda4.1/cuda/include/cuComplex.h" oos = ((1.0) / s); # 242 "/usr/local/cuda4.1/cuda/include/cuComplex.h" quot = make_cuDoubleComplex(((ars * brs) + (ais * bis)) * oos, ((ais * brs) - (ars * bis)) * oos); # 244 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return quot; # 245 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 253 "/usr/local/cuda4.1/cuda/include/cuComplex.h" extern "C" { static inline double cuCabs(cuDoubleComplex x) # 254 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 255 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double a = cuCreal(x); # 256 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double b = cuCimag(x); # 257 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double v, w, t; # 258 "/usr/local/cuda4.1/cuda/include/cuComplex.h" a = fabs(a); # 259 "/usr/local/cuda4.1/cuda/include/cuComplex.h" b = fabs(b); # 260 "/usr/local/cuda4.1/cuda/include/cuComplex.h" if (a > b) { # 261 "/usr/local/cuda4.1/cuda/include/cuComplex.h" v = a; # 262 "/usr/local/cuda4.1/cuda/include/cuComplex.h" w = b; # 263 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } else { # 264 "/usr/local/cuda4.1/cuda/include/cuComplex.h" v = b; # 265 "/usr/local/cuda4.1/cuda/include/cuComplex.h" w = a; # 266 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 267 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = (w / v); # 268 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = ((1.0) + (t * t)); # 269 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = (v * sqrt(t)); # 270 "/usr/local/cuda4.1/cuda/include/cuComplex.h" if (((v == (0.0)) || (v > (1.797693134862315708e+308))) || (w > (1.797693134862315708e+308))) # 271 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 272 "/usr/local/cuda4.1/cuda/include/cuComplex.h" t = (v + w); # 273 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 274 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return t; # 275 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } } # 282 "/usr/local/cuda4.1/cuda/include/cuComplex.h" typedef cuFloatComplex cuComplex; # 283 "/usr/local/cuda4.1/cuda/include/cuComplex.h" static inline cuComplex make_cuComplex(float x, float # 284 "/usr/local/cuda4.1/cuda/include/cuComplex.h" y) # 285 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 286 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuFloatComplex(x, y); # 287 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 290 "/usr/local/cuda4.1/cuda/include/cuComplex.h" static inline cuDoubleComplex cuComplexFloatToDouble(cuFloatComplex # 291 "/usr/local/cuda4.1/cuda/include/cuComplex.h" c) # 292 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 293 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuDoubleComplex((double)cuCrealf(c), (double)cuCimagf(c)); # 294 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 296 "/usr/local/cuda4.1/cuda/include/cuComplex.h" static inline cuFloatComplex cuComplexDoubleToFloat(cuDoubleComplex # 297 "/usr/local/cuda4.1/cuda/include/cuComplex.h" c) # 298 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 299 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuFloatComplex((float)cuCreal(c), (float)cuCimag(c)); # 300 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 303 "/usr/local/cuda4.1/cuda/include/cuComplex.h" static inline cuComplex cuCfmaf(cuComplex x, cuComplex y, cuComplex d) # 304 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 305 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float real_res; # 306 "/usr/local/cuda4.1/cuda/include/cuComplex.h" float imag_res; # 308 "/usr/local/cuda4.1/cuda/include/cuComplex.h" real_res = ((cuCrealf(x) * cuCrealf(y)) + cuCrealf(d)); # 309 "/usr/local/cuda4.1/cuda/include/cuComplex.h" imag_res = ((cuCrealf(x) * cuCimagf(y)) + cuCimagf(d)); # 311 "/usr/local/cuda4.1/cuda/include/cuComplex.h" real_res = ((-(cuCimagf(x) * cuCimagf(y))) + real_res); # 312 "/usr/local/cuda4.1/cuda/include/cuComplex.h" imag_res = ((cuCimagf(x) * cuCrealf(y)) + imag_res); # 314 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuComplex(real_res, imag_res); # 315 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 317 "/usr/local/cuda4.1/cuda/include/cuComplex.h" static inline cuDoubleComplex cuCfma(cuDoubleComplex x, cuDoubleComplex y, cuDoubleComplex d) # 318 "/usr/local/cuda4.1/cuda/include/cuComplex.h" { # 319 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double real_res; # 320 "/usr/local/cuda4.1/cuda/include/cuComplex.h" double imag_res; # 322 "/usr/local/cuda4.1/cuda/include/cuComplex.h" real_res = ((cuCreal(x) * cuCreal(y)) + cuCreal(d)); # 323 "/usr/local/cuda4.1/cuda/include/cuComplex.h" imag_res = ((cuCreal(x) * cuCimag(y)) + cuCimag(d)); # 325 "/usr/local/cuda4.1/cuda/include/cuComplex.h" real_res = ((-(cuCimag(x) * cuCimag(y))) + real_res); # 326 "/usr/local/cuda4.1/cuda/include/cuComplex.h" imag_res = ((cuCimag(x) * cuCreal(y)) + imag_res); # 328 "/usr/local/cuda4.1/cuda/include/cuComplex.h" return make_cuDoubleComplex(real_res, imag_res); # 329 "/usr/local/cuda4.1/cuda/include/cuComplex.h" } # 86 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef # 75 "/usr/local/cuda4.1/cuda/include/cufft.h" enum cufftResult_t { # 76 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_SUCCESS, # 77 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_INVALID_PLAN, # 78 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_ALLOC_FAILED, # 79 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_INVALID_TYPE, # 80 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_INVALID_VALUE, # 81 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_INTERNAL_ERROR, # 82 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_EXEC_FAILED, # 83 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_SETUP_FAILED, # 84 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_INVALID_SIZE, # 85 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_UNALIGNED_DATA # 86 "/usr/local/cuda4.1/cuda/include/cufft.h" } cufftResult; } # 91 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef unsigned cufftHandle; } # 95 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef float cufftReal; } # 96 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef double cufftDoubleReal; } # 101 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef cuComplex cufftComplex; } # 102 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef cuDoubleComplex cufftDoubleComplex; } # 116 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef # 109 "/usr/local/cuda4.1/cuda/include/cufft.h" enum cufftType_t { # 110 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_R2C = 42, # 111 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_C2R = 44, # 112 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_C2C = 41, # 113 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_D2Z = 106, # 114 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_Z2D = 108, # 115 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_Z2Z = 105 # 116 "/usr/local/cuda4.1/cuda/include/cufft.h" } cufftType; } # 145 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" { typedef # 140 "/usr/local/cuda4.1/cuda/include/cufft.h" enum cufftCompatibility_t { # 141 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_COMPATIBILITY_NATIVE, # 142 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_COMPATIBILITY_FFTW_PADDING, # 143 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC, # 144 "/usr/local/cuda4.1/cuda/include/cufft.h" CUFFT_COMPATIBILITY_FFTW_ALL # 145 "/usr/local/cuda4.1/cuda/include/cufft.h" } cufftCompatibility; } # 149 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftPlan1d(cufftHandle * , int , cufftType , int ); # 154 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftPlan2d(cufftHandle * , int , int , cufftType ); # 158 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftPlan3d(cufftHandle * , int , int , int , cufftType ); # 162 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftPlanMany(cufftHandle * , int , int * , int * , int , int , int * , int , int , cufftType , int ); # 170 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftDestroy(cufftHandle ); # 172 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftExecC2C(cufftHandle , cufftComplex * , cufftComplex * , int ); # 177 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftExecR2C(cufftHandle , cufftReal * , cufftComplex * ); # 181 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftExecC2R(cufftHandle , cufftComplex * , cufftReal * ); # 185 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftExecZ2Z(cufftHandle , cufftDoubleComplex * , cufftDoubleComplex * , int ); # 190 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftExecD2Z(cufftHandle , cufftDoubleReal * , cufftDoubleComplex * ); # 194 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftExecZ2D(cufftHandle , cufftDoubleComplex * , cufftDoubleReal * ); # 198 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftSetStream(cufftHandle , cudaStream_t ); # 201 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftSetCompatibilityMode(cufftHandle , cufftCompatibility ); # 204 "/usr/local/cuda4.1/cuda/include/cufft.h" extern "C" cufftResult cufftGetVersion(int * ); # 43 "./sdk/cutil_inline_runtime.h" inline void __cutilCondition(int val, char *file, int line) # 44 "./sdk/cutil_inline_runtime.h" { # 45 "./sdk/cutil_inline_runtime.h" if ((CUTFalse) == (cutCheckCondition(val, file, line))) { # 46 "./sdk/cutil_inline_runtime.h" exit(1); # 47 "./sdk/cutil_inline_runtime.h" } # 48 "./sdk/cutil_inline_runtime.h" } # 50 "./sdk/cutil_inline_runtime.h" inline void __cutilExit(int argc, char **argv) # 51 "./sdk/cutil_inline_runtime.h" { # 52 "./sdk/cutil_inline_runtime.h" if (!(cutCheckCmdLineFlag(argc, (const char **)argv, "noprompt"))) { # 53 "./sdk/cutil_inline_runtime.h" printf("\nPress ENTER to exit...\n"); # 54 "./sdk/cutil_inline_runtime.h" fflush(stdout); # 55 "./sdk/cutil_inline_runtime.h" fflush(stderr); # 56 "./sdk/cutil_inline_runtime.h" getchar(); # 57 "./sdk/cutil_inline_runtime.h" } # 58 "./sdk/cutil_inline_runtime.h" exit(0); # 59 "./sdk/cutil_inline_runtime.h" } # 65 "./sdk/cutil_inline_runtime.h" inline int _ConvertSMVer2Cores(int major, int minor) # 66 "./sdk/cutil_inline_runtime.h" { # 71 "./sdk/cutil_inline_runtime.h" typedef # 68 "./sdk/cutil_inline_runtime.h" struct { # 69 "./sdk/cutil_inline_runtime.h" int SM; # 70 "./sdk/cutil_inline_runtime.h" int Cores; # 71 "./sdk/cutil_inline_runtime.h" } sSMtoCores; # 73 "./sdk/cutil_inline_runtime.h" sSMtoCores nGpuArchCoresPerSM[] = {{16, 8}, {17, 8}, {18, 8}, {19, 8}, {32, 32}, {33, 48}, {(-1), (-1)}}; # 83 "./sdk/cutil_inline_runtime.h" int index = 0; # 84 "./sdk/cutil_inline_runtime.h" while ((((nGpuArchCoresPerSM)[index]).SM) != (-1)) { # 85 "./sdk/cutil_inline_runtime.h" if ((((nGpuArchCoresPerSM)[index]).SM) == ((major << 4) + minor)) { # 86 "./sdk/cutil_inline_runtime.h" return ((nGpuArchCoresPerSM)[index]).Cores; # 87 "./sdk/cutil_inline_runtime.h" } # 88 "./sdk/cutil_inline_runtime.h" index++; # 89 "./sdk/cutil_inline_runtime.h" } # 90 "./sdk/cutil_inline_runtime.h" printf("MapSMtoCores undefined SMversion %d.%d!\n", major, minor); # 91 "./sdk/cutil_inline_runtime.h" return -1; # 92 "./sdk/cutil_inline_runtime.h" } # 96 "./sdk/cutil_inline_runtime.h" inline int cutGetMaxGflopsDeviceId() # 97 "./sdk/cutil_inline_runtime.h" { # 98 "./sdk/cutil_inline_runtime.h" int current_device = 0, sm_per_multiproc = 0; # 99 "./sdk/cutil_inline_runtime.h" int max_compute_perf = 0, max_perf_device = 0; # 100 "./sdk/cutil_inline_runtime.h" int device_count = 0, best_SM_arch = 0; # 101 "./sdk/cutil_inline_runtime.h" cudaDeviceProp deviceProp; # 103 "./sdk/cutil_inline_runtime.h" cudaGetDeviceCount(&device_count); # 105 "./sdk/cutil_inline_runtime.h" while (current_device < device_count) { # 106 "./sdk/cutil_inline_runtime.h" cudaGetDeviceProperties(&deviceProp, current_device); # 107 "./sdk/cutil_inline_runtime.h" if (((deviceProp.major) > 0) && ((deviceProp.major) < 9999)) { # 108 "./sdk/cutil_inline_runtime.h" best_SM_arch = ((best_SM_arch > (deviceProp.major)) ? best_SM_arch : (deviceProp.major)); # 109 "./sdk/cutil_inline_runtime.h" } # 110 "./sdk/cutil_inline_runtime.h" current_device++; # 111 "./sdk/cutil_inline_runtime.h" } # 114 "./sdk/cutil_inline_runtime.h" current_device = 0; # 115 "./sdk/cutil_inline_runtime.h" while (current_device < device_count) { # 116 "./sdk/cutil_inline_runtime.h" cudaGetDeviceProperties(&deviceProp, current_device); # 117 "./sdk/cutil_inline_runtime.h" if (((deviceProp.major) == 9999) && ((deviceProp.minor) == 9999)) { # 118 "./sdk/cutil_inline_runtime.h" sm_per_multiproc = 1; # 119 "./sdk/cutil_inline_runtime.h" } else { # 120 "./sdk/cutil_inline_runtime.h" sm_per_multiproc = _ConvertSMVer2Cores(deviceProp.major, deviceProp.minor); # 121 "./sdk/cutil_inline_runtime.h" } # 123 "./sdk/cutil_inline_runtime.h" int compute_perf = (((deviceProp.multiProcessorCount) * sm_per_multiproc) * (deviceProp.clockRate)); # 124 "./sdk/cutil_inline_runtime.h" if (compute_perf > max_compute_perf) { # 126 "./sdk/cutil_inline_runtime.h" if (best_SM_arch > 2) { # 128 "./sdk/cutil_inline_runtime.h" if ((deviceProp.major) == best_SM_arch) { # 129 "./sdk/cutil_inline_runtime.h" max_compute_perf = compute_perf; # 130 "./sdk/cutil_inline_runtime.h" max_perf_device = current_device; # 131 "./sdk/cutil_inline_runtime.h" } # 132 "./sdk/cutil_inline_runtime.h" } else { # 133 "./sdk/cutil_inline_runtime.h" max_compute_perf = compute_perf; # 134 "./sdk/cutil_inline_runtime.h" max_perf_device = current_device; # 135 "./sdk/cutil_inline_runtime.h" } # 136 "./sdk/cutil_inline_runtime.h" } # 137 "./sdk/cutil_inline_runtime.h" ++current_device; # 138 "./sdk/cutil_inline_runtime.h" } # 139 "./sdk/cutil_inline_runtime.h" return max_perf_device; # 140 "./sdk/cutil_inline_runtime.h" } # 178 "./sdk/cutil_inline_runtime.h" inline void __cudaSafeCallNoSync(cudaError err, const char *file, const int line) # 179 "./sdk/cutil_inline_runtime.h" { # 180 "./sdk/cutil_inline_runtime.h" if ((cudaSuccess) != err) { # 181 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : cudaSafeCallNoSync() Runtime API error : %s.\n", file, line, cudaGetErrorString(err)); # 183 "./sdk/cutil_inline_runtime.h" exit(-1); # 184 "./sdk/cutil_inline_runtime.h" } # 185 "./sdk/cutil_inline_runtime.h" } # 187 "./sdk/cutil_inline_runtime.h" inline void __cudaSafeCall(cudaError err, const char *file, const int line) # 188 "./sdk/cutil_inline_runtime.h" { # 189 "./sdk/cutil_inline_runtime.h" if ((cudaSuccess) != err) { # 190 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : cudaSafeCall() Runtime API error : %s.\n", file, line, cudaGetErrorString(err)); # 192 "./sdk/cutil_inline_runtime.h" exit(-1); # 193 "./sdk/cutil_inline_runtime.h" } # 194 "./sdk/cutil_inline_runtime.h" } # 196 "./sdk/cutil_inline_runtime.h" inline void __cudaSafeThreadSync(const char *file, const int line) # 197 "./sdk/cutil_inline_runtime.h" { # 198 "./sdk/cutil_inline_runtime.h" cudaError err = cudaThreadSynchronize(); # 199 "./sdk/cutil_inline_runtime.h" if ((cudaSuccess) != err) { # 200 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : cudaThreadSynchronize() Driver API error : %s.\n", file, line, cudaGetErrorString(err)); # 202 "./sdk/cutil_inline_runtime.h" exit(-1); # 203 "./sdk/cutil_inline_runtime.h" } # 204 "./sdk/cutil_inline_runtime.h" } # 206 "./sdk/cutil_inline_runtime.h" inline void __cufftSafeCall(cufftResult err, const char *file, const int line) # 207 "./sdk/cutil_inline_runtime.h" { # 208 "./sdk/cutil_inline_runtime.h" if ((CUFFT_SUCCESS) != err) { # 209 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : cufftSafeCall() CUFFT error.\n", file, line); # 211 "./sdk/cutil_inline_runtime.h" exit(-1); # 212 "./sdk/cutil_inline_runtime.h" } # 213 "./sdk/cutil_inline_runtime.h" } # 215 "./sdk/cutil_inline_runtime.h" inline void __cutilCheckError(CUTBoolean err, const char *file, const int line) # 216 "./sdk/cutil_inline_runtime.h" { # 217 "./sdk/cutil_inline_runtime.h" if ((CUTTrue) != err) { # 218 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : CUTIL CUDA error.\n", file, line); # 220 "./sdk/cutil_inline_runtime.h" exit(-1); # 221 "./sdk/cutil_inline_runtime.h" } # 222 "./sdk/cutil_inline_runtime.h" } # 224 "./sdk/cutil_inline_runtime.h" inline void __cutilCheckMsg(const char *errorMessage, const char *file, const int line) # 225 "./sdk/cutil_inline_runtime.h" { # 226 "./sdk/cutil_inline_runtime.h" cudaError_t err = cudaGetLastError(); # 227 "./sdk/cutil_inline_runtime.h" if ((cudaSuccess) != err) { # 228 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : cutilCheckMsg() CUTIL CUDA error : %s : %s.\n", file, line, errorMessage, cudaGetErrorString(err)); # 230 "./sdk/cutil_inline_runtime.h" exit(-1); # 231 "./sdk/cutil_inline_runtime.h" } # 240 "./sdk/cutil_inline_runtime.h" } # 241 "./sdk/cutil_inline_runtime.h" inline void __cutilSafeMalloc(void *pointer, const char *file, const int line) # 242 "./sdk/cutil_inline_runtime.h" { # 243 "./sdk/cutil_inline_runtime.h" if (!(pointer)) { # 244 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : cutilSafeMalloc host malloc failure\n", file, line); # 246 "./sdk/cutil_inline_runtime.h" exit(-1); # 247 "./sdk/cutil_inline_runtime.h" } # 248 "./sdk/cutil_inline_runtime.h" } # 254 "./sdk/cutil_inline_runtime.h" inline int cutilDeviceInit(int ARGC, char **ARGV) # 255 "./sdk/cutil_inline_runtime.h" { # 256 "./sdk/cutil_inline_runtime.h" int deviceCount; # 257 "./sdk/cutil_inline_runtime.h" __cudaSafeCallNoSync(cudaGetDeviceCount(&deviceCount), "./sdk/cutil_inline_runtime.h", 257); # 258 "./sdk/cutil_inline_runtime.h" if (deviceCount == 0) { # 259 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "CUTIL CUDA error: no devices supporting CUDA.\n"); # 260 "./sdk/cutil_inline_runtime.h" exit(-1); # 261 "./sdk/cutil_inline_runtime.h" } # 262 "./sdk/cutil_inline_runtime.h" int dev = 0; # 263 "./sdk/cutil_inline_runtime.h" cutGetCmdLineArgumenti(ARGC, (const char **)ARGV, "device", &dev); # 264 "./sdk/cutil_inline_runtime.h" if (dev < 0) { # 265 "./sdk/cutil_inline_runtime.h" dev = 0; } # 266 "./sdk/cutil_inline_runtime.h" if (dev > (deviceCount - 1)) { # 267 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "cutilDeviceInit (Device=%d) invalid GPU device. %d GPU device(s) detected.\n\n", dev, deviceCount); # 268 "./sdk/cutil_inline_runtime.h" return -dev; # 269 "./sdk/cutil_inline_runtime.h" } # 270 "./sdk/cutil_inline_runtime.h" cudaDeviceProp deviceProp; # 271 "./sdk/cutil_inline_runtime.h" __cudaSafeCallNoSync(cudaGetDeviceProperties(&deviceProp, dev), "./sdk/cutil_inline_runtime.h", 271); # 272 "./sdk/cutil_inline_runtime.h" if ((deviceProp.major) < 1) { # 273 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "cutil error: GPU device does not support CUDA.\n"); # 274 "./sdk/cutil_inline_runtime.h" exit(-1); # 275 "./sdk/cutil_inline_runtime.h" } # 276 "./sdk/cutil_inline_runtime.h" printf("> Using CUDA device [%d]: %s\n", dev, deviceProp.name); # 277 "./sdk/cutil_inline_runtime.h" __cudaSafeCall(cudaSetDevice(dev), "./sdk/cutil_inline_runtime.h", 277); # 279 "./sdk/cutil_inline_runtime.h" return dev; # 280 "./sdk/cutil_inline_runtime.h" } # 283 "./sdk/cutil_inline_runtime.h" inline int cutilChooseCudaDevice(int argc, char **argv) # 284 "./sdk/cutil_inline_runtime.h" { # 285 "./sdk/cutil_inline_runtime.h" cudaDeviceProp deviceProp; # 286 "./sdk/cutil_inline_runtime.h" int devID = 0; # 288 "./sdk/cutil_inline_runtime.h" if (cutCheckCmdLineFlag(argc, (const char **)argv, "device")) { # 289 "./sdk/cutil_inline_runtime.h" devID = cutilDeviceInit(argc, argv); # 290 "./sdk/cutil_inline_runtime.h" if (devID < 0) { # 291 "./sdk/cutil_inline_runtime.h" printf("exiting...\n"); # 292 "./sdk/cutil_inline_runtime.h" __cutilExit(argc, argv); # 293 "./sdk/cutil_inline_runtime.h" exit(0); # 294 "./sdk/cutil_inline_runtime.h" } # 295 "./sdk/cutil_inline_runtime.h" } else { # 297 "./sdk/cutil_inline_runtime.h" devID = cutGetMaxGflopsDeviceId(); # 298 "./sdk/cutil_inline_runtime.h" __cudaSafeCallNoSync(cudaSetDevice(devID), "./sdk/cutil_inline_runtime.h", 298); # 299 "./sdk/cutil_inline_runtime.h" __cudaSafeCallNoSync(cudaGetDeviceProperties(&deviceProp, devID), "./sdk/cutil_inline_runtime.h", 299); # 300 "./sdk/cutil_inline_runtime.h" printf("> Using CUDA device [%d]: %s\n", devID, deviceProp.name); # 301 "./sdk/cutil_inline_runtime.h" } # 302 "./sdk/cutil_inline_runtime.h" return devID; # 303 "./sdk/cutil_inline_runtime.h" } # 308 "./sdk/cutil_inline_runtime.h" inline void cutilCudaCheckCtxLost(const char *errorMessage, const char *file, const int line) # 309 "./sdk/cutil_inline_runtime.h" { # 310 "./sdk/cutil_inline_runtime.h" cudaError_t err = cudaGetLastError(); # 311 "./sdk/cutil_inline_runtime.h" if ((cudaSuccess) != err) { # 312 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : CUDA error: %s : %s.\n", file, line, errorMessage, cudaGetErrorString(err)); # 314 "./sdk/cutil_inline_runtime.h" exit(-1); # 315 "./sdk/cutil_inline_runtime.h" } # 316 "./sdk/cutil_inline_runtime.h" err = cudaThreadSynchronize(); # 317 "./sdk/cutil_inline_runtime.h" if ((cudaSuccess) != err) { # 318 "./sdk/cutil_inline_runtime.h" fprintf(stderr, "%s(%i) : CCUDA error: %s : %s.\n", file, line, errorMessage, cudaGetErrorString(err)); # 320 "./sdk/cutil_inline_runtime.h" exit(-1); # 321 "./sdk/cutil_inline_runtime.h" } # 322 "./sdk/cutil_inline_runtime.h" } # 325 "./sdk/cutil_inline_runtime.h" inline bool cutilCudaCapabilities(int major_version, int minor_version) # 326 "./sdk/cutil_inline_runtime.h" { # 327 "./sdk/cutil_inline_runtime.h" cudaDeviceProp deviceProp; # 328 "./sdk/cutil_inline_runtime.h" (deviceProp.major) = 0; # 329 "./sdk/cutil_inline_runtime.h" (deviceProp.minor) = 0; # 330 "./sdk/cutil_inline_runtime.h" int dev; # 336 "./sdk/cutil_inline_runtime.h" __cudaSafeCall(cudaGetDevice(&dev), "./sdk/cutil_inline_runtime.h", 336); # 337 "./sdk/cutil_inline_runtime.h" __cudaSafeCall(cudaGetDeviceProperties(&deviceProp, dev), "./sdk/cutil_inline_runtime.h", 337); # 339 "./sdk/cutil_inline_runtime.h" if (((deviceProp.major) > major_version) || (((deviceProp.major) == major_version) && ((deviceProp.minor) >= minor_version))) # 341 "./sdk/cutil_inline_runtime.h" { # 342 "./sdk/cutil_inline_runtime.h" printf("> Device %d: <%16s >, Compute SM %d.%d detected\n", dev, deviceProp.name, deviceProp.major, deviceProp.minor); # 343 "./sdk/cutil_inline_runtime.h" return true; # 344 "./sdk/cutil_inline_runtime.h" } else # 346 "./sdk/cutil_inline_runtime.h" { # 347 "./sdk/cutil_inline_runtime.h" printf("There is no device supporting CUDA compute capability %d.%d.\n", major_version, minor_version); # 348 "./sdk/cutil_inline_runtime.h" printf("PASSED\n"); # 349 "./sdk/cutil_inline_runtime.h" return false; # 350 "./sdk/cutil_inline_runtime.h" } # 351 "./sdk/cutil_inline_runtime.h" } # 32 "./sdk/cutil_inline_drvapi.h" inline int _ConvertSMVer2CoresDrvApi(int major, int minor) # 33 "./sdk/cutil_inline_drvapi.h" { # 38 "./sdk/cutil_inline_drvapi.h" typedef # 35 "./sdk/cutil_inline_drvapi.h" struct { # 36 "./sdk/cutil_inline_drvapi.h" int SM; # 37 "./sdk/cutil_inline_drvapi.h" int Cores; # 38 "./sdk/cutil_inline_drvapi.h" } sSMtoCores; # 40 "./sdk/cutil_inline_drvapi.h" sSMtoCores nGpuArchCoresPerSM[] = {{16, 8}, {17, 8}, {18, 8}, {19, 8}, {32, 32}, {33, 48}, {(-1), (-1)}}; # 50 "./sdk/cutil_inline_drvapi.h" int index = 0; # 51 "./sdk/cutil_inline_drvapi.h" while ((((nGpuArchCoresPerSM)[index]).SM) != (-1)) { # 52 "./sdk/cutil_inline_drvapi.h" if ((((nGpuArchCoresPerSM)[index]).SM) == ((major << 4) + minor)) { # 53 "./sdk/cutil_inline_drvapi.h" return ((nGpuArchCoresPerSM)[index]).Cores; # 54 "./sdk/cutil_inline_drvapi.h" } # 55 "./sdk/cutil_inline_drvapi.h" index++; # 56 "./sdk/cutil_inline_drvapi.h" } # 57 "./sdk/cutil_inline_drvapi.h" printf("MapSMtoCores undefined SMversion %d.%d!\n", major, minor); # 58 "./sdk/cutil_inline_drvapi.h" return -1; # 59 "./sdk/cutil_inline_drvapi.h" } # 63 "./sdk/cutil_inline_drvapi.h" inline int cutilDrvGetMaxGflopsDeviceId() # 64 "./sdk/cutil_inline_drvapi.h" { # 65 "./sdk/cutil_inline_drvapi.h" CUdevice current_device = 0, max_perf_device = 0; # 66 "./sdk/cutil_inline_drvapi.h" int device_count = 0, sm_per_multiproc = 0; # 67 "./sdk/cutil_inline_drvapi.h" int max_compute_perf = 0, best_SM_arch = 0; # 68 "./sdk/cutil_inline_drvapi.h" int major = 0, minor = 0, multiProcessorCount, clockRate; # 70 "./sdk/cutil_inline_drvapi.h" cuInit(0); # 71 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetCount(&device_count); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 71); exit(1); } } ; # 74 "./sdk/cutil_inline_drvapi.h" while (current_device < device_count) { # 75 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceComputeCapability(&major, &minor, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 75); exit(1); } } ; # 76 "./sdk/cutil_inline_drvapi.h" if ((major > 0) && (major < 9999)) { # 77 "./sdk/cutil_inline_drvapi.h" best_SM_arch = ((best_SM_arch > major) ? best_SM_arch : major); # 78 "./sdk/cutil_inline_drvapi.h" } # 79 "./sdk/cutil_inline_drvapi.h" current_device++; # 80 "./sdk/cutil_inline_drvapi.h" } # 83 "./sdk/cutil_inline_drvapi.h" current_device = 0; # 84 "./sdk/cutil_inline_drvapi.h" while (current_device < device_count) { # 85 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetAttribute(&multiProcessorCount, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 87); # 85 "./sdk/cutil_inline_drvapi.h" exit(1); } } # 87 "./sdk/cutil_inline_drvapi.h" ; # 88 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetAttribute(&clockRate, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 90); # 88 "./sdk/cutil_inline_drvapi.h" exit(1); } } # 90 "./sdk/cutil_inline_drvapi.h" ; # 91 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceComputeCapability(&major, &minor, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 91); exit(1); } } ; # 93 "./sdk/cutil_inline_drvapi.h" if ((major == 9999) && (minor == 9999)) { # 94 "./sdk/cutil_inline_drvapi.h" sm_per_multiproc = 1; # 95 "./sdk/cutil_inline_drvapi.h" } else { # 96 "./sdk/cutil_inline_drvapi.h" sm_per_multiproc = _ConvertSMVer2CoresDrvApi(major, minor); # 97 "./sdk/cutil_inline_drvapi.h" } # 99 "./sdk/cutil_inline_drvapi.h" int compute_perf = ((multiProcessorCount * sm_per_multiproc) * clockRate); # 100 "./sdk/cutil_inline_drvapi.h" if (compute_perf > max_compute_perf) { # 102 "./sdk/cutil_inline_drvapi.h" if (best_SM_arch > 2) { # 104 "./sdk/cutil_inline_drvapi.h" if (major == best_SM_arch) { # 105 "./sdk/cutil_inline_drvapi.h" max_compute_perf = compute_perf; # 106 "./sdk/cutil_inline_drvapi.h" max_perf_device = current_device; # 107 "./sdk/cutil_inline_drvapi.h" } # 108 "./sdk/cutil_inline_drvapi.h" } else { # 109 "./sdk/cutil_inline_drvapi.h" max_compute_perf = compute_perf; # 110 "./sdk/cutil_inline_drvapi.h" max_perf_device = current_device; # 111 "./sdk/cutil_inline_drvapi.h" } # 112 "./sdk/cutil_inline_drvapi.h" } # 113 "./sdk/cutil_inline_drvapi.h" ++current_device; # 114 "./sdk/cutil_inline_drvapi.h" } # 115 "./sdk/cutil_inline_drvapi.h" return max_perf_device; # 116 "./sdk/cutil_inline_drvapi.h" } # 119 "./sdk/cutil_inline_drvapi.h" inline int cutilDrvGetMaxGflopsGraphicsDeviceId() # 120 "./sdk/cutil_inline_drvapi.h" { # 121 "./sdk/cutil_inline_drvapi.h" CUdevice current_device = 0, max_perf_device = 0; # 122 "./sdk/cutil_inline_drvapi.h" int device_count = 0, sm_per_multiproc = 0; # 123 "./sdk/cutil_inline_drvapi.h" int max_compute_perf = 0, best_SM_arch = 0; # 124 "./sdk/cutil_inline_drvapi.h" int major = 0, minor = 0, multiProcessorCount, clockRate; # 125 "./sdk/cutil_inline_drvapi.h" int bTCC = 0; # 126 "./sdk/cutil_inline_drvapi.h" char deviceName[256]; # 128 "./sdk/cutil_inline_drvapi.h" cuInit(0); # 129 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetCount(&device_count); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 129); exit(1); } } ; # 132 "./sdk/cutil_inline_drvapi.h" while (current_device < device_count) { # 133 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetName(deviceName, 256, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 133); exit(1); } } ; # 134 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceComputeCapability(&major, &minor, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 134); exit(1); } } ; # 136 "./sdk/cutil_inline_drvapi.h" if ((major > 0) && (major < 9999)) { # 137 "./sdk/cutil_inline_drvapi.h" best_SM_arch = ((best_SM_arch > major) ? best_SM_arch : major); # 138 "./sdk/cutil_inline_drvapi.h" } # 139 "./sdk/cutil_inline_drvapi.h" current_device++; # 140 "./sdk/cutil_inline_drvapi.h" } # 143 "./sdk/cutil_inline_drvapi.h" current_device = 0; # 144 "./sdk/cutil_inline_drvapi.h" while (current_device < device_count) { # 145 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetAttribute(&multiProcessorCount, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 147); # 145 "./sdk/cutil_inline_drvapi.h" exit(1); } } # 147 "./sdk/cutil_inline_drvapi.h" ; # 148 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetAttribute(&clockRate, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 150); # 148 "./sdk/cutil_inline_drvapi.h" exit(1); } } # 150 "./sdk/cutil_inline_drvapi.h" ; # 151 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceComputeCapability(&major, &minor, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 151); exit(1); } } ; # 154 "./sdk/cutil_inline_drvapi.h" { CUresult err = cuDeviceGetAttribute(&bTCC, CU_DEVICE_ATTRIBUTE_TCC_DRIVER, current_device); if ((CUDA_SUCCESS) != err) { fprintf(stderr, "Cuda driver error %x in file \'%s\' in line %i.\n", err, "./sdk/cutil_inline_drvapi.h", 154); exit(1); } } ; # 160 "./sdk/cutil_inline_drvapi.h" if ((major == 9999) && (minor == 9999)) { # 161 "./sdk/cutil_inline_drvapi.h" sm_per_multiproc = 1; # 162 "./sdk/cutil_inline_drvapi.h" } else { # 163 "./sdk/cutil_inline_drvapi.h" sm_per_multiproc = _ConvertSMVer2CoresDrvApi(major, minor); # 164 "./sdk/cutil_inline_drvapi.h" } # 167 "./sdk/cutil_inline_drvapi.h" if ((major >= 2) && (!(bTCC))) # 168 "./sdk/cutil_inline_drvapi.h" { # 169 "./sdk/cutil_inline_drvapi.h" int compute_perf = ((multiProcessorCount * sm_per_multiproc) * clockRate); # 170 "./sdk/cutil_inline_drvapi.h" if (compute_perf > max_compute_perf) { # 172 "./sdk/cutil_inline_drvapi.h" if (best_SM_arch > 2) { # 174 "./sdk/cutil_inline_drvapi.h" if (major == best_SM_arch) { # 175 "./sdk/cutil_inline_drvapi.h" max_compute_perf = compute_perf; # 176 "./sdk/cutil_inline_drvapi.h" max_perf_device = current_device; # 177 "./sdk/cutil_inline_drvapi.h" } # 178 "./sdk/cutil_inline_drvapi.h" } else { # 179 "./sdk/cutil_inline_drvapi.h" max_compute_perf = compute_perf; # 180 "./sdk/cutil_inline_drvapi.h" max_perf_device = current_device; # 181 "./sdk/cutil_inline_drvapi.h" } # 182 "./sdk/cutil_inline_drvapi.h" } # 183 "./sdk/cutil_inline_drvapi.h" } # 184 "./sdk/cutil_inline_drvapi.h" ++current_device; # 185 "./sdk/cutil_inline_drvapi.h" } # 186 "./sdk/cutil_inline_drvapi.h" return max_perf_device; # 187 "./sdk/cutil_inline_drvapi.h" } # 190 "./sdk/cutil_inline_drvapi.h" inline void __cuSafeCallNoSync(CUresult err, const char *file, const int line) # 191 "./sdk/cutil_inline_drvapi.h" { # 192 "./sdk/cutil_inline_drvapi.h" if ((CUDA_SUCCESS) != err) { # 193 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "cuSafeCallNoSync() Driver API error = %04d from file <%s>, line %i.\n", err, file, line); # 195 "./sdk/cutil_inline_drvapi.h" exit(-1); # 196 "./sdk/cutil_inline_drvapi.h" } # 197 "./sdk/cutil_inline_drvapi.h" } # 198 "./sdk/cutil_inline_drvapi.h" inline void __cuSafeCall(CUresult err, const char *file, const int line) # 199 "./sdk/cutil_inline_drvapi.h" { # 200 "./sdk/cutil_inline_drvapi.h" __cuSafeCallNoSync(err, file, line); # 201 "./sdk/cutil_inline_drvapi.h" } # 203 "./sdk/cutil_inline_drvapi.h" inline void __cuCtxSync(const char *file, const int line) # 204 "./sdk/cutil_inline_drvapi.h" { # 205 "./sdk/cutil_inline_drvapi.h" CUresult err = cuCtxSynchronize(); # 206 "./sdk/cutil_inline_drvapi.h" if ((CUDA_SUCCESS) != err) { # 207 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "cuCtxSynchronize() API error = %04d in file <%s>, line %i.\n", err, file, line); # 209 "./sdk/cutil_inline_drvapi.h" exit(-1); # 210 "./sdk/cutil_inline_drvapi.h" } # 211 "./sdk/cutil_inline_drvapi.h" } # 213 "./sdk/cutil_inline_drvapi.h" inline void __cuCheckMsg(const char *msg, const char *file, const int line) # 214 "./sdk/cutil_inline_drvapi.h" { # 215 "./sdk/cutil_inline_drvapi.h" CUresult err = cuCtxSynchronize(); # 216 "./sdk/cutil_inline_drvapi.h" if ((CUDA_SUCCESS) != err) { # 217 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "cutilDrvCheckMsg -> %s", msg); # 218 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "cutilDrvCheckMsg -> cuCtxSynchronize API error = %04d in file <%s>, line %i.\n", err, file, line); # 220 "./sdk/cutil_inline_drvapi.h" exit(-1); # 221 "./sdk/cutil_inline_drvapi.h" } # 222 "./sdk/cutil_inline_drvapi.h" } # 228 "./sdk/cutil_inline_drvapi.h" inline int cutilDeviceInitDrv(int ARGC, char **ARGV) # 229 "./sdk/cutil_inline_drvapi.h" { # 230 "./sdk/cutil_inline_drvapi.h" int cuDevice = 0; # 231 "./sdk/cutil_inline_drvapi.h" int deviceCount = 0; # 232 "./sdk/cutil_inline_drvapi.h" CUresult err = cuInit(0); # 233 "./sdk/cutil_inline_drvapi.h" if ((CUDA_SUCCESS) == err) { # 234 "./sdk/cutil_inline_drvapi.h" __cuSafeCallNoSync(cuDeviceGetCount(&deviceCount), "./sdk/cutil_inline_drvapi.h", 234); } # 235 "./sdk/cutil_inline_drvapi.h" if (deviceCount == 0) { # 236 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "CUTIL DeviceInitDrv error: no devices supporting CUDA\n"); # 237 "./sdk/cutil_inline_drvapi.h" exit(-1); # 238 "./sdk/cutil_inline_drvapi.h" } # 239 "./sdk/cutil_inline_drvapi.h" int dev = 0; # 240 "./sdk/cutil_inline_drvapi.h" cutGetCmdLineArgumenti(ARGC, (const char **)ARGV, "device", &dev); # 241 "./sdk/cutil_inline_drvapi.h" if (dev < 0) { dev = 0; } # 242 "./sdk/cutil_inline_drvapi.h" if (dev > (deviceCount - 1)) { # 243 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "cutilDeviceInitDrv (Device=%d) invalid GPU device. %d GPU device(s) detected.\n\n", dev, deviceCount); # 244 "./sdk/cutil_inline_drvapi.h" return -dev; # 245 "./sdk/cutil_inline_drvapi.h" } # 246 "./sdk/cutil_inline_drvapi.h" __cuSafeCallNoSync(cuDeviceGet(&cuDevice, dev), "./sdk/cutil_inline_drvapi.h", 246); # 247 "./sdk/cutil_inline_drvapi.h" char name[100]; # 248 "./sdk/cutil_inline_drvapi.h" cuDeviceGetName(name, 100, cuDevice); # 249 "./sdk/cutil_inline_drvapi.h" if ((cutCheckCmdLineFlag(ARGC, (const char **)ARGV, "quiet")) == (CUTFalse)) { # 250 "./sdk/cutil_inline_drvapi.h" printf("> Using CUDA Device [%d]: %s\n", dev, name); # 251 "./sdk/cutil_inline_drvapi.h" } # 252 "./sdk/cutil_inline_drvapi.h" return dev; # 253 "./sdk/cutil_inline_drvapi.h" } # 260 "./sdk/cutil_inline_drvapi.h" inline CUdevice cutilChooseCudaDeviceDrv(int argc, char **argv, int *p_devID) # 261 "./sdk/cutil_inline_drvapi.h" { # 262 "./sdk/cutil_inline_drvapi.h" CUdevice cuDevice; # 263 "./sdk/cutil_inline_drvapi.h" int devID = 0; # 265 "./sdk/cutil_inline_drvapi.h" if (cutCheckCmdLineFlag(argc, (const char **)argv, "device")) { # 266 "./sdk/cutil_inline_drvapi.h" devID = cutilDeviceInitDrv(argc, argv); # 267 "./sdk/cutil_inline_drvapi.h" if (devID < 0) { # 268 "./sdk/cutil_inline_drvapi.h" printf("exiting...\n"); # 269 "./sdk/cutil_inline_drvapi.h" exit(0); # 270 "./sdk/cutil_inline_drvapi.h" } # 271 "./sdk/cutil_inline_drvapi.h" } else { # 273 "./sdk/cutil_inline_drvapi.h" char name[100]; # 274 "./sdk/cutil_inline_drvapi.h" devID = cutilDrvGetMaxGflopsDeviceId(); # 275 "./sdk/cutil_inline_drvapi.h" __cuSafeCallNoSync(cuDeviceGet(&cuDevice, devID), "./sdk/cutil_inline_drvapi.h", 275); # 276 "./sdk/cutil_inline_drvapi.h" cuDeviceGetName(name, 100, cuDevice); # 277 "./sdk/cutil_inline_drvapi.h" printf("> Using CUDA Device [%d]: %s\n", devID, name); # 278 "./sdk/cutil_inline_drvapi.h" } # 279 "./sdk/cutil_inline_drvapi.h" cuDeviceGet(&cuDevice, devID); # 280 "./sdk/cutil_inline_drvapi.h" if (p_devID) { (*p_devID) = devID; } # 281 "./sdk/cutil_inline_drvapi.h" return cuDevice; # 282 "./sdk/cutil_inline_drvapi.h" } # 287 "./sdk/cutil_inline_drvapi.h" inline void cutilDrvCudaCheckCtxLost(const char *errorMessage, const char *file, const int line) # 288 "./sdk/cutil_inline_drvapi.h" { # 289 "./sdk/cutil_inline_drvapi.h" CUresult err = cuCtxSynchronize(); # 290 "./sdk/cutil_inline_drvapi.h" if ((CUDA_ERROR_INVALID_CONTEXT) != err) { # 291 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "Cuda error: %s in file \'%s\' in line %i\n", errorMessage, file, line); # 293 "./sdk/cutil_inline_drvapi.h" exit(-1); # 294 "./sdk/cutil_inline_drvapi.h" } # 295 "./sdk/cutil_inline_drvapi.h" err = cuCtxSynchronize(); # 296 "./sdk/cutil_inline_drvapi.h" if ((CUDA_SUCCESS) != err) { # 297 "./sdk/cutil_inline_drvapi.h" fprintf(stderr, "Cuda error: %s in file \'%s\' in line %i\n", errorMessage, file, line); # 299 "./sdk/cutil_inline_drvapi.h" exit(-1); # 300 "./sdk/cutil_inline_drvapi.h" } # 301 "./sdk/cutil_inline_drvapi.h" } # 304 "./sdk/cutil_inline_drvapi.h" inline bool cutilDrvCudaDevCapabilities(int major_version, int minor_version, int deviceNum) # 305 "./sdk/cutil_inline_drvapi.h" { # 306 "./sdk/cutil_inline_drvapi.h" int major, minor, dev; # 307 "./sdk/cutil_inline_drvapi.h" char device_name[256]; # 313 "./sdk/cutil_inline_drvapi.h" __cuSafeCallNoSync(cuDeviceGet(&dev, deviceNum), "./sdk/cutil_inline_drvapi.h", 313); # 314 "./sdk/cutil_inline_drvapi.h" __cuSafeCallNoSync(cuDeviceComputeCapability(&major, &minor, dev), "./sdk/cutil_inline_drvapi.h", 314); # 315 "./sdk/cutil_inline_drvapi.h" __cuSafeCallNoSync(cuDeviceGetName(device_name, 256, dev), "./sdk/cutil_inline_drvapi.h", 315); # 317 "./sdk/cutil_inline_drvapi.h" if ((major > major_version) || ((major == major_version) && (minor >= minor_version))) # 319 "./sdk/cutil_inline_drvapi.h" { # 320 "./sdk/cutil_inline_drvapi.h" printf("> Device %d: < %s >, Compute SM %d.%d detected\n", dev, device_name, major, minor); # 321 "./sdk/cutil_inline_drvapi.h" return true; # 322 "./sdk/cutil_inline_drvapi.h" } else # 324 "./sdk/cutil_inline_drvapi.h" { # 325 "./sdk/cutil_inline_drvapi.h" printf("There is no device supporting CUDA compute capability %d.%d.\n", major_version, minor_version); # 326 "./sdk/cutil_inline_drvapi.h" printf("PASSED\n"); # 327 "./sdk/cutil_inline_drvapi.h" return false; # 328 "./sdk/cutil_inline_drvapi.h" } # 329 "./sdk/cutil_inline_drvapi.h" } # 332 "./sdk/cutil_inline_drvapi.h" inline bool cutilDrvCudaCapabilities(int major_version, int minor_version) # 333 "./sdk/cutil_inline_drvapi.h" { # 334 "./sdk/cutil_inline_drvapi.h" return cutilDrvCudaDevCapabilities(major_version, minor_version, 0); # 335 "./sdk/cutil_inline_drvapi.h" } # 23 "./sdk/cutil_inline.h" inline void print_NVCC_min_spec(const char *sSDKsample, const char *sNVCCReq, const char *sDriverReq) # 24 "./sdk/cutil_inline.h" { # 25 "./sdk/cutil_inline.h" printf("CUDA %d.%02d Toolkit built this project.\n", 4010 / 1000, 4010 % 100); # 26 "./sdk/cutil_inline.h" printf(" [ %s ] requirements:\n", sSDKsample); # 27 "./sdk/cutil_inline.h" printf(" -> CUDA %s Toolkit\n", sNVCCReq); # 28 "./sdk/cutil_inline.h" printf(" -> %s NVIDIA Display Driver.\n", sDriverReq); # 29 "./sdk/cutil_inline.h" } # 64 "tests/simpleTemplates/sharedmem.cuh" template< class T> # 65 "tests/simpleTemplates/sharedmem.cuh" struct SharedMemory { # 68 "tests/simpleTemplates/sharedmem.cuh" T *getPointer() {int volatile ___ = 1; # 72 "tests/simpleTemplates/sharedmem.cuh" exit(___);} # 73 "tests/simpleTemplates/sharedmem.cuh" }; # 80 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< int> { # 82 "tests/simpleTemplates/sharedmem.cuh" int *getPointer() {int volatile ___ = 1;exit(___);} # 83 "tests/simpleTemplates/sharedmem.cuh" }; # 86 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< unsigned> { # 88 "tests/simpleTemplates/sharedmem.cuh" unsigned *getPointer() {int volatile ___ = 1;exit(___);} # 89 "tests/simpleTemplates/sharedmem.cuh" }; # 92 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< char> { # 94 "tests/simpleTemplates/sharedmem.cuh" char *getPointer() {int volatile ___ = 1;exit(___);} # 95 "tests/simpleTemplates/sharedmem.cuh" }; # 98 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< unsigned char> { # 100 "tests/simpleTemplates/sharedmem.cuh" unsigned char *getPointer() {int volatile ___ = 1;exit(___);} # 101 "tests/simpleTemplates/sharedmem.cuh" }; # 104 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< short> { # 106 "tests/simpleTemplates/sharedmem.cuh" short *getPointer() {int volatile ___ = 1;exit(___);} # 107 "tests/simpleTemplates/sharedmem.cuh" }; # 110 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< unsigned short> { # 112 "tests/simpleTemplates/sharedmem.cuh" unsigned short *getPointer() {int volatile ___ = 1;exit(___);} # 113 "tests/simpleTemplates/sharedmem.cuh" }; # 116 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< long> { # 118 "tests/simpleTemplates/sharedmem.cuh" long *getPointer() {int volatile ___ = 1;exit(___);} # 119 "tests/simpleTemplates/sharedmem.cuh" }; # 122 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< unsigned long> { # 124 "tests/simpleTemplates/sharedmem.cuh" unsigned long *getPointer() {int volatile ___ = 1;exit(___);} # 125 "tests/simpleTemplates/sharedmem.cuh" }; # 128 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< bool> { # 130 "tests/simpleTemplates/sharedmem.cuh" bool *getPointer() {int volatile ___ = 1;exit(___);} # 131 "tests/simpleTemplates/sharedmem.cuh" }; # 134 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< float> { # 136 "tests/simpleTemplates/sharedmem.cuh" float *getPointer() {int volatile ___ = 1;exit(___);} # 137 "tests/simpleTemplates/sharedmem.cuh" }; # 140 "tests/simpleTemplates/sharedmem.cuh" template<> struct SharedMemory< double> { # 142 "tests/simpleTemplates/sharedmem.cuh" double *getPointer() {int volatile ___ = 1;exit(___);} # 143 "tests/simpleTemplates/sharedmem.cuh" }; # 30 "tests/simpleTemplates/simpleTemplates_kernel.cu" template< class T> static void # 32 "tests/simpleTemplates/simpleTemplates_kernel.cu" __wrapper__device_stub_testKernel(T *&g_idata, T *&g_odata) {exit(1);} # 30 "tests/simpleTemplates/simpleTemplates_kernel.cu" template< class T> void # 32 "tests/simpleTemplates/simpleTemplates_kernel.cu" testKernel(T *g_idata, T *g_odata) # 33 "tests/simpleTemplates/simpleTemplates_kernel.cu" {__wrapper__device_stub_testKernel<T>(g_idata,g_odata); # 55 "tests/simpleTemplates/simpleTemplates_kernel.cu" return;} # 41 "tests/simpleTemplates/simpleTemplates.cu" int g_TotalFailures = 0; # 45 "tests/simpleTemplates/simpleTemplates.cu" template< class T> void runTest(int , char ** , int ); # 48 "tests/simpleTemplates/simpleTemplates.cu" template< class T> void # 50 "tests/simpleTemplates/simpleTemplates.cu" computeGold(T *reference, T *idata, const unsigned len) # 51 "tests/simpleTemplates/simpleTemplates.cu" { # 52 "tests/simpleTemplates/simpleTemplates.cu" const T T_len = (static_cast< T>(len)); # 53 "tests/simpleTemplates/simpleTemplates.cu" for (unsigned i = (0); i < len; ++i) # 54 "tests/simpleTemplates/simpleTemplates.cu" { # 55 "tests/simpleTemplates/simpleTemplates.cu" (reference[i]) = ((idata[i]) * T_len); # 56 "tests/simpleTemplates/simpleTemplates.cu" } # 57 "tests/simpleTemplates/simpleTemplates.cu" } # 63 "tests/simpleTemplates/simpleTemplates.cu" int main(int argc, char **argv) # 64 "tests/simpleTemplates/simpleTemplates.cu" { # 65 "tests/simpleTemplates/simpleTemplates.cu" printf("[simpleTemplates]\n"); # 67 "tests/simpleTemplates/simpleTemplates.cu" printf("> runTest<float,32>\n"); # 68 "tests/simpleTemplates/simpleTemplates.cu" runTest< float> (argc, argv, 32); # 69 "tests/simpleTemplates/simpleTemplates.cu" printf("> runTest<int,64>\n"); # 70 "tests/simpleTemplates/simpleTemplates.cu" runTest< int> (argc, argv, 64); # 72 "tests/simpleTemplates/simpleTemplates.cu" printf("\n[simpleTemplates] -> Test Results: %d Failures\n", g_TotalFailures); # 73 "tests/simpleTemplates/simpleTemplates.cu" printf((g_TotalFailures == 0) ? ("PASSED\n") : ("FAILED\n")); # 75 "tests/simpleTemplates/simpleTemplates.cu" __cutilExit(argc, argv); return 0; # 76 "tests/simpleTemplates/simpleTemplates.cu" } # 83 "tests/simpleTemplates/simpleTemplates.cu" template< class T> # 84 "tests/simpleTemplates/simpleTemplates.cu" class ArrayComparator { # 87 "tests/simpleTemplates/simpleTemplates.cu" public: CUTBoolean compare(const T *reference, T *data, unsigned len) # 88 "tests/simpleTemplates/simpleTemplates.cu" { # 89 "tests/simpleTemplates/simpleTemplates.cu" fprintf(stderr, "Error: no comparison function implemented for this type\n"); # 90 "tests/simpleTemplates/simpleTemplates.cu" return CUTFalse; # 91 "tests/simpleTemplates/simpleTemplates.cu" } # 92 "tests/simpleTemplates/simpleTemplates.cu" }; # 96 "tests/simpleTemplates/simpleTemplates.cu" template<> class ArrayComparator< int> { # 99 "tests/simpleTemplates/simpleTemplates.cu" public: CUTBoolean compare(const int *reference, int *data, unsigned len) # 100 "tests/simpleTemplates/simpleTemplates.cu" { # 101 "tests/simpleTemplates/simpleTemplates.cu" return cutComparei(reference, data, len); # 102 "tests/simpleTemplates/simpleTemplates.cu" } # 103 "tests/simpleTemplates/simpleTemplates.cu" }; # 107 "tests/simpleTemplates/simpleTemplates.cu" template<> class ArrayComparator< float> { # 110 "tests/simpleTemplates/simpleTemplates.cu" public: CUTBoolean compare(const float *reference, float *data, unsigned len) # 111 "tests/simpleTemplates/simpleTemplates.cu" { # 112 "tests/simpleTemplates/simpleTemplates.cu" return cutComparef(reference, data, len); # 113 "tests/simpleTemplates/simpleTemplates.cu" } # 114 "tests/simpleTemplates/simpleTemplates.cu" }; # 117 "tests/simpleTemplates/simpleTemplates.cu" template< class T> # 118 "tests/simpleTemplates/simpleTemplates.cu" class ArrayFileWriter { # 121 "tests/simpleTemplates/simpleTemplates.cu" public: CUTBoolean write(const char *filename, T *data, unsigned len, float epsilon) # 122 "tests/simpleTemplates/simpleTemplates.cu" { # 123 "tests/simpleTemplates/simpleTemplates.cu" fprintf(stderr, "Error: no file write function implemented for this type\n"); # 124 "tests/simpleTemplates/simpleTemplates.cu" return CUTFalse; # 125 "tests/simpleTemplates/simpleTemplates.cu" } # 126 "tests/simpleTemplates/simpleTemplates.cu" }; # 130 "tests/simpleTemplates/simpleTemplates.cu" template<> class ArrayFileWriter< int> { # 133 "tests/simpleTemplates/simpleTemplates.cu" public: CUTBoolean write(const char *filename, int *data, unsigned len, float epsilon) # 134 "tests/simpleTemplates/simpleTemplates.cu" { # 135 "tests/simpleTemplates/simpleTemplates.cu" return cutWriteFilei(filename, data, len, epsilon != (0)); # 136 "tests/simpleTemplates/simpleTemplates.cu" } # 137 "tests/simpleTemplates/simpleTemplates.cu" }; # 141 "tests/simpleTemplates/simpleTemplates.cu" template<> class ArrayFileWriter< float> { # 144 "tests/simpleTemplates/simpleTemplates.cu" public: CUTBoolean write(const char *filename, float *data, unsigned len, float epsilon) # 145 "tests/simpleTemplates/simpleTemplates.cu" { # 146 "tests/simpleTemplates/simpleTemplates.cu" return cutWriteFilef(filename, data, len, epsilon); # 147 "tests/simpleTemplates/simpleTemplates.cu" } # 148 "tests/simpleTemplates/simpleTemplates.cu" }; # 154 "tests/simpleTemplates/simpleTemplates.cu" template< class T> void # 156 "tests/simpleTemplates/simpleTemplates.cu" runTest(int argc, char **argv, int len) # 157 "tests/simpleTemplates/simpleTemplates.cu" { # 158 "tests/simpleTemplates/simpleTemplates.cu" int devID; # 159 "tests/simpleTemplates/simpleTemplates.cu" cudaDeviceProp deviceProps; # 161 "tests/simpleTemplates/simpleTemplates.cu" if (cutCheckCmdLineFlag(argc, (const char **)argv, "device")) { # 162 "tests/simpleTemplates/simpleTemplates.cu" devID = cutilDeviceInit(argc, argv); # 163 "tests/simpleTemplates/simpleTemplates.cu" if (devID < 0) { # 164 "tests/simpleTemplates/simpleTemplates.cu" printf("exiting...\n"); # 165 "tests/simpleTemplates/simpleTemplates.cu" __cutilExit(argc, argv); # 166 "tests/simpleTemplates/simpleTemplates.cu" exit(0); # 167 "tests/simpleTemplates/simpleTemplates.cu" } # 168 "tests/simpleTemplates/simpleTemplates.cu" } else # 169 "tests/simpleTemplates/simpleTemplates.cu" { # 170 "tests/simpleTemplates/simpleTemplates.cu" devID = cutGetMaxGflopsDeviceId(); # 171 "tests/simpleTemplates/simpleTemplates.cu" cudaSetDevice(devID); # 172 "tests/simpleTemplates/simpleTemplates.cu" } # 175 "tests/simpleTemplates/simpleTemplates.cu" __cudaSafeCall(cudaGetDeviceProperties(&deviceProps, devID), "tests/simpleTemplates/simpleTemplates.cu", 175); # 176 "tests/simpleTemplates/simpleTemplates.cu" printf("CUDA device [%s] has %d Multi-Processors\n", deviceProps.name, deviceProps.multiProcessorCount); # 178 "tests/simpleTemplates/simpleTemplates.cu" unsigned timer = (0); # 179 "tests/simpleTemplates/simpleTemplates.cu" __cutilCheckError(cutCreateTimer(&timer), "tests/simpleTemplates/simpleTemplates.cu", 179); # 180 "tests/simpleTemplates/simpleTemplates.cu" __cutilCheckError(cutStartTimer(timer), "tests/simpleTemplates/simpleTemplates.cu", 180); # 182 "tests/simpleTemplates/simpleTemplates.cu" unsigned num_threads = (len); # 183 "tests/simpleTemplates/simpleTemplates.cu" unsigned mem_size = (sizeof(float) * num_threads); # 186 "tests/simpleTemplates/simpleTemplates.cu" T *h_idata = ((T *)malloc(mem_size)); # 188 "tests/simpleTemplates/simpleTemplates.cu" for (unsigned i = (0); i < num_threads; ++i) # 189 "tests/simpleTemplates/simpleTemplates.cu" { # 190 "tests/simpleTemplates/simpleTemplates.cu" (h_idata[i]) = ((T)i); # 191 "tests/simpleTemplates/simpleTemplates.cu" } # 194 "tests/simpleTemplates/simpleTemplates.cu" T *d_idata; # 195 "tests/simpleTemplates/simpleTemplates.cu" __cudaSafeCall(cudaMalloc((void **)(&d_idata), mem_size), "tests/simpleTemplates/simpleTemplates.cu", 195); # 197 "tests/simpleTemplates/simpleTemplates.cu" __cudaSafeCall(cudaMemcpy(d_idata, h_idata, mem_size, cudaMemcpyHostToDevice), "tests/simpleTemplates/simpleTemplates.cu", 198); # 201 "tests/simpleTemplates/simpleTemplates.cu" T *d_odata; # 202 "tests/simpleTemplates/simpleTemplates.cu" __cudaSafeCall(cudaMalloc((void **)(&d_odata), mem_size), "tests/simpleTemplates/simpleTemplates.cu", 202); # 205 "tests/simpleTemplates/simpleTemplates.cu" dim3 grid(1, 1, 1); # 206 "tests/simpleTemplates/simpleTemplates.cu" dim3 threads(num_threads, 1, 1); # 209 "tests/simpleTemplates/simpleTemplates.cu" cudaConfigureCall(grid, threads, mem_size) ? ((void)0) : (testKernel< T> )(d_idata, d_odata); # 212 "tests/simpleTemplates/simpleTemplates.cu" __cutilCheckMsg("Kernel execution failed", "tests/simpleTemplates/simpleTemplates.cu", 212); # 215 "tests/simpleTemplates/simpleTemplates.cu" T *h_odata = ((T *)malloc(mem_size)); # 217 "tests/simpleTemplates/simpleTemplates.cu" __cudaSafeCall(cudaMemcpy(h_odata, d_odata, sizeof(T) * num_threads, cudaMemcpyDeviceToHost), "tests/simpleTemplates/simpleTemplates.cu", 218); # 220 "tests/simpleTemplates/simpleTemplates.cu" __cutilCheckError(cutStopTimer(timer), "tests/simpleTemplates/simpleTemplates.cu", 220); # 221 "tests/simpleTemplates/simpleTemplates.cu" printf("Processing time: %f (ms)\n", cutGetTimerValue(timer)); # 222 "tests/simpleTemplates/simpleTemplates.cu" __cutilCheckError(cutDeleteTimer(timer), "tests/simpleTemplates/simpleTemplates.cu", 222); # 225 "tests/simpleTemplates/simpleTemplates.cu" T *reference = ((T *)malloc(mem_size)); # 226 "tests/simpleTemplates/simpleTemplates.cu" computeGold< T> (reference, h_idata, num_threads); # 228 "tests/simpleTemplates/simpleTemplates.cu" ArrayComparator< T> comparator; # 229 "tests/simpleTemplates/simpleTemplates.cu" ArrayFileWriter< T> writer; # 232 "tests/simpleTemplates/simpleTemplates.cu" if (cutCheckCmdLineFlag(argc, (const char **)argv, "regression")) # 233 "tests/simpleTemplates/simpleTemplates.cu" { # 235 "tests/simpleTemplates/simpleTemplates.cu" __cutilCheckError((writer.write("./data/regression.dat", h_odata, num_threads, (0.0))), "tests/simpleTemplates/simpleTemplates.cu", 236); # 237 "tests/simpleTemplates/simpleTemplates.cu" } else # 239 "tests/simpleTemplates/simpleTemplates.cu" { # 242 "tests/simpleTemplates/simpleTemplates.cu" CUTBoolean res = ((comparator.compare(reference, h_odata, num_threads))); # 243 "tests/simpleTemplates/simpleTemplates.cu" printf("Compare %s\n\n", (1 == res) ? ("OK") : ("MISMATCH")); # 244 "tests/simpleTemplates/simpleTemplates.cu" g_TotalFailures += (1 != res); # 245 "tests/simpleTemplates/simpleTemplates.cu" } # 248 "tests/simpleTemplates/simpleTemplates.cu" free(h_idata); # 249 "tests/simpleTemplates/simpleTemplates.cu" free(h_odata); # 250 "tests/simpleTemplates/simpleTemplates.cu" free(reference); # 251 "tests/simpleTemplates/simpleTemplates.cu" __cudaSafeCall(cudaFree(d_idata), "tests/simpleTemplates/simpleTemplates.cu", 251); # 252 "tests/simpleTemplates/simpleTemplates.cu" __cudaSafeCall(cudaFree(d_odata), "tests/simpleTemplates/simpleTemplates.cu", 252); # 254 "tests/simpleTemplates/simpleTemplates.cu" cudaThreadExit(); # 255 "tests/simpleTemplates/simpleTemplates.cu" } # 1 "tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.stub.c" # 1 "tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.stub.c" # 1 "/tmp/tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.stub.c" 1 3 # 1 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 1 3 # 74 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 3 template <typename T> static inline void *__cudaAddressOf(T &val) { return (void *)(&(const_cast<char &>(reinterpret_cast<const volatile char &>(val)))); } # 103 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 3 extern "C" { extern void** __cudaRegisterFatBinary( void *fatCubin ); extern void __cudaUnregisterFatBinary( void **fatCubinHandle ); extern void __cudaRegisterVar( void **fatCubinHandle, char *hostVar, char *deviceAddress, const char *deviceName, int ext, int size, int constant, int global ); extern void __cudaRegisterTexture( void **fatCubinHandle, const struct textureReference *hostVar, const void **deviceAddress, const char *deviceName, int dim, int norm, int ext ); extern void __cudaRegisterSurface( void **fatCubinHandle, const struct surfaceReference *hostVar, const void **deviceAddress, const char *deviceName, int dim, int ext ); extern void __cudaRegisterFunction( void **fatCubinHandle, const char *hostFun, char *deviceFun, const char *deviceName, int thread_limit, uint3 *tid, uint3 *bid, dim3 *bDim, dim3 *gDim, int *wSize ); extern int atexit(void(*)(void)) throw(); } static void **__cudaFatCubinHandle; static void __cudaUnregisterBinaryUtil(void) { __cudaUnregisterFatBinary(__cudaFatCubinHandle); } # 1 "/usr/local/cuda4.1/cuda/include/common_functions.h" 1 3 # 159 "/usr/local/cuda4.1/cuda/include/common_functions.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/math_functions.h" 1 3 # 2935 "/usr/local/cuda4.1/cuda/include/math_functions.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/math_constants.h" 1 3 # 2936 "/usr/local/cuda4.1/cuda/include/math_functions.h" 2 3 # 5550 "/usr/local/cuda4.1/cuda/include/math_functions.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/crt/func_macro.h" 1 3 # 5551 "/usr/local/cuda4.1/cuda/include/math_functions.h" 2 3 # 7292 "/usr/local/cuda4.1/cuda/include/math_functions.h" 3 inline double rsqrt(double a) { return 1.0 / sqrt(a); } inline double rcbrt(double a) { double s, t; if (__isnan(a)) { return a + a; } if (a == 0.0 || __isinf(a)) { return 1.0 / a; } s = fabs(a); t = exp2(-3.3333333333333333e-1 * log2(s)); t = ((t*t) * (-s*t) + 1.0) * (3.3333333333333333e-1*t) + t; if (__signbit(a)) { t = -t; } return t; } inline double sinpi(double a) { int n; if (__isnan(a)) { return a + a; } if (a == 0.0 || __isinf(a)) { return sin (a); } if (a == floor(a)) { return ((a / 1.0e308) / 1.0e308) / 1.0e308; } a = remquo (a, 0.5, &n); a = a * 3.1415926535897931e+0; if (n & 1) { a = cos (a); } else { a = sin (a); } if (n & 2) { a = -a; } return a; } inline double cospi(double a) { int n; if (__isnan(a)) { return a + a; } if (__isinf(a)) { return cos (a); } if (fabs(a) > 9.0071992547409920e+015) { a = 0.0; } a = remquo (a, 0.5, &n); a = a * 3.1415926535897931e+0; n++; if (n & 1) { a = cos (a); } else { a = sin (a); } if (n & 2) { a = -a; } if (a == 0.0) { a = fabs(a); } return a; } inline double erfinv(double a) { double p, q, t, fa; volatile union { double d; unsigned long long int l; } cvt; fa = fabs(a); if (fa >= 1.0) { cvt.l = 0xfff8000000000000ull; t = cvt.d; if (fa == 1.0) { t = a * exp(1000.0); } } else if (fa >= 0.9375) { t = log1p(-fa); t = 1.0 / sqrt(-t); p = 2.7834010353747001060e-3; p = p * t + 8.6030097526280260580e-1; p = p * t + 2.1371214997265515515e+0; p = p * t + 3.1598519601132090206e+0; p = p * t + 3.5780402569085996758e+0; p = p * t + 1.5335297523989890804e+0; p = p * t + 3.4839207139657522572e-1; p = p * t + 5.3644861147153648366e-2; p = p * t + 4.3836709877126095665e-3; p = p * t + 1.3858518113496718808e-4; p = p * t + 1.1738352509991666680e-6; q = t + 2.2859981272422905412e+0; q = q * t + 4.3859045256449554654e+0; q = q * t + 4.6632960348736635331e+0; q = q * t + 3.9846608184671757296e+0; q = q * t + 1.6068377709719017609e+0; q = q * t + 3.5609087305900265560e-1; q = q * t + 5.3963550303200816744e-2; q = q * t + 4.3873424022706935023e-3; q = q * t + 1.3858762165532246059e-4; q = q * t + 1.1738313872397777529e-6; t = p / (q * t); if (a < 0.0) t = -t; } else if (fa >= 0.75) { t = a * a - .87890625; p = .21489185007307062000e+0; p = p * t - .64200071507209448655e+1; p = p * t + .29631331505876308123e+2; p = p * t - .47644367129787181803e+2; p = p * t + .34810057749357500873e+2; p = p * t - .12954198980646771502e+2; p = p * t + .25349389220714893917e+1; p = p * t - .24758242362823355486e+0; p = p * t + .94897362808681080020e-2; q = t - .12831383833953226499e+2; q = q * t + .41409991778428888716e+2; q = q * t - .53715373448862143349e+2; q = q * t + .33880176779595142685e+2; q = q * t - .11315360624238054876e+2; q = q * t + .20369295047216351160e+1; q = q * t - .18611650627372178511e+0; q = q * t + .67544512778850945940e-2; p = p / q; t = a * p; } else { t = a * a - .5625; p = - .23886240104308755900e+2; p = p * t + .45560204272689128170e+3; p = p * t - .22977467176607144887e+4; p = p * t + .46631433533434331287e+4; p = p * t - .43799652308386926161e+4; p = p * t + .19007153590528134753e+4; p = p * t - .30786872642313695280e+3; q = t - .83288327901936570000e+2; q = q * t + .92741319160935318800e+3; q = q * t - .35088976383877264098e+4; q = q * t + .59039348134843665626e+4; q = q * t - .48481635430048872102e+4; q = q * t + .18997769186453057810e+4; q = q * t - .28386514725366621129e+3; p = p / q; t = a * p; } return t; } inline double erfcinv(double a) { double t; volatile union { double d; unsigned long long int l; } cvt; if (__isnan(a)) { return a + a; } if (a <= 0.0) { cvt.l = 0xfff8000000000000ull; t = cvt.d; if (a == 0.0) { t = (1.0 - a) * exp(1000.0); } } else if (a >= 0.0625) { t = erfinv (1.0 - a); } else if (a >= 1e-100) { double p, q; t = log(a); t = 1.0 / sqrt(-t); p = 2.7834010353747001060e-3; p = p * t + 8.6030097526280260580e-1; p = p * t + 2.1371214997265515515e+0; p = p * t + 3.1598519601132090206e+0; p = p * t + 3.5780402569085996758e+0; p = p * t + 1.5335297523989890804e+0; p = p * t + 3.4839207139657522572e-1; p = p * t + 5.3644861147153648366e-2; p = p * t + 4.3836709877126095665e-3; p = p * t + 1.3858518113496718808e-4; p = p * t + 1.1738352509991666680e-6; q = t + 2.2859981272422905412e+0; q = q * t + 4.3859045256449554654e+0; q = q * t + 4.6632960348736635331e+0; q = q * t + 3.9846608184671757296e+0; q = q * t + 1.6068377709719017609e+0; q = q * t + 3.5609087305900265560e-1; q = q * t + 5.3963550303200816744e-2; q = q * t + 4.3873424022706935023e-3; q = q * t + 1.3858762165532246059e-4; q = q * t + 1.1738313872397777529e-6; t = p / (q * t); } else { double p, q; t = log(a); t = 1.0 / sqrt(-t); p = 6.9952990607058154858e-1; p = p * t + 1.9507620287580568829e+0; p = p * t + 8.2810030904462690216e-1; p = p * t + 1.1279046353630280005e-1; p = p * t + 6.0537914739162189689e-3; p = p * t + 1.3714329569665128933e-4; p = p * t + 1.2964481560643197452e-6; p = p * t + 4.6156006321345332510e-9; p = p * t + 4.5344689563209398450e-12; q = t + 1.5771922386662040546e+0; q = q * t + 2.1238242087454993542e+0; q = q * t + 8.4001814918178042919e-1; q = q * t + 1.1311889334355782065e-1; q = q * t + 6.0574830550097140404e-3; q = q * t + 1.3715891988350205065e-4; q = q * t + 1.2964671850944981713e-6; q = q * t + 4.6156017600933592558e-9; q = q * t + 4.5344687377088206783e-12; t = p / (q * t); } return t; } inline double erfcx(double a) { double x, t1, t2, t3; if (__isnan(a)) { return a + a; } x = fabs(a); if (x < 32.0) { # 7577 "/usr/local/cuda4.1/cuda/include/math_functions.h" 3 t1 = x - 4.0; t2 = x + 4.0; t2 = t1 / t2; t1 = - 3.5602694826817400E-010; t1 = t1 * t2 - 9.7239122591447274E-009; t1 = t1 * t2 - 8.9350224851649119E-009; t1 = t1 * t2 + 1.0404430921625484E-007; t1 = t1 * t2 + 5.8806698585341259E-008; t1 = t1 * t2 - 8.2147414929116908E-007; t1 = t1 * t2 + 3.0956409853306241E-007; t1 = t1 * t2 + 5.7087871844325649E-006; t1 = t1 * t2 - 1.1231787437600085E-005; t1 = t1 * t2 - 2.4399558857200190E-005; t1 = t1 * t2 + 1.5062557169571788E-004; t1 = t1 * t2 - 1.9925637684786154E-004; t1 = t1 * t2 - 7.5777429182785833E-004; t1 = t1 * t2 + 5.0319698792599572E-003; t1 = t1 * t2 - 1.6197733895953217E-002; t1 = t1 * t2 + 3.7167515553018733E-002; t1 = t1 * t2 - 6.6330365827532434E-002; t1 = t1 * t2 + 9.3732834997115544E-002; t1 = t1 * t2 - 1.0103906603555676E-001; t1 = t1 * t2 + 6.8097054254735140E-002; t1 = t1 * t2 + 1.5379652102605428E-002; t1 = t1 * t2 - 1.3962111684056291E-001; t1 = t1 * t2 + 1.2329951186255526E+000; t2 = 2.0 * x + 1.0; t1 = t1 / t2; } else { t2 = 1.0 / x; t3 = t2 * t2; t1 = -29.53125; t1 = t1 * t3 + 6.5625; t1 = t1 * t3 - 1.875; t1 = t1 * t3 + 0.75; t1 = t1 * t3 - 0.5; t1 = t1 * t3 + 1.0; t2 = t2 * 5.6418958354775628e-001; t1 = t1 * t2; } if (a < 0.0) { t2 = ((int)(x * 16.0)) * 0.0625; t3 = (x - t2) * (x + t2); t3 = exp(t2 * t2) * exp(t3); t3 = t3 + t3; t1 = t3 - t1; } return t1; } inline float rsqrtf(float a) { return (float)rsqrt((double)a); } inline float rcbrtf(float a) { return (float)rcbrt((double)a); } inline float sinpif(float a) { return (float)sinpi((double)a); } inline float cospif(float a) { return (float)cospi((double)a); } inline float erfinvf(float a) { return (float)erfinv((double)a); } inline float erfcinvf(float a) { return (float)erfcinv((double)a); } inline float erfcxf(float a) { return (float)erfcx((double)a); } inline int min(int a, int b) { return a < b ? a : b; } inline unsigned int umin(unsigned int a, unsigned int b) { return a < b ? a : b; } inline long long int llmin(long long int a, long long int b) { return a < b ? a : b; } inline unsigned long long int ullmin(unsigned long long int a, unsigned long long int b) { return a < b ? a : b; } inline int max(int a, int b) { return a > b ? a : b; } inline unsigned int umax(unsigned int a, unsigned int b) { return a > b ? a : b; } inline long long int llmax(long long int a, long long int b) { return a > b ? a : b; } inline unsigned long long int ullmax(unsigned long long int a, unsigned long long int b) { return a > b ? a : b; } # 7730 "/usr/local/cuda4.1/cuda/include/math_functions.h" 3 # 1 "/usr/local/cuda4.1/cuda/include/math_functions_dbl_ptx3.h" 1 3 # 7731 "/usr/local/cuda4.1/cuda/include/math_functions.h" 2 3 # 160 "/usr/local/cuda4.1/cuda/include/common_functions.h" 2 3 # 176 "/usr/local/cuda4.1/cuda/include/crt/host_runtime.h" 2 3 #pragma pack() # 2 "/tmp/tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.stub.c" 2 3 # 1 "/tmp/tmpxft_000072bb_00000000-3_simpleTemplates.fatbin.c" 1 3 asm( ".section .nv_fatbin, \"a\"\n" ".align 8\n" "fatbinData:\n" ".quad 0x00100001ba55ed50,0x00000000000011ad,0x0000007001000001,0x0000000000000839\n" ".quad 0x0000003800000000,0x0000001400030000,0x0000002800000040,0x0000000000000015\n" ".quad 0x0000000000000000,0x0000000000000000,0x69732f7374736574,0x706d6554656c706d\n" ".quad 0x69732f736574616c,0x706d6554656c706d,0x75632e736574616c,0x0000000000000000\n" ".quad 0x762e0a0a0a0a0a0a,0x33206e6f69737265,0x677261742e0a302e,0x30325f6d73207465\n" ".quad 0x7365726464612e0a,0x3620657a69735f73,0x656c69662e0a0a34,0x706d742f22203109\n" ".quad 0x5f746678706d742f,0x6262323730303030,0x303030303030305f,0x706d69735f372d30\n" ".quad 0x616c706d6554656c,0x337070632e736574,0x6c69662e0a22692e,0x7365742220320965\n" ".quad 0x6c706d69732f7374,0x74616c706d655465,0x6c706d69732f7365,0x74616c706d655465\n" ".quad 0x656e72656b5f7365,0x652e0a2275632e6c,0x732e206e72657478,0x612e206465726168\n" ".quad 0x2e2034206e67696c,0x6f6c665f73203862,0x652e0a3b5d5b7461,0x732e206e72657478\n" ".quad 0x612e206465726168,0x2e2034206e67696c,0x746e695f73203862,0x6e652e0a0a3b5d5b\n" ".quad 0x30315a5f20797274,0x6e72654b74736574,0x5450764566496c65,0x702e0a285f31535f\n" ".quad 0x36752e206d617261,0x657430315a5f2034,0x6c656e72654b7473,0x535f545076456649\n" ".quad 0x6d617261705f5f31,0x7261702e0a2c305f,0x203436752e206d61,0x7473657430315a5f\n" ".quad 0x66496c656e72654b,0x5f31535f54507645,0x315f6d617261705f,0x65722e0a7b0a290a\n" ".quad 0x25203233662e2067,0x722e0a3b3e363c66,0x203233732e206765,0x2e0a3b3e393c7225\n" ".quad 0x3436732e20676572,0x3e32313c6c722520,0x702e646c0a0a0a3b,0x3436752e6d617261\n" ".quad 0x5b202c346c722520,0x7473657430315a5f,0x66496c656e72654b,0x5f31535f54507645\n" ".quad 0x305f6d617261705f,0x61702e646c0a3b5d,0x203436752e6d6172,0x5f5b202c356c7225\n" ".quad 0x4b7473657430315a,0x4566496c656e7265,0x5f5f31535f545076,0x5d315f6d61726170\n" ".quad 0x742e617476630a3b,0x6c61626f6c672e6f,0x6c7225203436752e,0x3b356c7225202c31\n" ".quad 0x203220636f6c2e0a,0x766f6d0a31203933,0x317225203233752e,0x782e64697425202c\n" ".quad 0x3220636f6c2e0a3b,0x76630a3120363420,0x33752e3436752e74,0x202c326c72252032\n" ".quad 0x7476630a3b317225,0x6f6c672e6f742e61,0x203436752e6c6162,0x7225202c366c7225\n" ".quad 0x636f6c2e0a3b346c,0x0a31203634203220,0x656469772e6c756d,0x6c7225203233752e\n" ".quad 0x202c317225202c37,0x732e6464610a3b34,0x2c386c7225203436,0x25202c366c722520\n" ".quad 0x766f6d0a3b376c72,0x6c7225203436752e,0x6f6c665f73202c39,0x2e6464610a3b7461\n" ".quad 0x336c722520343673,0x202c396c7225202c,0x6c2e0a3b376c7225,0x203634203220636f\n" ".quad 0x6f6c672e646c0a31,0x203233662e6c6162,0x72255b202c316625,0x2e74730a3b5d386c\n" ".quad 0x662e646572616873,0x336c72255b203233,0x0a3b316625202c5d,0x34203220636f6c2e\n" ".quad 0x2e7261620a312037,0x0a3b3020636e7973,0x34203220636f6c2e,0x2e766f6d0a312031\n" ".quad 0x2c34722520323375,0x782e6469746e2520,0x3220636f6c2e0a3b,0x76630a3120303520\n" ".quad 0x3233662e6e722e74,0x326625203233752e,0x6c0a3b347225202c,0x6465726168732e64\n" ".quad 0x336625203233662e,0x5d336c72255b202c,0x33662e6c756d0a3b,0x25202c3466252032\n" ".quad 0x3b336625202c3266,0x726168732e74730a,0x5b203233662e6465,0x25202c5d336c7225\n" ".quad 0x636f6c2e0a3b3466,0x0a31203135203220,0x636e79732e726162,0x636f6c2e0a3b3020\n" ".quad 0x0a31203435203220,0x203436622e6c6873,0x25202c30316c7225,0x0a3b32202c326c72\n" ".quad 0x203436732e646461,0x25202c31316c7225,0x6c7225202c316c72,0x732e646c0a3b3031\n" ".quad 0x33662e6465726168,0x5b202c3566252032,0x730a3b5d336c7225,0x6c61626f6c672e74\n" ".quad 0x72255b203233662e,0x6625202c5d31316c,0x20636f6c2e0a3b35,0x720a322035352032\n" ".quad 0x2e0a0a7d0a3b7465,0x5a5f207972746e65,0x654b747365743031,0x764569496c656e72\n" ".quad 0x0a285f31535f5450,0x2e206d617261702e,0x30315a5f20343675,0x6e72654b74736574\n" ".quad 0x5450764569496c65,0x7261705f5f31535f,0x702e0a2c305f6d61,0x36752e206d617261\n" ".quad 0x657430315a5f2034,0x6c656e72654b7473,0x535f545076456949,0x6d617261705f5f31\n" ".quad 0x2e0a7b0a290a315f,0x3233732e20676572,0x3b3e33313c722520,0x732e206765722e0a\n" ".quad 0x313c6c7225203436,0x646c0a0a0a3b3e32,0x752e6d617261702e,0x2c346c7225203436\n" ".quad 0x657430315a5f5b20,0x6c656e72654b7473,0x535f545076456949,0x6d617261705f5f31\n" ".quad 0x2e646c0a3b5d305f,0x36752e6d61726170,0x202c356c72252034,0x73657430315a5f5b\n" ".quad 0x496c656e72654b74,0x31535f5450764569,0x5f6d617261705f5f,0x617476630a3b5d31\n" ".quad 0x626f6c672e6f742e,0x25203436752e6c61,0x6c7225202c316c72,0x20636f6c2e0a3b35\n" ".quad 0x6d0a312039332032,0x25203233752e766f,0x64697425202c3172,0x636f6c2e0a3b782e\n" ".quad 0x0a31203634203220,0x2e3436752e747663,0x326c722520323375,0x630a3b317225202c\n" ".quad 0x672e6f742e617476,0x36752e6c61626f6c,0x202c366c72252034,0x6c2e0a3b346c7225\n" ".quad 0x203634203220636f,0x69772e6c756d0a31,0x25203233752e6564,0x317225202c376c72\n" ".quad 0x6464610a3b34202c,0x6c7225203436732e,0x2c366c7225202c38,0x6d0a3b376c722520\n" ".quad 0x25203436752e766f,0x695f73202c396c72,0x2e6464610a3b746e,0x336c722520343673\n" ".quad 0x202c396c7225202c,0x6c2e0a3b376c7225,0x203634203220636f,0x6f6c672e646c0a31\n" ".quad 0x203233752e6c6162,0x72255b202c327225,0x2e74730a3b5d386c,0x752e646572616873\n" ".quad 0x336c72255b203233,0x0a3b327225202c5d,0x34203220636f6c2e,0x2e7261620a312037\n" ".quad 0x0a3b3020636e7973,0x35203220636f6c2e,0x732e646c0a312030,0x33752e6465726168\n" ".quad 0x5b202c3572252032,0x2e0a3b5d336c7225,0x3134203220636f6c,0x752e766f6d0a3120\n" ".quad 0x202c377225203233,0x3b782e6469746e25,0x203220636f6c2e0a,0x6c756d0a31203035\n" ".quad 0x203233732e6f6c2e,0x357225202c387225,0x730a3b377225202c,0x6465726168732e74\n" ".quad 0x72255b203233752e,0x387225202c5d336c,0x3220636f6c2e0a3b,0x61620a3120313520\n" ".quad 0x3020636e79732e72,0x3220636f6c2e0a3b,0x68730a3120343520,0x7225203436622e6c\n" ".quad 0x6c7225202c30316c,0x64610a3b32202c32,0x7225203436732e64,0x6c7225202c31316c\n" ".quad 0x30316c7225202c31,0x6168732e646c0a3b,0x203233752e646572,0x255b202c30317225\n" ".quad 0x74730a3b5d336c72,0x2e6c61626f6c672e,0x6c72255b20323375,0x317225202c5d3131\n" ".quad 0x20636f6c2e0a3b30,0x720a322035352032,0x0a0a0a7d0a3b7465,0x0000680100000200\n" ".quad 0x0000000000089c00,0x0000000000000000,0x0000140001000400,0x0000280000003800\n" ".quad 0x0000000000001500,0x0000000000000000,0x732f737473657400,0x6d6554656c706d69\n" ".quad 0x732f736574616c70,0x6d6554656c706d69,0x632e736574616c70,0x0000000000000075\n" ".quad 0x010102464c457f00,0x0000000000000433,0x00000100be000200,0x0000000000000000\n" ".quad 0x000000000007f400,0x0000000000004000,0x3800400014051400,0x01000b0040000300\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000030000000100,0x0000000000000000,0x0000000000000000,0x0000000000030000\n" ".quad 0x0000000000010f00,0x0000000000000000,0x0000000000000400,0x0000000000000000\n" ".quad 0x0000030000000b00,0x0000000000000000,0x0000000000000000,0x0000000000040f00\n" ".quad 0x0000000000003300,0x0000000000000000,0x0000000000000100,0x0000000000000000\n" ".quad 0x0000020000001300,0x0000000000000000,0x0000000000000000,0x0000000000044200\n" ".quad 0x0000000000016800,0x00000d0000000200,0x0000000000000100,0x0000000000001800\n" ".quad 0x0000010000008000,0x0000000010000600,0x0000000000000000,0x000000000005aa00\n" ".quad 0x000000000000a800,0x0000090000000300,0x0000000000000408,0x0000000000000000\n" ".quad 0x000001000000e800,0x0000000000000200,0x0000000000000000,0x0000000000065200\n" ".quad 0x0000000000003000,0x0000040000000000,0x0000000000000400,0x0000000000000000\n" ".quad 0x0000010000009f00,0x0000000000000200,0x0000000000000000,0x0000000000068200\n" ".quad 0x0000000000003000,0x0000040000000000,0x0000000000000100,0x0000000000000000\n" ".quad 0x0000010000003600,0x0000000010000600,0x0000000000000000,0x000000000006b200\n" ".quad 0x000000000000b000,0x0000060000000300,0x0000000000000408,0x0000000000000000\n" ".quad 0x000001000000c100,0x0000000000000200,0x0000000000000000,0x0000000000076200\n" ".quad 0x0000000000003000,0x0000070000000000,0x0000000000000400,0x0000000000000000\n" ".quad 0x0000010000005e00,0x0000000000000200,0x0000000000000000,0x0000000000079200\n" ".quad 0x0000000000003000,0x0000070000000000,0x0000000000000100,0x0000000000000000\n" ".quad 0x0000010000005500,0x0000000000000200,0x0000000000000000,0x000000000007c200\n" ".quad 0x0000000000003000,0x0000000000000000,0x0000000000000100,0x0000000000000000\n" ".quad 0x72747368732e0000,0x7274732e00626174,0x6d79732e00626174,0x2e766e2e00626174\n" ".quad 0x692e6c61626f6c67,0x2e766e2e0074696e,0x2e006c61626f6c67,0x315a5f2e74786574\n" ".quad 0x72654b7473657430,0x50764566496c656e,0x6e2e005f31535f54,0x2e006f666e692e76\n" ".quad 0x2e6f666e692e766e,0x7473657430315a5f,0x66496c656e72654b,0x5f31535f54507645\n" ".quad 0x5f2e747865742e00,0x4b7473657430315a,0x4569496c656e7265,0x005f31535f545076\n" ".quad 0x6f666e692e766e2e,0x73657430315a5f2e,0x496c656e72654b74,0x31535f5450764569\n" ".quad 0x6f632e766e2e005f,0x2e30746e6174736e,0x7473657430315a5f,0x66496c656e72654b\n" ".quad 0x5f31535f54507645,0x6e6f632e766e2e00,0x5f2e30746e617473,0x4b7473657430315a\n" ".quad 0x4569496c656e7265,0x005f31535f545076,0x73657430315a5f00,0x496c656e72654b74\n" ".quad 0x31535f5450764566,0x657430315a5f005f,0x6c656e72654b7473,0x535f545076456949\n" ".quad 0x0000000000005f31,0x0000000000000000,0x0000000000000000,0x0300000000000000\n" ".quad 0x0000000000000100,0x0000000000000000,0x0300000000000000,0x0000000000000200\n" ".quad 0x0000000000000000,0x0300000000000000,0x0000000000000300,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000000000,0x0000000000000000,0x0300000000000000\n" ".quad 0x0000000000000000,0x0000000000000000,0x0300000000000000,0x0000000000000700\n" ".quad 0x00000000b0000000,0x0300000000000000,0x0000000000000a00,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000000900,0x0000000000000000,0x0300000000000000\n" ".quad 0x0000000000000400,0x00000000a8000000,0x0300000000000000,0x0000000000000600\n" ".quad 0x0000000000000000,0x0300000000000000,0x0000000000000800,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000000500,0x0000000000000000,0x1200000001000000\n" ".quad 0x0000000000000710,0x00000000b0000000,0x120000001a000000,0x0000000000000410\n" ".quad 0x00000000a8000000,0x0400005de4000000,0x0084009c04280044,0x00fc1fdc032c0000\n" ".quad 0x000820de03207e00,0x0010201c436000c0,0x0080311c035000c0,0x0090015c43480140\n" ".quad 0x0000401c85480040,0x0000301c85840000,0x00ffffdc04c90000,0x0000301c8550ee00\n" ".quad 0x0020001ca3c10000,0x0000301c85500040,0x00ffffdc04c90000,0x00a0001de450ee00\n" ".quad 0x0078211c03280040,0x0010219c035800c0,0x0000301c852001c0,0x00b041dc43c10000\n" ".quad 0x0000601c85480040,0x0000001de7940000,0x0000000000800000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0c00080a04000000,0x0300100020000000,0x00000c1704001019,0x0000080001000000\n" ".quad 0x00000c17040021f0,0x0000000000000000,0x0400005de40021f0,0x0084009c04280044\n" ".quad 0x00fc1fdc032c0000,0x000820de03207e00,0x0010201c436000c0,0x0080311c035000c0\n" ".quad 0x0090015c43480140,0x0000401c85480040,0x0000301c85840000,0x00ffffdc04c90000\n" ".quad 0x0000301c8550ee00,0x0021211c04c10000,0x0000401c00180040,0x0000301c85580000\n" ".quad 0x00ffffdc04c90000,0x00a0001de450ee00,0x0078211c03280040,0x0010219c035800c0\n" ".quad 0x0000301c852001c0,0x00b041dc43c10000,0x0000601c85480040,0x0000001de7940000\n" ".quad 0x0000000000800000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0000000000000000,0x0b00080a04000000,0x0300100020000000\n" ".quad 0x00000c1704001019,0x0000080001000000,0x00000c17040021f0,0x0000000000000000\n" ".quad 0x0e000812040021f0,0x0400000000000000,0x000000000e000811,0x0d00081204000000\n" ".quad 0x0400000000000000,0x000000000d000811,0x0000060000000000,0x0007f40000000500\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000a80000000000,0x0000a80000000000\n" ".quad 0x0000040000000000,0x0000000000000000,0x0005aa00000e0560,0x0000000000000000\n" ".quad 0x0000000000000000,0x0001080000000000,0x0001080000000000,0x0000040000000000\n" ".quad 0x0000000000000000,0x0006b200000d0560,0x0000000000000000,0x0000000000000000\n" ".quad 0x0001100000000000,0x0001100000000000,0x0000040000000000,0x0000000000000000\n" ".text"); extern "C" { extern const unsigned long long fatbinData[568]; } extern "C" { static const struct {int m; int v; const unsigned long long* d; char* f;} __fatDeviceText __attribute__ ((aligned (8))) __attribute__ ((section (".nvFatBinSegment")))= { 0x466243b1, 1, fatbinData, 0 }; } # 3 "/tmp/tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.stub.c" 2 3 static void __device_stub__Z10testKernelIfEvPT_S1_(float *, float *); static void __device_stub__Z10testKernelIiEvPT_S1_(int *, int *); static void __sti____cudaRegisterAll_50_tmpxft_000072bb_00000000_4_simpleTemplates_cpp1_ii_4d17bf75(void) __attribute__((__constructor__)); static void __device_stub__Z10testKernelIfEvPT_S1_(float *__par0, float *__par1){if (cudaSetupArgument((void *)(char *)&__par0, sizeof(__par0), (size_t)0UL) != cudaSuccess) return;if (cudaSetupArgument((void *)(char *)&__par1, sizeof(__par1), (size_t)8UL) != cudaSuccess) return;{ volatile static char *__f; __f = ((char *)((void ( *)(float *, float *))testKernel<float> )); (void)cudaLaunch(((char *)((void ( *)(float *, float *))testKernel<float> ))); };} template<> void __wrapper__device_stub_testKernel<float>( float *&__cuda_0,float *&__cuda_1){__device_stub__Z10testKernelIfEvPT_S1_( __cuda_0,__cuda_1);} static void __device_stub__Z10testKernelIiEvPT_S1_(int *__par0, int *__par1){if (cudaSetupArgument((void *)(char *)&__par0, sizeof(__par0), (size_t)0UL) != cudaSuccess) return;if (cudaSetupArgument((void *)(char *)&__par1, sizeof(__par1), (size_t)8UL) != cudaSuccess) return;{ volatile static char *__f; __f = ((char *)((void ( *)(int *, int *))testKernel<int> )); (void)cudaLaunch(((char *)((void ( *)(int *, int *))testKernel<int> ))); };} template<> void __wrapper__device_stub_testKernel<int>( int *&__cuda_0,int *&__cuda_1){__device_stub__Z10testKernelIiEvPT_S1_( __cuda_0,__cuda_1);} static void __sti____cudaRegisterAll_50_tmpxft_000072bb_00000000_4_simpleTemplates_cpp1_ii_4d17bf75(void){__cudaFatCubinHandle = __cudaRegisterFatBinary((void*)&__fatDeviceText); atexit(__cudaUnregisterBinaryUtil);__cudaRegisterFunction(__cudaFatCubinHandle, (const char*)((void ( *)(int *, int *))testKernel<int> ), (char*)"_Z10testKernelIiEvPT_S1_", "_Z10testKernelIiEvPT_S1_", -1, (uint3*)0, (uint3*)0, (dim3*)0, (dim3*)0, (int*)0);__cudaRegisterFunction(__cudaFatCubinHandle, (const char*)((void ( *)(float *, float *))testKernel<float> ), (char*)"_Z10testKernelIfEvPT_S1_", "_Z10testKernelIfEvPT_S1_", -1, (uint3*)0, (uint3*)0, (dim3*)0, (dim3*)0, (int*)0);} # 2 "tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.stub.c" 2 # 1 "tmpxft_000072bb_00000000-1_simpleTemplates.cudafe1.stub.c"
gtcasl/gpuocelot
tests/cuda3.2/tests/simpleTemplates/simpleTemplates.cu.cpp
C++
bsd-3-clause
856,380
/* * Copyright (c) InWorldz Halcyon Developers * Copyright (c) Contributors, http://opensimulator.org/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the OpenSim Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.Framework.Interfaces { public interface IAgentAssetTransactions { bool HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item); void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask); void HandleTaskItemUpdateFromTransaction( IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item); void RemoveAgentAssetTransactions(UUID userID); } }
BogusCurry/halcyon
OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs
C#
bsd-3-clause
2,488
<?php use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $model common\models\Home */ $this->title = 'Create Home'; $this->params['breadcrumbs'][] = ['label' => 'Homes', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="home-create"> <h1><?= Html::encode($this->title) ?></h1> <?= $this->render('_form', [ 'model' => $model, ]) ?> </div>
TranVanSinh/sinh-demo
backend/views/home/create.php
PHP
bsd-3-clause
407
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" #include "app/sql/connection.h" #include "base/file_util.h" #include "base/memory/scoped_temp_dir.h" #include "googleurl/src/gurl.h" #include "webkit/quota/quota_database.h" namespace { const base::Time kZeroTime; class TestErrorDelegate : public sql::ErrorDelegate { public: virtual ~TestErrorDelegate() { } virtual int OnError( int error, sql::Connection* connection, sql::Statement* stmt) { return error; } }; } // namespace namespace quota { TEST(QuotaDatabaseTest, LazyOpen) { ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); QuotaDatabase db(kDbFile); EXPECT_FALSE(db.LazyOpen(false)); ASSERT_TRUE(db.LazyOpen(true)); EXPECT_TRUE(file_util::PathExists(kDbFile)); } TEST(QuotaDatabaseTest, OriginQuota) { ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); QuotaDatabase db(kDbFile); ASSERT_TRUE(db.LazyOpen(true)); const GURL kOrigin("http://foo.com:8080/"); const int kQuota1 = 13579; const int kQuota2 = kQuota1 + 1024; int64 quota = -1; EXPECT_FALSE(db.GetOriginQuota(kOrigin, kStorageTypeTemporary, &quota)); EXPECT_FALSE(db.GetOriginQuota(kOrigin, kStorageTypePersistent, &quota)); // Insert quota for temporary. EXPECT_TRUE(db.SetOriginQuota(kOrigin, kStorageTypeTemporary, kQuota1)); EXPECT_TRUE(db.GetOriginQuota(kOrigin, kStorageTypeTemporary, &quota)); EXPECT_EQ(kQuota1, quota); // Update quota for temporary. EXPECT_TRUE(db.SetOriginQuota(kOrigin, kStorageTypeTemporary, kQuota2)); EXPECT_TRUE(db.GetOriginQuota(kOrigin, kStorageTypeTemporary, &quota)); EXPECT_EQ(kQuota2, quota); // Quota for persistent must not be updated. EXPECT_FALSE(db.GetOriginQuota(kOrigin, kStorageTypePersistent, &quota)); // Delete temporary storage info. EXPECT_TRUE(db.DeleteStorageInfo(kOrigin, kStorageTypeTemporary)); EXPECT_FALSE(db.GetOriginQuota(kOrigin, kStorageTypeTemporary, &quota)); } TEST(QuotaDatabaseTest, GlobalQuota) { ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); QuotaDatabase db(kDbFile); ASSERT_TRUE(db.LazyOpen(true)); const int kQuota1 = 9999; const int kQuota2 = 86420; int64 quota = -1; EXPECT_FALSE(db.GetGlobalQuota(kStorageTypeTemporary, &quota)); EXPECT_FALSE(db.GetGlobalQuota(kStorageTypePersistent, &quota)); EXPECT_TRUE(db.SetGlobalQuota(kStorageTypeTemporary, kQuota1)); EXPECT_TRUE(db.GetGlobalQuota(kStorageTypeTemporary, &quota)); EXPECT_EQ(kQuota1, quota); EXPECT_TRUE(db.SetGlobalQuota(kStorageTypeTemporary, kQuota1 + 1024)); EXPECT_TRUE(db.GetGlobalQuota(kStorageTypeTemporary, &quota)); EXPECT_EQ(kQuota1 + 1024, quota); EXPECT_FALSE(db.GetGlobalQuota(kStorageTypePersistent, &quota)); EXPECT_TRUE(db.SetGlobalQuota(kStorageTypePersistent, kQuota2)); EXPECT_TRUE(db.GetGlobalQuota(kStorageTypePersistent, &quota)); EXPECT_EQ(kQuota2, quota); } TEST(QuotaDatabaseTest, OriginLastAccessTimeLRU) { ScopedTempDir data_dir; ASSERT_TRUE(data_dir.CreateUniqueTempDir()); const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db"); QuotaDatabase db(kDbFile); ASSERT_TRUE(db.LazyOpen(true)); std::vector<GURL> origins; EXPECT_TRUE(db.GetLRUOrigins(kStorageTypeTemporary, &origins, -1, 10)); EXPECT_EQ(0U, origins.size()); const GURL kOrigin1("http://a/"); const GURL kOrigin2("http://b/"); const GURL kOrigin3("http://c/"); const GURL kOrigin4("http://p/"); // Adding three temporary storages, and EXPECT_TRUE(db.SetOriginLastAccessTime( kOrigin1, kStorageTypeTemporary, base::Time::FromInternalValue(10))); EXPECT_TRUE(db.SetOriginLastAccessTime( kOrigin2, kStorageTypeTemporary, base::Time::FromInternalValue(20))); EXPECT_TRUE(db.SetOriginLastAccessTime( kOrigin3, kStorageTypeTemporary, base::Time::FromInternalValue(30))); // one persistent. EXPECT_TRUE(db.SetOriginLastAccessTime( kOrigin4, kStorageTypePersistent, base::Time::FromInternalValue(40))); EXPECT_TRUE(db.GetLRUOrigins(kStorageTypeTemporary, &origins, 0, 10)); ASSERT_EQ(3U, origins.size()); EXPECT_EQ(kOrigin1.spec(), origins[0].spec()); EXPECT_EQ(kOrigin2.spec(), origins[1].spec()); EXPECT_EQ(kOrigin3.spec(), origins[2].spec()); EXPECT_TRUE(db.SetOriginLastAccessTime( kOrigin1, kStorageTypeTemporary, base::Time::Now())); EXPECT_TRUE(db.GetLRUOrigins(kStorageTypeTemporary, &origins, 0, 10)); // Now kOrigin1 has used_count=1, so it should not be in the returned list. ASSERT_EQ(2U, origins.size()); EXPECT_EQ(kOrigin2.spec(), origins[0].spec()); EXPECT_EQ(kOrigin3.spec(), origins[1].spec()); // Query again without used_count condition. EXPECT_TRUE(db.GetLRUOrigins(kStorageTypeTemporary, &origins, -1, 10)); // Now kOrigin1 must be returned as the newest one. ASSERT_EQ(3U, origins.size()); EXPECT_EQ(kOrigin2.spec(), origins[0].spec()); EXPECT_EQ(kOrigin3.spec(), origins[1].spec()); EXPECT_EQ(kOrigin1.spec(), origins[2].spec()); } } // namespace quota
meego-tablet-ux/meego-app-browser
webkit/quota/quota_database_unittest.cc
C++
bsd-3-clause
5,435
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated SignedSource<<ee5e86507eddfb55611192bc83af1092>> * @flow * @lightSyntaxTransform * @nogrep */ /* eslint-disable */ 'use strict'; /*:: import type { NormalizationSplitOperation } from 'relay-runtime'; */ var node/*: NormalizationSplitOperation*/ = { "kind": "SplitOperation", "metadata": {}, "name": "RelayModernEnvironmentExecuteWithPluralMatchTestPlainUserNameRenderer_name$normalization", "selections": [ { "alias": null, "args": null, "kind": "ScalarField", "name": "plaintext", "storageKey": null }, { "alias": null, "args": null, "concreteType": "PlainUserNameData", "kind": "LinkedField", "name": "data", "plural": false, "selections": [ { "alias": null, "args": null, "kind": "ScalarField", "name": "text", "storageKey": null }, { "alias": null, "args": null, "kind": "ScalarField", "name": "id", "storageKey": null } ], "storageKey": null } ] }; if (__DEV__) { (node/*: any*/).hash = "9c56fbb6f29aa60f10bd7143f29214ff"; } module.exports = node;
yungsters/relay
packages/relay-runtime/store/__tests__/__generated__/RelayModernEnvironmentExecuteWithPluralMatchTestPlainUserNameRenderer_name$normalization.graphql.js
JavaScript
bsd-3-clause
1,411
/* * $Id$ * $URL$ */ package org.subethamail.common; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; /** * Some static utility methods to convert between various formats. * * @author Jeff Schnitzer */ public class Converter { /** default constructor keeps util class from being created. */ private Converter() {} /** * Converts from the String version to a native object * of type clazz by calling the static valueOf(String) method. * This is the opposite of an object's toString() method. */ public static Object valueOf(String stringValue, Class<?> clazz) throws Exception { try { if (clazz.equals(String.class)) { return stringValue; } else if (clazz.equals(Character.class)) { return stringValue.charAt(0); } else { Method m = clazz.getMethod("valueOf", String.class); return m.invoke(null, stringValue); } } catch (InvocationTargetException ex) { // We want to throw the real exception instead of the one we have here. if (ex.getCause() instanceof Exception) throw (Exception)ex.getCause(); else if (ex.getCause() instanceof Error) throw (Error)ex.getCause(); else throw ex; } catch (NoSuchMethodException ex) { // More useful error message? throw new NoSuchMethodException("Class " + clazz + " does not have a valueOf(String) method"); } // catch (IllegalAccessException ex) // { // // More useful error message? // throw new IllegalAccessException("Unable to invoke " + clazz + ".valueOf(String)"); // } } }
voodoodyne/subetha
src/main/java/org/subethamail/common/Converter.java
Java
bsd-3-clause
1,646
/**************************************************************************************** MiniSat -- Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson CryptoMiniSat -- Copyright (c) 2009 Mate Soos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************************************/ #ifndef VARREPLACER_H #define VARREPLACER_H #ifdef _MSC_VER #include "msvc/stdint.h" #else #include <stdint.h> #endif //_MSC_VER #include <map> #include <vector> using std::map; using std::vector; #include "Solver.h" #include "SolverTypes.h" #include "Clause.h" #include "Vec.h" namespace MINISAT { using namespace MINISAT; class VarReplacer { public: VarReplacer(Solver& solver); ~VarReplacer(); bool performReplace(bool always = false); bool needsReplace(); template<class T> bool replace(T& ps, bool xor_clause_inverted, const uint group); void extendModelPossible() const; void extendModelImpossible(Solver& solver2) const; void reattachInternalClauses(); uint getNumReplacedLits() const; uint getNumReplacedVars() const; uint getNumLastReplacedVars() const; uint getNewToReplaceVars() const; uint32_t getNumTrees() const; const vector<Var> getReplacingVars() const; const vector<Lit>& getReplaceTable() const; const vec<Clause*>& getClauses() const; bool varHasBeenReplaced(const Var var) const; bool replacingVar(const Var var) const; void newVar(); //No need to update, only stores binary clauses, that //have been allocated within pool //friend class ClauseAllocator; private: bool performReplaceInternal(); bool replace_set(vec<Clause*>& cs, bool binClauses); bool replace_set(vec<XorClause*>& cs); bool handleUpdatedClause(Clause& c, const Lit origLit1, const Lit origLit2); bool handleUpdatedClause(XorClause& c, const Var origVar1, const Var origVar2); template<class T> void addBinaryXorClause(T& ps, bool xor_clause_inverted, uint group, bool internal = false); void setAllThatPointsHereTo(const Var var, const Lit lit); bool alreadyIn(const Var var, const Lit lit); vector<Lit> table; map<Var, vector<Var> > reverseTable; vec<Clause*> clauses; uint replacedLits; uint replacedVars; uint lastReplacedVars; Solver& solver; }; inline bool VarReplacer::performReplace(const bool always) { //uint32_t limit = std::min((uint32_t)((double)solver.order_heap.size()*PERCENTAGEPERFORMREPLACE), FIXCLEANREPLACE); uint32_t limit = (uint32_t)((double)solver.order_heap.size()*PERCENTAGEPERFORMREPLACE); if ((always && getNewToReplaceVars() > 0) || getNewToReplaceVars() > limit) return performReplaceInternal(); return true; } inline bool VarReplacer::needsReplace() { uint32_t limit = (uint32_t)((double)solver.order_heap.size()*PERCENTAGEPERFORMREPLACE); return (getNewToReplaceVars() > limit); } inline uint VarReplacer::getNumReplacedLits() const { return replacedLits; } inline uint VarReplacer::getNumReplacedVars() const { return replacedVars; } inline uint VarReplacer::getNumLastReplacedVars() const { return lastReplacedVars; } inline uint VarReplacer::getNewToReplaceVars() const { return replacedVars-lastReplacedVars; } inline const vector<Lit>& VarReplacer::getReplaceTable() const { return table; } inline const vec<Clause*>& VarReplacer::getClauses() const { return clauses; } inline bool VarReplacer::varHasBeenReplaced(const Var var) const { return table[var].var() != var; } inline bool VarReplacer::replacingVar(const Var var) const { return (reverseTable.find(var) != reverseTable.end()); } inline uint32_t VarReplacer::getNumTrees() const { return reverseTable.size(); } } //NAMESPACE MINISAT #endif //VARREPLACER_H
mxOBS/deb-pkg_trusty_chromium-browser
third_party/stp/src/lib/Sat/cryptominisat2/VarReplacer.h
C
bsd-3-clause
4,981
#!/usr/bin/python # -*- coding: utf-8 -*- # # This file is part of Istex_Mental_Rotation. # Copyright (C) 2016 3ST ERIC Laboratory. # # This is a free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """This is a script to read different json files containing meta-data of documents. If nothing specified, the script generates a .json file containing specific keys for each document, not taking into account the documents that have missing requiered keys (that you can list yourself if wanted). The script can also collect all the meaningful information and create new json files listing all the documents and their characteristics : the documents are split into 2 .json files, one for the complete documents, one for all the documents even those which have some keys missing. In addition, we list the documents ids in 2 files: the complete one, and the possibily incomplete ones.""" # co-author : Lucie Martinet <[email protected]> # co-author : Hussein AL-NATSHEH <[email protected]> # Affiliation: University of Lyon, ERIC Laboratory, Lyon2, University of Lorraine # Thanks to ISTEX project for the funding import os, argparse import json from nltk.corpus import stopwords import sys reload(sys) sys.setdefaultencoding('utf8') def ListAuthors(jsonList) : l = [] for i in jsonList["author"] : a=dict() ; a["name"]=i["name"] l.append(a) return l # Read json file and extract some given keys to build another json file, with only selected information. '''fileName : input file, key_words_list : list of items that can have two possible formats : "key1" the keys to retrieve and keep for the new resulting json file, or "key1:keyBis1" "key1" is the key that was found in the data file, "keyBis1" is the key name to use in the resulting f_perfect : pointer to the open file containing the json information of the documents with all the required key words (present in key_word_list) prec = characters that have to precede the selected json information in the resulting files containing all the documents, even with some keys missing, mostly "[" or "," prec_perf = characters that have to precede the selected json information in the resulting files containing the documents with all keys present in the given data file, mostly "[" or "," perfectdoc_list: pointer on a file that will contain the list of documents path containing all the required keys (information file) f_all_docs : pointer to the open file containing all the json information of all the given documents (information file) f_errors : pointer on a file that will contain the list of path of all the documents wit missing keys and the name of the missing keys for each (information file) generate_key_words : do we generate key_words from the title stop : list of stop words if generate_key_words=True source : specify the source of the corpus verbose : do we generate the information files json_all: pointer on an open file, f_perfect: pointer on open file, stop: list of stop word to remove from key words, prec_perf: string to add before the json info, perfectdoc_list: string containing file name, excepterrors_list: string containing file name''' def ReadJson (input_file_name, key_words_list, f_perfect, prec=",", prec_perf=",", perfectdoc_list=None, f_all_docs=None, f_errors = None, generate_key_words = False, stop_words=[], source="", verbose = False): nb_errors = 0 list_errors = "" with open(input_file_name) as data_file: data = json.load(data_file) data_file.close() data2 = {} for kw in key_word_list : l_key = kw.split(":") if l_key[0] == "host" : try : data2[l_key[-1]]={"corpusName":data["corpusName"],"title":data["host"]["title"], "volume":data["host"]["volume"]} except : nb_errors+=1 list_errors += "host: corpusName, title, volume ; " elif l_key[0] == "doi" : try : data2[l_key[-1]]=data[l_key[0]][0] except : nb_errors+=1 list_errors += "doi ; " elif l_key[0]=="authors": try : l=ListAuthors(data) data2["authors"]=l except : nb_errors+=1 list_errors += "authors ; " else : try : data2[l_key[-1]]=data[l_key[0]] # if a different key is specified for the new json file, use it: this key is the last element of the l_key list except : nb_errors+=1 list_errors += kw+"; " if generate_key_words : try : data2["KeyWords"]=[ i for i in data["title"].split() if i.lower() not in stop ] except: nb_errors+=1 list_errors += "KeyWords ; " data2["source"]=["Istex"] if(nb_errors == 0) : if verbose : perfectdoc_list.write(input_file_name+"\n") f_perfect.write(prec_perf) json.dump(data2, f_perfect) if verbose : f_all_docs.write(prec) json.dump(data2, f_all_docs) elif verbose : f_all_docs.write(prec) json.dump(data2, f_all_docs) f_errors.write("Something missing with :" + input_file_name + "nb errors = " + str(nb_errors) + " ; " + list_errors + "\n") return nb_errors if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--input_dir", default='2014', type=str) #year to compute: it is also the parser.add_argument("--year", default='2014', type=str) #year to compute: it is also the name of the directory containing the original .json parser.add_argument("--output_dir", default="MentalRotationJSONS", type=str) parser.add_argument("--verbose", action='store_true', help="Print number of documents with missing keys, store the list of this document in a .txt and another file with the documents that contain all the key words. Gives also the .json with incomplete keys in json_all.json") parser.add_argument("--generate_key_words", action='store_true', help="Automatically generate the key words from the title") parser.add_argument("--source", default='Istex', type=str) parser.add_argument("--json_keys", default=["id:istex_id", "publicationDate", "title","abstract"], type=str, nargs='+', help="List the key word used in istex, then the one you want to use for your own json file, separated by ':'. Sample : \"host:host\", \"id:istex_id\", \"publicationDate:publicationDate\", \"title\":\"title\", \"abstract\":\"abstract\", \"doi\":\"doi\"") # it is a sample based on the syntaxe of istex .json metadata files args = parser.parse_args() year = args.year input_dir = args.input_dir output_dir = args.output_dir source = args.source verbose = args.verbose key_word_list = args.json_keys generate_key_words = args.generate_key_words if not os.path.exists(os.path.dirname(output_dir)): os.makedirs(os.path.dirname(output_dir)) dirName=input_dir if verbose : excepterrors_list=os.path.join(output_dir, input_dir.rstrip('/').split("/")[-1]+"exceptionFilesErrors.txt") f_errors = open(excepterrors_list,"w") f_errors.write('Errors starts\n') alldoc_file=os.path.join(output_dir, input_dir.rstrip('/').split("/")[-1]+"json_all.json") f_all_docs=open(alldoc_file,"w") perfectdoc_list=os.path.join(output_dir, input_dir.rstrip('/').split("/")[-1]+"perfect_doc.txt") perf_f = open(perfectdoc_list, "w") perf_f.write("List of documents containing all the required key words\n") f_perfect=open(os.path.join(output_dir, input_dir.rstrip('/').split("/")[-1]+"json_perfect.json"), "w") if generate_key_words : stop = stopwords.words('english') else : stop = [] prec="[\n" prec_perf = "[\n" nb_doc_with_errors = 0 nb_docs = 0 for f in os.listdir(dirName): nb_docs += 1 pathdata=os.path.join(dirName, f) if verbose : nb_errors=ReadJson(pathdata, key_word_list, f_perfect, prec, prec_perf, perfectdoc_list=perf_f, f_all_docs=f_all_docs, f_errors = f_errors, generate_key_words = generate_key_words, stop_words=stop, source=source, verbose = True) else : nb_errors=ReadJson(pathdata, key_word_list,f_perfect, prec, prec_perf, generate_key_words = generate_key_words, stop_words=stop, source=source) if nb_errors == 0 : prec_perf=",\n" if nb_errors > 0 : nb_doc_with_errors += 1 prec=",\n" prec="]\n" if verbose : f_all_docs.write(prec) f_all_docs.close() f_errors.close() perf_f.close() f_perfect.write(prec) f_perfect.close() print "Total number of documents: ", nb_docs print "Number of documents with missing key(s): ", nb_doc_with_errors
ERICUdL/ISTEX_MentalRotation
IstexDataDownload_Treatment/jsonGenerate.py
Python
bsd-3-clause
8,367
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromecast/net/connectivity_checker_impl.h" #include "base/bind.h" #include "base/command_line.h" #include "base/location.h" #include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/task/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" #include "chromecast/base/metrics/cast_metrics_helper.h" #include "chromecast/chromecast_buildflags.h" #include "chromecast/net/net_switches.h" #include "chromecast/net/time_sync_tracker.h" #include "net/base/request_priority.h" #include "net/http/http_network_session.h" #include "net/http/http_response_headers.h" #include "net/http/http_response_info.h" #include "net/http/http_status_code.h" #include "net/http/http_transaction_factory.h" #include "net/socket/ssl_client_socket.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/network_change_manager.mojom.h" #include "services/network/public/mojom/url_response_head.mojom.h" namespace chromecast { namespace { // How often connectivity checks are performed in seconds while not connected. const unsigned int kConnectivityPeriodSeconds = 1; // How often connectivity checks are performed in seconds while connected. const unsigned int kConnectivitySuccessPeriodSeconds = 60; // Number of consecutive connectivity check errors before status is changed // to offline. const unsigned int kNumErrorsToNotifyOffline = 3; // Request timeout value in seconds. const unsigned int kRequestTimeoutInSeconds = 3; // Delay notification of network change events to smooth out rapid flipping. // Histogram "Cast.Network.Down.Duration.In.Seconds" shows 40% of network // downtime is less than 3 seconds. const char kNetworkChangedDelayInSeconds = 3; const char kMetricNameNetworkConnectivityCheckingErrorType[] = "Network.ConnectivityChecking.ErrorType"; } // namespace // static scoped_refptr<ConnectivityCheckerImpl> ConnectivityCheckerImpl::Create( scoped_refptr<base::SingleThreadTaskRunner> task_runner, std::unique_ptr<network::PendingSharedURLLoaderFactory> pending_url_loader_factory, network::NetworkConnectionTracker* network_connection_tracker, TimeSyncTracker* time_sync_tracker) { DCHECK(task_runner); auto connectivity_checker = base::WrapRefCounted(new ConnectivityCheckerImpl( task_runner, network_connection_tracker, time_sync_tracker)); task_runner->PostTask( FROM_HERE, base::BindOnce(&ConnectivityCheckerImpl::Initialize, connectivity_checker, std::move(pending_url_loader_factory))); return connectivity_checker; } ConnectivityCheckerImpl::ConnectivityCheckerImpl( scoped_refptr<base::SingleThreadTaskRunner> task_runner, network::NetworkConnectionTracker* network_connection_tracker, TimeSyncTracker* time_sync_tracker) : ConnectivityChecker(task_runner), task_runner_(std::move(task_runner)), network_connection_tracker_(network_connection_tracker), time_sync_tracker_(time_sync_tracker), cast_metrics_helper_(metrics::CastMetricsHelper::GetInstance()), connected_and_time_synced_(false), network_connected_(false), connection_type_(network::mojom::ConnectionType::CONNECTION_NONE), check_errors_(0), network_changed_pending_(false), weak_factory_(this) { DCHECK(task_runner_); DCHECK(network_connection_tracker_); DCHECK(cast_metrics_helper_); weak_this_ = weak_factory_.GetWeakPtr(); if (time_sync_tracker_) { time_sync_tracker_->AddObserver(this); } } void ConnectivityCheckerImpl::Initialize( std::unique_ptr<network::PendingSharedURLLoaderFactory> pending_url_loader_factory) { DCHECK(task_runner_->BelongsToCurrentThread()); DCHECK(pending_url_loader_factory); url_loader_factory_ = network::SharedURLLoaderFactory::Create( std::move(pending_url_loader_factory)); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType check_url_str = command_line->GetSwitchValueNative(switches::kConnectivityCheckUrl); connectivity_check_url_ = std::make_unique<GURL>( check_url_str.empty() ? kDefaultConnectivityCheckUrl : check_url_str); network_connection_tracker_->AddNetworkConnectionObserver(this); Check(); } ConnectivityCheckerImpl::~ConnectivityCheckerImpl() { DCHECK(task_runner_); DCHECK(task_runner_->BelongsToCurrentThread()); network_connection_tracker_->RemoveNetworkConnectionObserver(this); } bool ConnectivityCheckerImpl::Connected() const { base::AutoLock auto_lock(connected_lock_); return connected_and_time_synced_; } void ConnectivityCheckerImpl::SetConnected(bool connected) { DCHECK(task_runner_->BelongsToCurrentThread()); { base::AutoLock auto_lock(connected_lock_); network_connected_ = connected; // If a time_sync_tracker is not provided, is it assumed that network // connectivity is equivalent to time being synced. bool connected_and_time_synced = network_connected_; if (time_sync_tracker_) { connected_and_time_synced &= time_sync_tracker_->IsTimeSynced(); } if (connected_and_time_synced_ == connected_and_time_synced) { return; } connected_and_time_synced_ = connected_and_time_synced; } base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType check_url_str = command_line->GetSwitchValueNative(switches::kConnectivityCheckUrl); if (check_url_str.empty()) { connectivity_check_url_ = std::make_unique<GURL>( connected_and_time_synced_ ? kHttpConnectivityCheckUrl : kDefaultConnectivityCheckUrl); LOG(INFO) << "Change check url=" << *connectivity_check_url_; } Notify(connected_and_time_synced_); LOG(INFO) << "Global connection is: " << (connected_and_time_synced_ ? "Up" : "Down"); } void ConnectivityCheckerImpl::Check() { task_runner_->PostTask( FROM_HERE, base::BindOnce(&ConnectivityCheckerImpl::CheckInternal, weak_this_)); } void ConnectivityCheckerImpl::CheckInternal() { DCHECK(task_runner_->BelongsToCurrentThread()); DCHECK(url_loader_factory_); auto connection_type = network::mojom::ConnectionType::CONNECTION_UNKNOWN; bool is_sync = network_connection_tracker_->GetConnectionType( &connection_type, base::BindOnce(&ConnectivityCheckerImpl::OnConnectionChanged, weak_this_)); // Don't check connectivity if network is offline. // Also don't check connectivity if the connection_type cannot be // synchronously retrieved, since OnConnectionChanged will be triggered later // which will cause duplicate checks. if (!is_sync || connection_type == network::mojom::ConnectionType::CONNECTION_NONE) { return; } // If url_loader_ is non-null, there is already a check going on. Don't // start another. if (url_loader_) { return; } VLOG(1) << "Connectivity check: url=" << *connectivity_check_url_; auto resource_request = std::make_unique<network::ResourceRequest>(); resource_request->url = GURL(*connectivity_check_url_); resource_request->method = "HEAD"; resource_request->priority = net::MAXIMUM_PRIORITY; url_loader_ = network::SimpleURLLoader::Create(std::move(resource_request), MISSING_TRAFFIC_ANNOTATION); // To enable ssl_info in the response. url_loader_->SetURLLoaderFactoryOptions( network::mojom::kURLLoadOptionSendSSLInfoWithResponse | network::mojom::kURLLoadOptionSendSSLInfoForCertificateError); // Configure the loader to treat HTTP error status codes as successful loads. // This setting allows us to inspect the status code and log it as an error. url_loader_->SetAllowHttpErrorResults(true); network::SimpleURLLoader::HeadersOnlyCallback callback = base::BindOnce( &ConnectivityCheckerImpl::OnConnectivityCheckComplete, weak_this_); url_loader_->DownloadHeadersOnly(url_loader_factory_.get(), std::move(callback)); timeout_.Reset(base::BindOnce(&ConnectivityCheckerImpl::OnUrlRequestTimeout, weak_this_)); // Exponential backoff for timeout in 3, 6 and 12 sec. const int timeout = kRequestTimeoutInSeconds << (check_errors_ > 2 ? 2 : check_errors_); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, timeout_.callback(), base::Seconds(timeout)); } void ConnectivityCheckerImpl::SetCastMetricsHelperForTesting( metrics::CastMetricsHelper* cast_metrics_helper) { DCHECK(cast_metrics_helper); cast_metrics_helper_ = cast_metrics_helper; } void ConnectivityCheckerImpl::OnConnectionChanged( network::mojom::ConnectionType type) { DVLOG(2) << "OnConnectionChanged " << type; connection_type_ = type; if (network_changed_pending_) return; network_changed_pending_ = true; base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce(&ConnectivityCheckerImpl::OnConnectionChangedInternal, weak_this_), base::Seconds(kNetworkChangedDelayInSeconds)); } void ConnectivityCheckerImpl::OnConnectionChangedInternal() { network_changed_pending_ = false; Cancel(); if (connection_type_ == network::mojom::ConnectionType::CONNECTION_NONE) { SetConnected(false); return; } Check(); } void ConnectivityCheckerImpl::OnTimeSynced() { SetConnected(network_connected_); } void ConnectivityCheckerImpl::OnConnectivityCheckComplete( scoped_refptr<net::HttpResponseHeaders> headers) { DCHECK(task_runner_->BelongsToCurrentThread()); DCHECK(url_loader_); // Move url_loader_ onto the stack to ensure it gets deleted when this // function completes. std::unique_ptr<network::SimpleURLLoader> url_loader = std::move(url_loader_); timeout_.Cancel(); int error = url_loader->NetError(); if (error == net::ERR_INSECURE_RESPONSE && url_loader->ResponseInfo() && url_loader->ResponseInfo()->ssl_info) { LOG(ERROR) << "OnSSLCertificateError: cert_status=" << url_loader->ResponseInfo()->ssl_info->cert_status; OnUrlRequestError(ErrorType::SSL_CERTIFICATE_ERROR); return; } if (error != net::OK) { // Captures non-HTTP errors here. All HTTP status codes (including error // codes) are treated as network success and won't be logged here. HTTP // errors are handled further below to provide more precise granularity. LOG(ERROR) << "Connectivity check failed: net_error=" << error; OnUrlRequestError(ErrorType::NET_ERROR); return; } // At this point, network connection is considered successful, but we still // need to check HTTP response for errors. If headers are empty, use an // implicit zero status code. int http_response_code = headers ? headers->response_code() : 0; if (http_response_code != kConnectivitySuccessStatusCode) { LOG(ERROR) << "Connectivity check failed: http_response_code=" << http_response_code; OnUrlRequestError(ErrorType::BAD_HTTP_STATUS); return; } DVLOG(1) << "Connectivity check succeeded"; check_errors_ = 0; SetConnected(true); if (time_sync_tracker_) { time_sync_tracker_->OnNetworkConnected(); } // Some products don't have an idle screen that makes periodic network // requests. Schedule another check to ensure connectivity hasn't dropped. task_runner_->PostDelayedTask( FROM_HERE, base::BindOnce(&ConnectivityCheckerImpl::CheckInternal, weak_this_), base::Seconds(kConnectivitySuccessPeriodSeconds)); } void ConnectivityCheckerImpl::OnUrlRequestError(ErrorType type) { DCHECK(task_runner_->BelongsToCurrentThread()); ++check_errors_; if (check_errors_ > kNumErrorsToNotifyOffline) { // Only record event on the connectivity transition. if (connected_and_time_synced_) { cast_metrics_helper_->RecordEventWithValue( kMetricNameNetworkConnectivityCheckingErrorType, static_cast<int>(type)); } check_errors_ = kNumErrorsToNotifyOffline; SetConnected(false); } // Check again. task_runner_->PostDelayedTask( FROM_HERE, base::BindOnce(&ConnectivityCheckerImpl::Check, weak_this_), base::Seconds(kConnectivityPeriodSeconds)); } void ConnectivityCheckerImpl::OnUrlRequestTimeout() { DCHECK(task_runner_->BelongsToCurrentThread()); DCHECK(url_loader_); url_loader_ = nullptr; LOG(ERROR) << "time out"; OnUrlRequestError(ErrorType::REQUEST_TIMEOUT); } void ConnectivityCheckerImpl::Cancel() { DCHECK(task_runner_->BelongsToCurrentThread()); if (!url_loader_) return; VLOG(2) << "Cancel connectivity check in progress"; url_loader_ = nullptr; timeout_.Cancel(); } } // namespace chromecast
scheib/chromium
chromecast/net/connectivity_checker_impl.cc
C++
bsd-3-clause
13,140
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE197_Numeric_Truncation_Error__int_rand_to_short_72a.cpp Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml Template File: sources-sink-72a.tmpl.cpp */ /* * @description * CWE: 197 Numeric Truncation Error * BadSource: rand Set data to result of rand(), which may be zero * GoodSource: Less than CHAR_MAX * Sinks: to_short * BadSink : Convert data to a short * Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files * * */ #include "std_testcase.h" #include <vector> using namespace std; namespace CWE197_Numeric_Truncation_Error__int_rand_to_short_72 { #ifndef OMITBAD /* bad function declaration */ void badSink(vector<int> dataVector); void bad() { int data; vector<int> dataVector; /* Initialize data */ data = -1; /* POTENTIAL FLAW: Set data to a random value */ data = RAND32(); /* Put data in a vector */ dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); badSink(dataVector); } #endif /* OMITBAD */ #ifndef OMITGOOD /* good function declarations */ /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(vector<int> dataVector); static void goodG2B() { int data; vector<int> dataVector; /* Initialize data */ data = -1; /* FIX: Use a positive integer less than CHAR_MAX*/ data = CHAR_MAX-5; /* Put data in a vector */ dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); goodG2BSink(dataVector); } void good() { goodG2B(); } #endif /* OMITGOOD */ } /* close namespace */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN using namespace CWE197_Numeric_Truncation_Error__int_rand_to_short_72; /* so that we can use good and bad easily */ int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE197_Numeric_Truncation_Error/s01/CWE197_Numeric_Truncation_Error__int_rand_to_short_72a.cpp
C++
bsd-3-clause
2,693
package org.hisp.dhis.reservedvalue; /* * Copyright (c) 2004-2018, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import org.hisp.dhis.system.deletion.DeletionHandler; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; public class SequentialNumberCounterDeletionHandler extends DeletionHandler { private final SequentialNumberCounterStore sequentialNumberCounterStore; public SequentialNumberCounterDeletionHandler( SequentialNumberCounterStore sequentialNumberCounterStore ) { this.sequentialNumberCounterStore = sequentialNumberCounterStore; } @Override protected String getClassName() { return SequentialNumberCounter.class.getSimpleName(); } @Override public void deleteTrackedEntityAttribute( TrackedEntityAttribute attribute ) { sequentialNumberCounterStore.deleteCounter( attribute.getUid() ); } }
vietnguyen/dhis2-core
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/reservedvalue/SequentialNumberCounterDeletionHandler.java
Java
bsd-3-clause
2,385
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <set> #include <string> #include "base/time/time.h" #include "base/trace_event/trace_event_argument.h" #include "base/values.h" #include "cc/debug/frame_timing_tracker.h" #include "cc/test/fake_impl_task_runner_provider.h" #include "cc/test/fake_layer_tree_host_impl.h" #include "cc/test/test_shared_bitmap_manager.h" #include "cc/test/test_task_graph_runner.h" #include "testing/gtest/include/gtest/gtest.h" namespace cc { namespace { std::string CompositeToString( scoped_ptr<FrameTimingTracker::CompositeTimingSet> timingset) { scoped_refptr<base::trace_event::TracedValue> value = new base::trace_event::TracedValue(); value->BeginArray("values"); std::set<int> rect_ids; for (const auto& pair : *timingset) rect_ids.insert(pair.first); for (const auto& rect_id : rect_ids) { auto& events = (*timingset)[rect_id]; value->BeginDictionary(); value->SetInteger("rect_id", rect_id); value->BeginArray("events"); for (const auto& event : events) { value->BeginDictionary(); value->SetInteger("frame_id", event.frame_id); value->SetInteger("timestamp", event.timestamp.ToInternalValue()); value->EndDictionary(); } value->EndArray(); value->EndDictionary(); } value->EndArray(); return value->ToString(); } std::string MainFrameToString( scoped_ptr<FrameTimingTracker::MainFrameTimingSet> timingset) { scoped_refptr<base::trace_event::TracedValue> value = new base::trace_event::TracedValue(); value->BeginArray("values"); std::set<int> rect_ids; for (const auto& pair : *timingset) rect_ids.insert(pair.first); for (const auto& rect_id : rect_ids) { auto& events = (*timingset)[rect_id]; value->BeginDictionary(); value->SetInteger("rect_id", rect_id); value->BeginArray("events"); for (const auto& event : events) { value->BeginDictionary(); value->SetInteger("end_time", event.end_time.ToInternalValue()); value->SetInteger("frame_id", event.frame_id); value->SetInteger("timestamp", event.timestamp.ToInternalValue()); value->EndDictionary(); } value->EndArray(); value->EndDictionary(); } value->EndArray(); return value->ToString(); } TEST(FrameTimingTrackerTest, DefaultTrackerIsEmpty) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); EXPECT_EQ("{\"values\":[]}", CompositeToString(tracker->GroupCompositeCountsByRectId())); EXPECT_EQ("{\"values\":[]}", MainFrameToString(tracker->GroupMainFrameCountsByRectId())); } TEST(FrameTimingTrackerTest, NoFrameIdsIsEmpty) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); std::vector<std::pair<int, int64_t>> ids; tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids); EXPECT_EQ("{\"values\":[]}", CompositeToString(tracker->GroupCompositeCountsByRectId())); } TEST(FrameTimingTrackerTest, NoRectIdsYieldsNoMainFrameEvents) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); tracker->SaveMainFrameTimeStamps(std::vector<int64_t>(), base::TimeTicks::FromInternalValue(100), base::TimeTicks::FromInternalValue(110), 1); EXPECT_EQ("{\"values\":[]}", MainFrameToString(tracker->GroupMainFrameCountsByRectId())); } TEST(FrameTimingTrackerTest, OneFrameId) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); std::vector<std::pair<int, int64_t>> ids; ids.push_back(std::make_pair(1, 2)); tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids); EXPECT_EQ( "{\"values\":[{\"events\":[" "{\"frame_id\":1,\"timestamp\":100}],\"rect_id\":2}]}", CompositeToString(tracker->GroupCompositeCountsByRectId())); } TEST(FrameTimingTrackerTest, OneMainFrameRect) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); std::vector<int64_t> rect_ids; rect_ids.push_back(1); tracker->SaveMainFrameTimeStamps(rect_ids, base::TimeTicks::FromInternalValue(100), base::TimeTicks::FromInternalValue(110), 2); EXPECT_EQ( "{\"values\":[{\"events\":[" "{\"end_time\":110,\"frame_id\":2,\"timestamp\":100}],\"rect_id\":1}]}", MainFrameToString(tracker->GroupMainFrameCountsByRectId())); } TEST(FrameTimingTrackerTest, UnsortedTimestampsIds) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); std::vector<std::pair<int, int64_t>> ids; ids.push_back(std::make_pair(1, 2)); tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(200), ids); tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(400), ids); tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids); EXPECT_EQ( "{\"values\":[{\"events\":[" "{\"frame_id\":1,\"timestamp\":100}," "{\"frame_id\":1,\"timestamp\":200}," "{\"frame_id\":1,\"timestamp\":400}],\"rect_id\":2}]}", CompositeToString(tracker->GroupCompositeCountsByRectId())); } TEST(FrameTimingTrackerTest, MainFrameUnsortedTimestamps) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); std::vector<int64_t> rect_ids; rect_ids.push_back(2); tracker->SaveMainFrameTimeStamps(rect_ids, base::TimeTicks::FromInternalValue(200), base::TimeTicks::FromInternalValue(280), 1); tracker->SaveMainFrameTimeStamps(rect_ids, base::TimeTicks::FromInternalValue(400), base::TimeTicks::FromInternalValue(470), 1); tracker->SaveMainFrameTimeStamps(rect_ids, base::TimeTicks::FromInternalValue(100), base::TimeTicks::FromInternalValue(160), 1); EXPECT_EQ( "{\"values\":[{\"events\":[" "{\"end_time\":160,\"frame_id\":1,\"timestamp\":100}," "{\"end_time\":280,\"frame_id\":1,\"timestamp\":200}," "{\"end_time\":470,\"frame_id\":1,\"timestamp\":400}],\"rect_id\":2}]}", MainFrameToString(tracker->GroupMainFrameCountsByRectId())); } TEST(FrameTimingTrackerTest, MultipleFrameIds) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); std::vector<std::pair<int, int64_t>> ids200; ids200.push_back(std::make_pair(1, 2)); ids200.push_back(std::make_pair(1, 3)); tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(200), ids200); std::vector<std::pair<int, int64_t>> ids400; ids400.push_back(std::make_pair(2, 2)); tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(400), ids400); std::vector<std::pair<int, int64_t>> ids100; ids100.push_back(std::make_pair(3, 2)); ids100.push_back(std::make_pair(2, 3)); ids100.push_back(std::make_pair(3, 4)); tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids100); EXPECT_EQ( "{\"values\":[{\"events\":[" "{\"frame_id\":3,\"timestamp\":100}," "{\"frame_id\":1,\"timestamp\":200}," "{\"frame_id\":2,\"timestamp\":400}],\"rect_id\":2}," "{\"events\":[" "{\"frame_id\":2,\"timestamp\":100}," "{\"frame_id\":1,\"timestamp\":200}],\"rect_id\":3}," "{\"events\":[" "{\"frame_id\":3,\"timestamp\":100}],\"rect_id\":4}" "]}", CompositeToString(tracker->GroupCompositeCountsByRectId())); } TEST(FrameTimingTrackerTest, MultipleMainFrameEvents) { FakeImplTaskRunnerProvider task_runner_provider; TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, &task_graph_runner); scoped_ptr<FrameTimingTracker> tracker( FrameTimingTracker::Create(&host_impl)); std::vector<int64_t> rect_ids200; rect_ids200.push_back(2); rect_ids200.push_back(3); tracker->SaveMainFrameTimeStamps(rect_ids200, base::TimeTicks::FromInternalValue(200), base::TimeTicks::FromInternalValue(220), 1); std::vector<int64_t> rect_ids400; rect_ids400.push_back(2); tracker->SaveMainFrameTimeStamps(rect_ids400, base::TimeTicks::FromInternalValue(400), base::TimeTicks::FromInternalValue(440), 2); std::vector<int64_t> rect_ids100; rect_ids100.push_back(2); rect_ids100.push_back(3); rect_ids100.push_back(4); tracker->SaveMainFrameTimeStamps(rect_ids100, base::TimeTicks::FromInternalValue(100), base::TimeTicks::FromInternalValue(110), 3); EXPECT_EQ( "{\"values\":[{\"events\":[" "{\"end_time\":110,\"frame_id\":3,\"timestamp\":100}," "{\"end_time\":220,\"frame_id\":1,\"timestamp\":200}," "{\"end_time\":440,\"frame_id\":2,\"timestamp\":400}],\"rect_id\":2}," "{\"events\":[" "{\"end_time\":110,\"frame_id\":3,\"timestamp\":100}," "{\"end_time\":220,\"frame_id\":1,\"timestamp\":200}],\"rect_id\":3}," "{\"events\":[" "{\"end_time\":110,\"frame_id\":3,\"timestamp\":100}],\"rect_id\":4}" "]}", MainFrameToString(tracker->GroupMainFrameCountsByRectId())); } } // namespace } // namespace cc
Bysmyyr/chromium-crosswalk
cc/debug/frame_timing_tracker_unittest.cc
C++
bsd-3-clause
11,905
/* * Copyright © 2012 Inria. All rights reserved. * See COPYING in top-level directory. */ #include <private/private.h> #include <hwloc-calc.h> #include <hwloc.h> #include <stdlib.h> #include <stdio.h> #include <string.h> static void usage(const char *callname __hwloc_attribute_unused, FILE *where) { fprintf(where, "Usage: hwloc-annotate [options] <input.xml> <output.xml> <location> <annotation>\n"); fprintf(where, " <location> may be:\n"); fprintf(where, " all, root, <type>:<logicalindex>, <type>:all\n"); fprintf(where, " <annotation> may be:\n"); fprintf(where, " info <name> <value>\n"); fprintf(where, " none\n"); fprintf(where, "Options:\n"); fprintf(where, " --ci\tClear existing infos\n"); } static char *infoname = NULL, *infovalue = NULL; static int clearinfos = 0; static void apply(hwloc_obj_t obj) { unsigned i; if (clearinfos) { /* this may be considered dangerous, applications should not modify objects directly */ for(i=0; i<obj->infos_count; i++) { free(obj->infos[i].name); free(obj->infos[i].value); } free(obj->infos); obj->infos = NULL; obj->infos_count = 0; } if (infoname) hwloc_obj_add_info(obj, infoname, infovalue); } static void apply_recursive(hwloc_obj_t obj) { unsigned i; for(i=0; i<obj->arity; i++) apply_recursive(obj->children[i]); apply(obj); } int main(int argc, char *argv[]) { hwloc_topology_t topology; char *callname, *input, *output, *location; int err; putenv("HWLOC_XML_VERBOSE=1"); callname = argv[0]; /* skip argv[0], handle options */ argc--; argv++; while (argc && *argv[0] == '-') { if (!strcmp(argv[0], "--ci")) clearinfos = 1; else { fprintf(stderr, "Unrecognized options: %s\n", argv[0]); usage(callname, stderr); exit(EXIT_FAILURE); } argc--; argv++; } if (argc < 3) { usage(callname, stderr); exit(EXIT_FAILURE); } input = argv[0]; output = argv[1]; location = argv[2]; argc -= 3; argv += 3; if (argc < 1) { usage(callname, stderr); exit(EXIT_FAILURE); } if (!strcmp(argv[0], "info")) { if (argc < 3) { usage(callname, stderr); exit(EXIT_FAILURE); } infoname = argv[1]; infovalue = argv[2]; } else if (!strcmp(argv[0], "none")) { /* do nothing (maybe clear) */ } else { fprintf(stderr, "Unrecognized annotation type: %s\n", argv[0]); usage(callname, stderr); exit(EXIT_FAILURE); } hwloc_topology_init(&topology); err = hwloc_topology_set_xml(topology, input); if (err < 0) goto out; hwloc_topology_load(topology); if (!strcmp(location, "all")) { apply_recursive(hwloc_get_root_obj(topology)); } else if (!strcmp(location, "root")) { apply(hwloc_get_root_obj(topology)); } else { unsigned i; hwloc_obj_t obj; hwloc_obj_type_t type; size_t typelen; int depth; char *sep; typelen = strspn(location, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); if (!typelen || location[typelen] != ':') { /* FIXME: warn */ goto out; } sep = &location[typelen]; depth = hwloc_calc_parse_depth_prefix(topology, hwloc_topology_get_depth(topology), location, typelen, &type, 0); if (depth < 0) { /* FIXME: warn */ goto out; } if (!strcmp(sep+1, "all")) { for(i=0; i<hwloc_get_nbobjs_by_depth(topology, depth); i++) { obj = hwloc_get_obj_by_depth(topology, depth, i); assert(obj); apply(obj); } } else { i = atoi(sep+1); obj = hwloc_get_obj_by_depth(topology, depth, i); if (!obj) { /* FIXME: warn */ goto out; } apply(obj); } } err = hwloc_topology_export_xml(topology, output); if (err < 0) goto out; hwloc_topology_destroy(topology); exit(EXIT_SUCCESS); out: hwloc_topology_destroy(topology); exit(EXIT_FAILURE); }
BlueBrain/hwloc
utils/hwloc-annotate.c
C
bsd-3-clause
3,748
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__c_CWE806_char_memcpy_54e.c Label Definition File: CWE122_Heap_Based_Buffer_Overflow__c_CWE806.label.xml Template File: sources-sink-54e.tmpl.c */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: Initialize data as a large string * GoodSource: Initialize data as a small string * Sink: memcpy * BadSink : Copy data to string using memcpy * Flow Variant: 54 Data flow: data passed as an argument from one function through three others to a fifth; all five functions are in different source files * * */ #include "std_testcase.h" #include <wchar.h> /* all the sinks are the same, we just want to know where the hit originated if a tool flags one */ #ifndef OMITBAD void CWE122_Heap_Based_Buffer_Overflow__c_CWE806_char_memcpy_54e_badSink(char * data) { { char dest[50] = ""; /* POTENTIAL FLAW: Possible buffer overflow if data is larger than dest */ memcpy(dest, data, strlen(data)*sizeof(char)); dest[50-1] = '\0'; /* Ensure the destination buffer is null terminated */ printLine(data); free(data); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void CWE122_Heap_Based_Buffer_Overflow__c_CWE806_char_memcpy_54e_goodG2BSink(char * data) { { char dest[50] = ""; /* POTENTIAL FLAW: Possible buffer overflow if data is larger than dest */ memcpy(dest, data, strlen(data)*sizeof(char)); dest[50-1] = '\0'; /* Ensure the destination buffer is null terminated */ printLine(data); free(data); } } #endif /* OMITGOOD */
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE122_Heap_Based_Buffer_Overflow/s09/CWE122_Heap_Based_Buffer_Overflow__c_CWE806_char_memcpy_54e.c
C
bsd-3-clause
1,744
/* * Copyright (c) 2016, juja.com.ua * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * * Neither the name of microservices nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /** * Created by danil.kuznetsov on 18.06.16. */ (function () { "use strict"; angular .module('usersList') .component('usersListComponent', { templateUrl: 'users-list/users-list.template.html', controller: function userListController(Users) { this.users = Users.query(); } }); })();
JuniorsJava/microservices
gamification-ui/app/users-list/users-list.component.js
JavaScript
bsd-3-clause
1,949
module Toy module Extensions module Object module ClassMethods def to_store(value, *) value end def from_store(value, *) value end end module InstanceMethods def to_store self.class.to_store(self) end end end end end class Object extend Toy::Extensions::Object::ClassMethods include Toy::Extensions::Object::InstanceMethods end
jnunemaker/toystore
lib/toy/extensions/object.rb
Ruby
bsd-3-clause
448
// Copyright (c) 2006, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <cstdio> #include <mach/host_info.h> #include <mach/mach_vm.h> #include <mach/vm_statistics.h> #include <mach-o/dyld.h> #include <mach-o/loader.h> #include <sys/sysctl.h> #include <sys/resource.h> #include <mach/mach_vm.h> #include <CoreFoundation/CoreFoundation.h> #include "client/mac/handler/minidump_generator.h" #include "client/minidump_file_writer-inl.h" #include "common/mac/file_id.h" #include "common/mac/string_utilities.h" using MacStringUtils::ConvertToString; using MacStringUtils::IntegerValueAtIndex; namespace google_breakpad { // constructor when generating from within the crashed process MinidumpGenerator::MinidumpGenerator() : exception_type_(0), exception_code_(0), exception_subcode_(0), exception_thread_(0), crashing_task_(mach_task_self()), handler_thread_(mach_thread_self()), dynamic_images_(NULL) { GatherSystemInformation(); } // constructor when generating from a different process than the // crashed process MinidumpGenerator::MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread) : exception_type_(0), exception_code_(0), exception_subcode_(0), exception_thread_(0), crashing_task_(crashing_task), handler_thread_(handler_thread) { if (crashing_task != mach_task_self()) { dynamic_images_ = new DynamicImages(crashing_task_); } else { dynamic_images_ = NULL; } GatherSystemInformation(); } MinidumpGenerator::~MinidumpGenerator() { delete dynamic_images_; } char MinidumpGenerator::build_string_[16]; int MinidumpGenerator::os_major_version_ = 0; int MinidumpGenerator::os_minor_version_ = 0; int MinidumpGenerator::os_build_number_ = 0; // static void MinidumpGenerator::GatherSystemInformation() { // If this is non-zero, then we've already gathered the information if (os_major_version_) return; // This code extracts the version and build information from the OS CFStringRef vers_path = CFSTR("/System/Library/CoreServices/SystemVersion.plist"); CFURLRef sys_vers = CFURLCreateWithFileSystemPath(NULL, vers_path, kCFURLPOSIXPathStyle, false); CFDataRef data; SInt32 error; CFURLCreateDataAndPropertiesFromResource(NULL, sys_vers, &data, NULL, NULL, &error); if (!data) return; CFDictionaryRef list = static_cast<CFDictionaryRef> (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, NULL)); if (!list) return; CFStringRef build_version = static_cast<CFStringRef> (CFDictionaryGetValue(list, CFSTR("ProductBuildVersion"))); CFStringRef product_version = static_cast<CFStringRef> (CFDictionaryGetValue(list, CFSTR("ProductVersion"))); string build_str = ConvertToString(build_version); string product_str = ConvertToString(product_version); CFRelease(list); CFRelease(sys_vers); CFRelease(data); strlcpy(build_string_, build_str.c_str(), sizeof(build_string_)); // Parse the string that looks like "10.4.8" os_major_version_ = IntegerValueAtIndex(product_str, 0); os_minor_version_ = IntegerValueAtIndex(product_str, 1); os_build_number_ = IntegerValueAtIndex(product_str, 2); } string MinidumpGenerator::UniqueNameInDirectory(const string &dir, string *unique_name) { CFUUIDRef uuid = CFUUIDCreate(NULL); CFStringRef uuid_cfstr = CFUUIDCreateString(NULL, uuid); CFRelease(uuid); string file_name(ConvertToString(uuid_cfstr)); CFRelease(uuid_cfstr); string path(dir); // Ensure that the directory (if non-empty) has a trailing slash so that // we can append the file name and have a valid pathname. if (!dir.empty()) { if (dir.at(dir.size() - 1) != '/') path.append(1, '/'); } path.append(file_name); path.append(".dmp"); if (unique_name) *unique_name = file_name; return path; } bool MinidumpGenerator::Write(const char *path) { WriteStreamFN writers[] = { &MinidumpGenerator::WriteThreadListStream, &MinidumpGenerator::WriteSystemInfoStream, &MinidumpGenerator::WriteModuleListStream, &MinidumpGenerator::WriteMiscInfoStream, &MinidumpGenerator::WriteBreakpadInfoStream, // Exception stream needs to be the last entry in this array as it may // be omitted in the case where the minidump is written without an // exception. &MinidumpGenerator::WriteExceptionStream, }; bool result = false; // If opening was successful, create the header, directory, and call each // writer. The destructor for the TypedMDRVAs will cause the data to be // flushed. The destructor for the MinidumpFileWriter will close the file. if (writer_.Open(path)) { TypedMDRVA<MDRawHeader> header(&writer_); TypedMDRVA<MDRawDirectory> dir(&writer_); if (!header.Allocate()) return false; int writer_count = sizeof(writers) / sizeof(writers[0]); // If we don't have exception information, don't write out the // exception stream if (!exception_thread_ && !exception_type_) --writer_count; // Add space for all writers if (!dir.AllocateArray(writer_count)) return false; MDRawHeader *header_ptr = header.get(); header_ptr->signature = MD_HEADER_SIGNATURE; header_ptr->version = MD_HEADER_VERSION; time(reinterpret_cast<time_t *>(&(header_ptr->time_date_stamp))); header_ptr->stream_count = writer_count; header_ptr->stream_directory_rva = dir.position(); MDRawDirectory local_dir; result = true; for (int i = 0; (result) && (i < writer_count); ++i) { result = (this->*writers[i])(&local_dir); if (result) dir.CopyIndex(i, &local_dir); } } return result; } size_t MinidumpGenerator::CalculateStackSize(mach_vm_address_t start_addr) { mach_vm_address_t stack_region_base = start_addr; mach_vm_size_t stack_region_size; natural_t nesting_level = 0; vm_region_submap_info_64 submap_info; mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; vm_region_recurse_info_t region_info; region_info = reinterpret_cast<vm_region_recurse_info_t>(&submap_info); if (start_addr == 0) { return 0; } kern_return_t result = mach_vm_region_recurse(crashing_task_, &stack_region_base, &stack_region_size, &nesting_level, region_info, &info_count); if (start_addr < stack_region_base) { // probably stack corruption, since mach_vm_region had to go // higher in the process address space to find a valid region. return 0; } if ((stack_region_base + stack_region_size) == TOP_OF_THREAD0_STACK) { // The stack for thread 0 needs to extend all the way to // 0xc0000000 on 32 bit and 00007fff5fc00000 on 64bit. HOWEVER, // for many processes, the stack is first created in one page // below this, and is then later extended to a much larger size by // creating a new VM region immediately below the initial page. // You can see this for yourself by running vmmap on a "hello, // world" program // Because of the above, we'll add 4k to include the original // stack frame page. // This method of finding the stack region needs to be done in // a better way; the breakpad issue 247 is tracking this. stack_region_size += 0x1000; } return result == KERN_SUCCESS ? stack_region_base + stack_region_size - start_addr : 0; } bool MinidumpGenerator::WriteStackFromStartAddress( mach_vm_address_t start_addr, MDMemoryDescriptor *stack_location) { UntypedMDRVA memory(&writer_); bool result = false; size_t size = CalculateStackSize(start_addr); if (size == 0) { // In some situations the stack address for the thread can come back 0. // In these cases we skip over the threads in question and stuff the // stack with a clearly borked value. start_addr = 0xDEADBEEF; size = 16; if (!memory.Allocate(size)) return false; unsigned long long dummy_stack[2]; // Fill dummy stack with 16 bytes of // junk. dummy_stack[0] = 0xDEADBEEF; dummy_stack[1] = 0xDEADBEEF; result = memory.Copy(dummy_stack, size); } else { if (!memory.Allocate(size)) return false; if (dynamic_images_) { kern_return_t kr; void *stack_memory = ReadTaskMemory(crashing_task_, (void*)start_addr, size, &kr); if (stack_memory == NULL) { return false; } result = memory.Copy(stack_memory, size); free(stack_memory); } else { result = memory.Copy(reinterpret_cast<const void *>(start_addr), size); } } stack_location->start_of_memory_range = start_addr; stack_location->memory = memory.location(); return result; } #if TARGET_CPU_PPC || TARGET_CPU_PPC64 bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location) { breakpad_thread_state_t *machine_state = reinterpret_cast<breakpad_thread_state_t *>(state); mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1); return WriteStackFromStartAddress(start_addr, stack_location); } u_int64_t MinidumpGenerator::CurrentPCForStack(breakpad_thread_state_data_t state) { breakpad_thread_state_t *machine_state = reinterpret_cast<breakpad_thread_state_t *>(state); return REGISTER_FROM_THREADSTATE(machine_state, srr0); } bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location) { TypedMDRVA<MinidumpContext> context(&writer_); breakpad_thread_state_t *machine_state = reinterpret_cast<breakpad_thread_state_t *>(state); if (!context.Allocate()) return false; *register_location = context.location(); MinidumpContext *context_ptr = context.get(); context_ptr->context_flags = MD_CONTEXT_PPC_BASE; #define AddReg(a) context_ptr->a = REGISTER_FROM_THREADSTATE(machine_state, a) #define AddGPR(a) context_ptr->gpr[a] = REGISTER_FROM_THREADSTATE(machine_state, r ## a) AddReg(srr0); AddReg(cr); AddReg(xer); AddReg(ctr); AddReg(lr); AddReg(vrsave); AddGPR(0); AddGPR(1); AddGPR(2); AddGPR(3); AddGPR(4); AddGPR(5); AddGPR(6); AddGPR(7); AddGPR(8); AddGPR(9); AddGPR(10); AddGPR(11); AddGPR(12); AddGPR(13); AddGPR(14); AddGPR(15); AddGPR(16); AddGPR(17); AddGPR(18); AddGPR(19); AddGPR(20); AddGPR(21); AddGPR(22); AddGPR(23); AddGPR(24); AddGPR(25); AddGPR(26); AddGPR(27); AddGPR(28); AddGPR(29); AddGPR(30); AddGPR(31); #if TARGET_CPU_PPC /* The mq register is only for PPC */ AddReg(mq); #endif return true; } #elif TARGET_CPU_X86 || TARGET_CPU_X86_64 bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location) { breakpad_thread_state_t *machine_state = reinterpret_cast<breakpad_thread_state_t *>(state); #if TARGET_CPU_X86_64 mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, rsp); #else mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, esp); #endif return WriteStackFromStartAddress(start_addr, stack_location); } u_int64_t MinidumpGenerator::CurrentPCForStack(breakpad_thread_state_data_t state) { breakpad_thread_state_t *machine_state = reinterpret_cast<breakpad_thread_state_t *>(state); #if TARGET_CPU_X86_64 return REGISTER_FROM_THREADSTATE(machine_state, rip); #else return REGISTER_FROM_THREADSTATE(machine_state, eip); #endif } bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location) { TypedMDRVA<MinidumpContext> context(&writer_); breakpad_thread_state_t *machine_state = reinterpret_cast<breakpad_thread_state_t *>(state); if (!context.Allocate()) return false; *register_location = context.location(); MinidumpContext *context_ptr = context.get(); #define AddReg(a) context_ptr->a = REGISTER_FROM_THREADSTATE(machine_state, a) #if TARGET_CPU_X86 context_ptr->context_flags = MD_CONTEXT_X86; AddReg(eax); AddReg(ebx); AddReg(ecx); AddReg(edx); AddReg(esi); AddReg(edi); AddReg(ebp); AddReg(esp); AddReg(cs); AddReg(ds); AddReg(ss); AddReg(es); AddReg(fs); AddReg(gs); AddReg(eflags); AddReg(eip); #else context_ptr->context_flags = MD_CONTEXT_AMD64; AddReg(rax); AddReg(rbx); AddReg(rcx); AddReg(rdx); AddReg(rdi); AddReg(rsi); AddReg(rbp); AddReg(rsp); AddReg(r8); AddReg(r9); AddReg(r10); AddReg(r11); AddReg(r12); AddReg(r13); AddReg(r14); AddReg(r15); AddReg(rip); // according to AMD's software developer guide, bits above 18 are // not used in the flags register. Since the minidump format // specifies 32 bits for the flags register, we can truncate safely // with no loss. context_ptr->eflags = machine_state->__rflags; AddReg(cs); AddReg(fs); AddReg(gs); #endif #undef AddReg(a) return true; } #endif bool MinidumpGenerator::WriteThreadStream(mach_port_t thread_id, MDRawThread *thread) { breakpad_thread_state_data_t state; mach_msg_type_number_t state_count = sizeof(state); if (thread_get_state(thread_id, BREAKPAD_MACHINE_THREAD_STATE, state, &state_count) == KERN_SUCCESS) { if (!WriteStack(state, &thread->stack)) return false; if (!WriteContext(state, &thread->thread_context)) return false; thread->thread_id = thread_id; } else { return false; } return true; } bool MinidumpGenerator::WriteThreadListStream( MDRawDirectory *thread_list_stream) { TypedMDRVA<MDRawThreadList> list(&writer_); thread_act_port_array_t threads_for_task; mach_msg_type_number_t thread_count; int non_generator_thread_count; if (task_threads(crashing_task_, &threads_for_task, &thread_count)) return false; // Don't include the generator thread non_generator_thread_count = thread_count - 1; if (!list.AllocateObjectAndArray(non_generator_thread_count, sizeof(MDRawThread))) return false; thread_list_stream->stream_type = MD_THREAD_LIST_STREAM; thread_list_stream->location = list.location(); list.get()->number_of_threads = non_generator_thread_count; MDRawThread thread; int thread_idx = 0; for (unsigned int i = 0; i < thread_count; ++i) { memset(&thread, 0, sizeof(MDRawThread)); if (threads_for_task[i] != handler_thread_) { if (!WriteThreadStream(threads_for_task[i], &thread)) return false; list.CopyIndexAfterObject(thread_idx++, &thread, sizeof(MDRawThread)); } } return true; } bool MinidumpGenerator::WriteExceptionStream(MDRawDirectory *exception_stream) { TypedMDRVA<MDRawExceptionStream> exception(&writer_); if (!exception.Allocate()) return false; exception_stream->stream_type = MD_EXCEPTION_STREAM; exception_stream->location = exception.location(); MDRawExceptionStream *exception_ptr = exception.get(); exception_ptr->thread_id = exception_thread_; // This naming is confusing, but it is the proper translation from // mach naming to minidump naming. exception_ptr->exception_record.exception_code = exception_type_; exception_ptr->exception_record.exception_flags = exception_code_; breakpad_thread_state_data_t state; mach_msg_type_number_t stateCount = sizeof(state); if (thread_get_state(exception_thread_, BREAKPAD_MACHINE_THREAD_STATE, state, &stateCount) != KERN_SUCCESS) return false; if (!WriteContext(state, &exception_ptr->thread_context)) return false; if (exception_type_ == EXC_BAD_ACCESS) exception_ptr->exception_record.exception_address = exception_subcode_; else exception_ptr->exception_record.exception_address = CurrentPCForStack(state); return true; } bool MinidumpGenerator::WriteSystemInfoStream( MDRawDirectory *system_info_stream) { TypedMDRVA<MDRawSystemInfo> info(&writer_); if (!info.Allocate()) return false; system_info_stream->stream_type = MD_SYSTEM_INFO_STREAM; system_info_stream->location = info.location(); // CPU Information uint32_t cpu_type; size_t len = sizeof(cpu_type); sysctlbyname("hw.cputype", &cpu_type, &len, NULL, 0); uint32_t number_of_processors; len = sizeof(number_of_processors); sysctlbyname("hw.ncpu", &number_of_processors, &len, NULL, 0); MDRawSystemInfo *info_ptr = info.get(); switch (cpu_type) { case CPU_TYPE_POWERPC: info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_PPC; break; case CPU_TYPE_I386: info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_X86; #ifdef __i386__ // ebx is used for PIC code, so we need // to preserve it. #define cpuid(op,eax,ebx,ecx,edx) \ asm ("pushl %%ebx \n\t" \ "cpuid \n\t" \ "movl %%ebx,%1 \n\t" \ "popl %%ebx" \ : "=a" (eax), \ "=g" (ebx), \ "=c" (ecx), \ "=d" (edx) \ : "0" (op)) int unused, unused2; // get vendor id cpuid(0, unused, info_ptr->cpu.x86_cpu_info.vendor_id[0], info_ptr->cpu.x86_cpu_info.vendor_id[2], info_ptr->cpu.x86_cpu_info.vendor_id[1]); // get version and feature info cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2, info_ptr->cpu.x86_cpu_info.feature_information); // family info_ptr->processor_level = (info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8; // 0xMMSS (Model, Stepping) info_ptr->processor_revision = (info_ptr->cpu.x86_cpu_info.version_information & 0xF) | ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4); // decode extended model info if (info_ptr->processor_level == 0xF || info_ptr->processor_level == 0x6) { info_ptr->processor_revision |= ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0000) >> 4); } // decode extended family info if (info_ptr->processor_level == 0xF) { info_ptr->processor_level += ((info_ptr->cpu.x86_cpu_info.version_information & 0xFF00000) >> 20); } #endif // __i386__ break; default: info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; break; } info_ptr->number_of_processors = number_of_processors; info_ptr->platform_id = MD_OS_MAC_OS_X; MDLocationDescriptor build_string_loc; if (!writer_.WriteString(build_string_, 0, &build_string_loc)) return false; info_ptr->csd_version_rva = build_string_loc.rva; info_ptr->major_version = os_major_version_; info_ptr->minor_version = os_minor_version_; info_ptr->build_number = os_build_number_; return true; } bool MinidumpGenerator::WriteModuleStream(unsigned int index, MDRawModule *module) { if (dynamic_images_) { // we're in a different process than the crashed process DynamicImage *image = dynamic_images_->GetImage(index); if (!image) return false; const breakpad_mach_header *header = image->GetMachHeader(); if (!header) return false; int cpu_type = header->cputype; memset(module, 0, sizeof(MDRawModule)); MDLocationDescriptor string_location; const char* name = image->GetFilePath(); if (!writer_.WriteString(name, 0, &string_location)) return false; module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); module->size_of_image = image->GetVMSize(); module->module_name_rva = string_location.rva; // We'll skip the executable module, because they don't have // LC_ID_DYLIB load commands, and the crash processing server gets // version information from the Plist file, anyway. if (index != (uint32_t)FindExecutableModule()) { module->version_info.signature = MD_VSFIXEDFILEINFO_SIGNATURE; module->version_info.struct_version |= MD_VSFIXEDFILEINFO_VERSION; // Convert MAC dylib version format, which is a 32 bit number, to the // format used by minidump. The mac format is <16 bits>.<8 bits>.<8 bits> // so it fits nicely into the windows version with some massaging // The mapping is: // 1) upper 16 bits of MAC version go to lower 16 bits of product HI // 2) Next most significant 8 bits go to upper 16 bits of product LO // 3) Least significant 8 bits go to lower 16 bits of product LO uint32_t modVersion = image->GetVersion(); module->version_info.file_version_hi = 0; module->version_info.file_version_hi = modVersion >> 16; module->version_info.file_version_lo |= (modVersion & 0xff00) << 8; module->version_info.file_version_lo |= (modVersion & 0xff); } if (!WriteCVRecord(module, cpu_type, name)) { return false; } } else { // we're getting module info in the crashed process const breakpad_mach_header *header; header = (breakpad_mach_header*)_dyld_get_image_header(index); if (!header) return false; #ifdef __LP64__ assert(header->magic == MH_MAGIC_64); if(header->magic != MH_MAGIC_64) return false; #else assert(header->magic == MH_MAGIC); if(header->magic != MH_MAGIC) return false; #endif int cpu_type = header->cputype; unsigned long slide = _dyld_get_image_vmaddr_slide(index); const char* name = _dyld_get_image_name(index); const struct load_command *cmd = reinterpret_cast<const struct load_command *>(header + 1); memset(module, 0, sizeof(MDRawModule)); for (unsigned int i = 0; cmd && (i < header->ncmds); i++) { if (cmd->cmd == LC_SEGMENT) { const breakpad_mach_segment_command *seg = reinterpret_cast<const breakpad_mach_segment_command *>(cmd); if (!strcmp(seg->segname, "__TEXT")) { MDLocationDescriptor string_location; if (!writer_.WriteString(name, 0, &string_location)) return false; module->base_of_image = seg->vmaddr + slide; module->size_of_image = seg->vmsize; module->module_name_rva = string_location.rva; if (!WriteCVRecord(module, cpu_type, name)) return false; return true; } } cmd = reinterpret_cast<struct load_command*>((char *)cmd + cmd->cmdsize); } } return true; } int MinidumpGenerator::FindExecutableModule() { if (dynamic_images_) { int index = dynamic_images_->GetExecutableImageIndex(); if (index >= 0) { return index; } } else { int image_count = _dyld_image_count(); const struct mach_header *header; for (int index = 0; index < image_count; ++index) { header = _dyld_get_image_header(index); if (header->filetype == MH_EXECUTE) return index; } } // failed - just use the first image return 0; } bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, const char *module_path) { TypedMDRVA<MDCVInfoPDB70> cv(&writer_); // Only return the last path component of the full module path const char *module_name = strrchr(module_path, '/'); // Increment past the slash if (module_name) ++module_name; else module_name = "<Unknown>"; size_t module_name_length = strlen(module_name); if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t))) return false; if (!cv.CopyIndexAfterObject(0, module_name, module_name_length)) return false; module->cv_record = cv.location(); MDCVInfoPDB70 *cv_ptr = cv.get(); cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; cv_ptr->age = 0; // Get the module identifier FileID file_id(module_path); unsigned char identifier[16]; if (file_id.MachoIdentifier(cpu_type, identifier)) { cv_ptr->signature.data1 = (uint32_t)identifier[0] << 24 | (uint32_t)identifier[1] << 16 | (uint32_t)identifier[2] << 8 | (uint32_t)identifier[3]; cv_ptr->signature.data2 = (uint32_t)identifier[4] << 8 | identifier[5]; cv_ptr->signature.data3 = (uint32_t)identifier[6] << 8 | identifier[7]; cv_ptr->signature.data4[0] = identifier[8]; cv_ptr->signature.data4[1] = identifier[9]; cv_ptr->signature.data4[2] = identifier[10]; cv_ptr->signature.data4[3] = identifier[11]; cv_ptr->signature.data4[4] = identifier[12]; cv_ptr->signature.data4[5] = identifier[13]; cv_ptr->signature.data4[6] = identifier[14]; cv_ptr->signature.data4[7] = identifier[15]; } return true; } bool MinidumpGenerator::WriteModuleListStream( MDRawDirectory *module_list_stream) { TypedMDRVA<MDRawModuleList> list(&writer_); int image_count = dynamic_images_ ? dynamic_images_->GetImageCount() : _dyld_image_count(); if (!list.AllocateObjectAndArray(image_count, MD_MODULE_SIZE)) return false; module_list_stream->stream_type = MD_MODULE_LIST_STREAM; module_list_stream->location = list.location(); list.get()->number_of_modules = image_count; // Write out the executable module as the first one MDRawModule module; int executableIndex = FindExecutableModule(); if (!WriteModuleStream(executableIndex, &module)) { return false; } list.CopyIndexAfterObject(0, &module, MD_MODULE_SIZE); int destinationIndex = 1; // Write all other modules after this one for (int i = 0; i < image_count; ++i) { if (i != executableIndex) { if (!WriteModuleStream(i, &module)) { return false; } list.CopyIndexAfterObject(destinationIndex++, &module, MD_MODULE_SIZE); } } return true; } bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) { TypedMDRVA<MDRawMiscInfo> info(&writer_); if (!info.Allocate()) return false; misc_info_stream->stream_type = MD_MISC_INFO_STREAM; misc_info_stream->location = info.location(); MDRawMiscInfo *info_ptr = info.get(); info_ptr->size_of_info = sizeof(MDRawMiscInfo); info_ptr->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID | MD_MISCINFO_FLAGS1_PROCESS_TIMES | MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO; // Process ID info_ptr->process_id = getpid(); // Times struct rusage usage; if (getrusage(RUSAGE_SELF, &usage) != -1) { // Omit the fractional time since the MDRawMiscInfo only wants seconds info_ptr->process_user_time = usage.ru_utime.tv_sec; info_ptr->process_kernel_time = usage.ru_stime.tv_sec; } int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, info_ptr->process_id }; size_t size; if (!sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &size, NULL, 0)) { mach_vm_address_t addr; if (mach_vm_allocate(mach_task_self(), &addr, size, true) == KERN_SUCCESS) { struct kinfo_proc *proc = (struct kinfo_proc *)addr; if (!sysctl(mib, sizeof(mib) / sizeof(mib[0]), proc, &size, NULL, 0)) info_ptr->process_create_time = proc->kp_proc.p_starttime.tv_sec; mach_vm_deallocate(mach_task_self(), addr, size); } } // Speed uint64_t speed; size = sizeof(speed); sysctlbyname("hw.cpufrequency_max", &speed, &size, NULL, 0); info_ptr->processor_max_mhz = speed / (1000 * 1000); info_ptr->processor_mhz_limit = speed / (1000 * 1000); size = sizeof(speed); sysctlbyname("hw.cpufrequency", &speed, &size, NULL, 0); info_ptr->processor_current_mhz = speed / (1000 * 1000); return true; } bool MinidumpGenerator::WriteBreakpadInfoStream( MDRawDirectory *breakpad_info_stream) { TypedMDRVA<MDRawBreakpadInfo> info(&writer_); if (!info.Allocate()) return false; breakpad_info_stream->stream_type = MD_BREAKPAD_INFO_STREAM; breakpad_info_stream->location = info.location(); MDRawBreakpadInfo *info_ptr = info.get(); if (exception_thread_ && exception_type_) { info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; info_ptr->dump_thread_id = handler_thread_; info_ptr->requesting_thread_id = exception_thread_; } else { info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID; info_ptr->dump_thread_id = handler_thread_; info_ptr->requesting_thread_id = 0; } return true; } } // namespace google_breakpad
darwin/breakpad
src/client/mac/handler/minidump_generator.cc
C++
bsd-3-clause
30,631
package some import ( "github.com/laher/someutils" "strings" "testing" ) func TestXargsPipeline(t *testing.T) { pipeline := someutils.NewPipeline(Xargs(LsFact, "-l")) invocation, out, errout := pipeline.InvokeReader(strings.NewReader(".\n..\n")) errinvocation := invocation.Wait() outstring := out.String() if errinvocation == nil { t.Errorf("Wait returned nil") } if errinvocation.Err != nil { t.Logf("errout: %+v\n", errout.String()) t.Logf("stdout: %+v", outstring) t.Logf("error: %+v, exit code: %d\n", errinvocation.Err, errinvocation.ExitCode) if *errinvocation.ExitCode != 0 { t.Errorf("error: %+v\n", errinvocation.Err) } } // TODO: 'Output' string for testing? }
laher/someutils
some/xargs_test.go
GO
bsd-3-clause
702
/** * SAHARA Scheduling Server * * Schedules and assigns local laboratory rigs. * * @license See LICENSE in the top level directory for complete license terms. * * Copyright (c) 2010, University of Technology, Sydney * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the University of Technology, Sydney nor the names * of its contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @author Michael Diponio (mdiponio) * @date 17th November 2010 */ package au.edu.uts.eng.remotelabs.schedserver.bookings.impl.slotsengine.tests; import java.lang.reflect.Field; import java.util.Calendar; import java.util.Date; import java.util.List; import junit.framework.TestCase; import org.junit.Before; import au.edu.uts.eng.remotelabs.schedserver.bookings.impl.slotsengine.MBooking; import au.edu.uts.eng.remotelabs.schedserver.bookings.impl.slotsengine.MRange; import au.edu.uts.eng.remotelabs.schedserver.bookings.impl.slotsengine.RigBookings; import au.edu.uts.eng.remotelabs.schedserver.bookings.impl.slotsengine.TimeUtil; import au.edu.uts.eng.remotelabs.schedserver.bookings.impl.slotsengine.MBooking.BType; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Bookings; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.RequestCapabilities; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Rig; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.RigType; import au.edu.uts.eng.remotelabs.schedserver.logger.impl.SystemErrLogger; /** * Tests the {@link RigBookings} class. */ public class RigBookingsTester extends TestCase { /** Object of class under test. */ private RigBookings bookings; /** Day key. */ private String dayKey; @Override @Before public void setUp() throws Exception { Rig r = new Rig(); RigType rt = new RigType(); r.setRigType(rt); this.bookings = new RigBookings(r, TimeUtil.getDayKey(new Date())); Field f = RigBookings.class.getDeclaredField("logger"); f.setAccessible(true); f.set(this.bookings, new SystemErrLogger()); this.dayKey = TimeUtil.getDayKey(Calendar.getInstance()); } public void testGetTypeBookings() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.RIG, this.dayKey); for (int i = 10; i <= 20; i++) { slots[i] = m; } MBooking mb = new MBooking(30, 40, BType.TYPE, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = mb; } m = new MBooking(50, 70, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); List<MBooking> tb = this.bookings.getTypeBookings(); assertNotNull(tb); assertEquals(1, tb.size()); assertEquals(tb.get(0).getType(), BType.TYPE); assertEquals(tb.get(0).getStartSlot(), 30); assertEquals(tb.get(0).getEndSlot(), 40); assertEquals(tb.get(0), mb); } public void testGetTypeBookingsNoRig() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.RIG, this.dayKey); for (int i = 10; i <= 20; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } m = new MBooking(50, 70, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); List<MBooking> tb = this.bookings.getTypeBookings(); assertNotNull(tb); assertEquals(0, tb.size()); } public void testGetTypeBookingsNoBookings() throws Throwable { List<MBooking> tb = this.bookings.getTypeBookings(); assertNotNull(tb); assertEquals(0, tb.size()); } public void testGetCapsBookingsS() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.RIG, this.dayKey); for (int i = 10; i <= 20; i++) { slots[i] = m; } MBooking mb = new MBooking(30, 40, BType.TYPE, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = mb; } m = new MBooking(50, 70, BType.CAPABILITY, this.dayKey); f = MBooking.class.getDeclaredField("reqCaps"); f.setAccessible(true); f.set(m, new RequestCapabilities("foo,foo")); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); List<MBooking> tb = this.bookings.getCapabilitiesBookings("foo,foo"); assertNotNull(tb); assertEquals(1, tb.size()); assertEquals(tb.get(0).getType(), BType.CAPABILITY); assertEquals(tb.get(0).getStartSlot(), 50); assertEquals(tb.get(0).getEndSlot(), 70); assertEquals(tb.get(0), m); } public void testGetCapsBookingsTwoS() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.CAPABILITY, this.dayKey); f = MBooking.class.getDeclaredField("reqCaps"); f.setAccessible(true); f.set(m, new RequestCapabilities("foo,bar")); for (int i = 10; i <= 20; i++) { slots[i] = m; } MBooking mb = new MBooking(30, 40, BType.CAPABILITY, this.dayKey); f = MBooking.class.getDeclaredField("reqCaps"); f.setAccessible(true); f.set(mb, new RequestCapabilities("foo,foo")); for (int i = 30; i <= 40; i++) { slots[i] = mb; } m = new MBooking(50, 70, BType.CAPABILITY, this.dayKey); f = MBooking.class.getDeclaredField("reqCaps"); f.setAccessible(true); f.set(m, new RequestCapabilities("foo,foo")); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); List<MBooking> tb = this.bookings.getCapabilitiesBookings("foo,foo"); assertNotNull(tb); assertEquals(2, tb.size()); assertEquals(tb.get(0).getType(), BType.CAPABILITY); assertEquals(tb.get(0).getStartSlot(), 30); assertEquals(tb.get(0).getEndSlot(), 40); assertEquals(tb.get(0), mb); assertEquals(tb.get(1).getType(), BType.CAPABILITY); assertEquals(tb.get(1).getStartSlot(), 50); assertEquals(tb.get(1).getEndSlot(), 70); assertEquals(tb.get(1), m); } public void testGetCapsBookings() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.RIG, this.dayKey); for (int i = 10; i <= 20; i++) { slots[i] = m; } MBooking mb = new MBooking(30, 40, BType.TYPE, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = mb; } m = new MBooking(50, 70, BType.CAPABILITY, this.dayKey); f = MBooking.class.getDeclaredField("reqCaps"); f.setAccessible(true); f.set(m, new RequestCapabilities("foo,foo")); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); List<MBooking> tb = this.bookings.getCapabilitiesBookings(new RequestCapabilities("foo,foo")); assertNotNull(tb); assertEquals(1, tb.size()); assertEquals(tb.get(0).getType(), BType.CAPABILITY); assertEquals(tb.get(0).getStartSlot(), 50); assertEquals(tb.get(0).getEndSlot(), 70); assertEquals(tb.get(0), m); } public void testGetTypeCapsBookingsNoBookings() throws Throwable { List<MBooking> tb = this.bookings.getCapabilitiesBookings(new RequestCapabilities("foo,bar,baz")); assertNotNull(tb); assertEquals(0, tb.size()); } public void testGetTypeCapsBookingsNoBookingsS() throws Throwable { List<MBooking> tb = this.bookings.getCapabilitiesBookings("foo,bar,baz"); assertNotNull(tb); assertEquals(0, tb.size()); } public void testGetSlotBooking() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(76, 77, BType.RIG, this.dayKey); slots[76] = m; slots[77] = m; f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 76); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 77); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 1); for (int i = 0; i < 76; i++) { assertNull(this.bookings.getSlotBooking(i)); } assertEquals(m, this.bookings.getSlotBooking(76)); assertEquals(m, this.bookings.getSlotBooking(77)); for (int i = 78; i < 96; i++) { assertNull(this.bookings.getSlotBooking(i)); } } public void testGetFreeSlots() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(76, 77, BType.RIG, this.dayKey); slots[76] = m; slots[77] = m; f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 76); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 77); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 1); List<MRange> range = this.bookings.getFreeSlots(72, 78, 1); assertNotNull(range); assertEquals(2, range.size()); assertEquals(range.get(0).getStartSlot(), 72); assertEquals(range.get(0).getEndSlot(), 75); assertEquals(range.get(1).getStartSlot(), 78); assertEquals(range.get(1).getEndSlot(), 78); } public void testGetEarlyFit() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.RIG, this.dayKey); for (int i = 10; i <= 20; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } m = new MBooking(50, 70, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); MBooking mb = new MBooking(10, 15, BType.RIG, this.dayKey); MRange es = this.bookings.getEarlyFit(mb); assertNotNull(es); assertEquals(4, es.getStartSlot()); assertEquals(9, es.getEndSlot()); assertEquals(6, es.getNumSlots()); } public void testGetEarlyFit2() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 26, BType.RIG, this.dayKey); for (int i = 10; i <= 26; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } m = new MBooking(50, 70, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); MBooking mb = new MBooking(27, 30, BType.RIG, this.dayKey); MRange es = this.bookings.getEarlyFit(mb); assertNotNull(es); assertEquals(27, es.getStartSlot()); assertEquals(29, es.getEndSlot()); assertEquals(3, es.getNumSlots()); } public void testGetEarlyFit3() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 29, BType.RIG, this.dayKey); for (int i = 10; i <= 29; i++) { slots[i] = m; } m = new MBooking(30, 49, BType.RIG, this.dayKey); for (int i = 30; i <= 49; i++) { slots[i] = m; } m = new MBooking(51, 70, BType.RIG, this.dayKey); for (int i = 51; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); MBooking mb = new MBooking(50, 54, BType.RIG, this.dayKey); MRange es = this.bookings.getEarlyFit(mb); assertNotNull(es); assertEquals(5, es.getStartSlot()); assertEquals(9, es.getEndSlot()); assertEquals(mb.getNumSlots(), es.getNumSlots()); } public void testGetLateFit() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.RIG, this.dayKey); for (int i = 10; i <= 20; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } m = new MBooking(50, 70, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); MBooking mb = new MBooking(10, 15, BType.RIG, this.dayKey); MRange es = this.bookings.getLateFit(mb); assertNotNull(es); assertEquals(21, es.getStartSlot()); assertEquals(26, es.getEndSlot()); assertEquals(6, es.getNumSlots()); } public void testGetLateFit2() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 26, BType.RIG, this.dayKey); for (int i = 10; i <= 26; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } m = new MBooking(50, 70, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); MBooking mb = new MBooking(26, 30, BType.RIG, this.dayKey); MRange es = this.bookings.getLateFit(mb); assertNotNull(es); assertEquals(27, es.getStartSlot()); assertEquals(29, es.getEndSlot()); assertEquals(3, es.getNumSlots()); } public void testGetLateFit3() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 29, BType.RIG, this.dayKey); for (int i = 10; i <= 29; i++) { slots[i] = m; } m = new MBooking(30, 49, BType.RIG, this.dayKey); for (int i = 30; i <= 49; i++) { slots[i] = m; } m = new MBooking(51, 70, BType.RIG, this.dayKey); for (int i = 51; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); MBooking mb = new MBooking(50, 53, BType.RIG, this.dayKey); MRange es = this.bookings.getLateFit(mb); assertNotNull(es); assertEquals(71, es.getStartSlot()); assertEquals(74, es.getEndSlot()); assertEquals(4, es.getNumSlots()); } public void testGetLateFit4() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(10, 27, BType.RIG, this.dayKey); for (int i = 10; i <= 27; i++) { slots[i] = m; } m = new MBooking(30, 49, BType.RIG, this.dayKey); for (int i = 30; i <= 49; i++) { slots[i] = m; } m = new MBooking(51, 70, BType.RIG, this.dayKey); for (int i = 51; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); MBooking mb = new MBooking(27, 30, BType.RIG, this.dayKey); MRange es = this.bookings.getLateFit(mb); assertNotNull(es); assertEquals(28, es.getStartSlot()); assertEquals(29, es.getEndSlot()); assertEquals(2, es.getNumSlots()); } public void testGetFreeSlotsSequential() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); for (int j = 0; j <= 6; j++) { MBooking m = new MBooking(j * 10, j * 10 + 9, BType.RIG, this.dayKey); for (int i = m.getStartSlot(); i <= m.getEndSlot(); i++) { slots[i] = m; } } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 69); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 7); List<MRange> range = this.bookings.getFreeSlots(); assertEquals(1, range.size()); MRange r = range.get(0); assertEquals(70, r.getStartSlot()); assertEquals(95, r.getEndSlot()); } public void testAreSlotsFree() throws Exception { assertTrue(this.bookings.areSlotsFree(0, 96)); Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); assertEquals(96, slots.length); assertNull(this.bookings.getNextBooking(10)); } public void testAreSlotsFreeOneBookings() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(0, 48, BType.RIG, this.dayKey); for (int i = 0; i <= 48; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 48); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 1); assertFalse(this.bookings.areSlotsFree(0, 48)); assertFalse(this.bookings.areSlotsFree(47, 47)); assertFalse(this.bookings.areSlotsFree(0, 10)); assertFalse(this.bookings.areSlotsFree(0, 96)); assertTrue(this.bookings.areSlotsFree(49, 96)); } public void testAreSlotsFreeTwoBookings() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(5, 10, BType.RIG, this.dayKey); for (int i = 5; i <= 10; i++) { slots[i] = m; } m = new MBooking(15, 25, BType.RIG, this.dayKey); for (int i = 15; i <= 25; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 5); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 25); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 2); assertTrue(this.bookings.areSlotsFree(0, 4)); assertFalse(this.bookings.areSlotsFree(5, 10)); assertTrue(this.bookings.areSlotsFree(11, 14)); assertFalse(this.bookings.areSlotsFree(15, 25)); assertFalse(this.bookings.areSlotsFree(0, 96)); assertTrue(this.bookings.areSlotsFree(26, 96)); } public void testCommit() throws Throwable { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); MBooking m = new MBooking(5, 10, BType.RIG, this.dayKey); assertTrue(this.bookings.commitBooking(m)); f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); assertEquals(5, f.getInt(this.bookings)); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); assertEquals(10, f.getInt(this.bookings)); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); assertEquals(1, f.getInt(this.bookings)); int i = 0; for ( ; i <= 4; i++) { assertNull(slots[i]); } for ( ; i <= 10 ; i++) { assertNotNull(slots[i]); assertTrue(m == slots[i]); } for ( ; i < slots.length ; i++) { assertNull(slots[i]); } assertEquals(1, this.bookings.getNumBookings()); assertTrue(this.bookings.areSlotsFree(0, 4)); assertFalse(this.bookings.areSlotsFree(5, 10)); assertTrue(this.bookings.areSlotsFree(11, 96)); m = new MBooking(10, 15, BType.RIG, this.dayKey); assertFalse(this.bookings.commitBooking(m)); m = new MBooking(1, 3, BType.RIG, this.dayKey); assertTrue(this.bookings.commitBooking(m)); assertEquals(2, this.bookings.getNumBookings()); f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); assertEquals(1, f.getInt(this.bookings)); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); assertEquals(10, f.getInt(this.bookings)); m = new MBooking(15, 20, BType.RIG, this.dayKey); assertTrue(this.bookings.commitBooking(m)); assertEquals(3, this.bookings.getNumBookings()); f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); assertEquals(1, f.getInt(this.bookings)); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); assertEquals(20, f.getInt(this.bookings)); } public void testCommitTwo() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); for (int i = 0; i < 24; i++) { MBooking m = new MBooking(i * 4, i * 4 + 3, BType.RIG, this.dayKey); assertTrue(this.bookings.commitBooking(m)); } for (int i = 0; i < slots.length; i++) { assertNotNull(slots[i]); } } public void testRemove() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); Bookings b = new Bookings(); b.setId(1L); MBooking m = new MBooking(5, 10, BType.RIG, this.dayKey); m.setBooking(b); for (int i = 5; i <= 10; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 5); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 1); assertTrue(this.bookings.removeBooking(m)); assertEquals(0, this.bookings.getNumBookings()); for (int i = 0; i < slots.length; i++) { assertNull(slots[i]); } } public void testRemoveTwo() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[]) f.get(this.bookings); Bookings b = new Bookings(); b.setId(1L); MBooking m = new MBooking(5, 10, BType.RIG, this.dayKey); m.setBooking(b); for (int i = 5; i <= 10; i++) { slots[i] = m; } Bookings b2 = new Bookings(); b2.setId(2L); MBooking m2 = new MBooking(20,30, BType.RIG, this.dayKey); m2.setBooking(b2); for (int i = 20; i <= 30; i++) { slots[i] = m2; } Field ss = RigBookings.class.getDeclaredField("startSlot"); ss.setAccessible(true); ss.setInt(this.bookings, 5); Field es = RigBookings.class.getDeclaredField("endSlot"); es.setAccessible(true); es.setInt(this.bookings, 30); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 2); assertTrue(this.bookings.hasBooking(m)); assertTrue(this.bookings.removeBooking(m)); assertFalse(this.bookings.hasBooking(m)); assertEquals(1, this.bookings.getNumBookings()); assertEquals(20, ss.getInt(this.bookings)); assertEquals(30, es.getInt(this.bookings)); for (int i = 0; i < 20; i++) assertNull(slots[i]); for (int i = 20; i <= 30; i++) assertNotNull(slots[i]); for (int i = 31; i < slots.length; i++) assertNull(slots[i]); assertTrue(this.bookings.hasBooking(m2)); assertTrue(this.bookings.removeBooking(m2)); assertFalse(this.bookings.hasBooking(m2)); assertEquals(0, this.bookings.getNumBookings()); for (int i = 0; i < slots.length; i++) assertNull(slots[i]); } public void testGetFreeAll() { List<MRange> range = this.bookings.getFreeSlots(); assertEquals(1, range.size()); MRange r = range.get(0); assertEquals(0, r.getStartSlot()); assertEquals(95, r.getEndSlot()); Calendar start = r.getStart(); Calendar cal = Calendar.getInstance(); assertEquals(cal.get(Calendar.YEAR), start.get(Calendar.YEAR)); assertEquals(cal.get(Calendar.MONTH), start.get(Calendar.MONTH)); assertEquals(cal.get(Calendar.DAY_OF_MONTH), start.get(Calendar.DAY_OF_MONTH)); assertEquals(0, start.get(Calendar.HOUR)); assertEquals(0, start.get(Calendar.MINUTE)); assertEquals(0, start.get(Calendar.SECOND)); Calendar end = r.getEnd(); cal.add(Calendar.DAY_OF_MONTH, 1); assertEquals(cal.get(Calendar.YEAR), end.get(Calendar.YEAR)); assertEquals(cal.get(Calendar.MONTH), end.get(Calendar.MONTH)); assertEquals(cal.get(Calendar.DAY_OF_MONTH), end.get(Calendar.DAY_OF_MONTH)); assertEquals(0, end.get(Calendar.HOUR)); assertEquals(0, end.get(Calendar.MINUTE)); assertEquals(0, end.get(Calendar.SECOND)); } public void testGetFreeNone() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); MBooking m = new MBooking(0, 95, BType.RIG, this.dayKey); for (int i = 0; i < slots.length; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 95); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 1); List<MRange> range = this.bookings.getFreeSlots(); assertNotNull(range); assertEquals(0, range.size()); assertNotNull(this.bookings.getNextBooking(95)); } public void testGetFreeTwoBookings() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); MBooking m = new MBooking(10, 20, BType.RIG, this.dayKey); for (int i = 10; i <= 20; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 10); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 40); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 2); List<MRange> range = this.bookings.getFreeSlots(); assertNotNull(range); assertEquals(3, range.size()); MRange r = range.get(0); assertEquals(0, r.getStartSlot()); assertEquals(9, r.getEndSlot()); assertEquals(10, this.bookings.getNextBooking(0).getStartSlot()); r = range.get(1); assertEquals(21, r.getStartSlot()); assertEquals(29, r.getEndSlot()); r = range.get(2); assertEquals(41, r.getStartSlot()); assertEquals(95, r.getEndSlot()); } public void testGetFreeTwoBookings2() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); MBooking m = new MBooking(0, 20, BType.RIG, this.dayKey); for (int i = 0; i <= 20; i++) { slots[i] = m; } m = new MBooking(90, 95, BType.RIG, this.dayKey); for (int i = 90; i <= 95; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 95); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 2); List<MRange> range = this.bookings.getFreeSlots(); assertNotNull(range); assertEquals(1, range.size()); MRange r = range.get(0); assertEquals(21, r.getStartSlot()); assertEquals(89, r.getEndSlot()); } public void testGetFreeRange() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); MBooking m = new MBooking(0, 20, BType.RIG, this.dayKey); for (int i = 0; i <= 20; i++) { slots[i] = m; } m = new MBooking(90, 95, BType.RIG, this.dayKey); for (int i = 90; i <= 95; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 95); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 2); List<MRange> range = this.bookings.getFreeSlots(21, 89, 1); assertNotNull(range); assertEquals(1, range.size()); MRange r = range.get(0); assertEquals(21, r.getStartSlot()); assertEquals(89, r.getEndSlot()); } public void testGetFreeRange2() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); MBooking m = new MBooking(0, 20, BType.RIG, this.dayKey); for (int i = 0; i <= 20; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } m = new MBooking(50, 70, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 70); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); List<MRange> range = this.bookings.getFreeSlots(10, 60, 1); assertNotNull(range); assertEquals(2, range.size()); MRange r = range.get(0); assertEquals(21, r.getStartSlot()); assertEquals(29, r.getEndSlot()); r = range.get(1); assertEquals(41, r.getStartSlot()); assertEquals(49, r.getEndSlot()); } public void testGetFreeRange3() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); MBooking m = new MBooking(0, 20, BType.RIG, this.dayKey); for (int i = 0; i <= 20; i++) { slots[i] = m; } m = new MBooking(30, 40, BType.RIG, this.dayKey); for (int i = 30; i <= 40; i++) { slots[i] = m; } m = new MBooking(50, 60, BType.RIG, this.dayKey); for (int i = 50; i <= 70; i++) { slots[i] = m; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 60); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 3); List<MRange> range = this.bookings.getFreeSlots(10, 70, 1); assertNotNull(range); assertEquals(3, range.size()); MRange r = range.get(0); assertEquals(21, r.getStartSlot()); assertEquals(29, r.getEndSlot()); r = range.get(1); assertEquals(41, r.getStartSlot()); assertEquals(49, r.getEndSlot()); r = range.get(2); assertEquals(61, r.getStartSlot()); assertEquals(70, r.getEndSlot()); } public void testLots() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); int i; for (i = 0; i < slots.length; i += 2) { slots[i] = new MBooking(i, i, BType.RIG, this.dayKey); } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 94); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, 48); List<MRange> range = this.bookings.getFreeSlots(); assertNotNull(range); assertEquals(48, range.size()); for (MRange r : range) { assertTrue(r.getStartSlot() % 2 == 1); assertTrue(r.getStartSlot() == r.getEndSlot()); assertFalse(r.getStart().equals(r.getEnd())); assertEquals(1, r.getNumSlots()); } } public void testLotsThreshold() throws Exception { Field f = RigBookings.class.getDeclaredField("slots"); f.setAccessible(true); MBooking slots[] = (MBooking[])f.get(this.bookings); int i, j = 0; for (i = 0; i < 49; i += 2) { slots[i] = new MBooking(i, i, BType.RIG, this.dayKey); j++; } for ( ; i < slots.length; i += 3) { slots[i] = new MBooking(i, i, BType.RIG, this.dayKey); j++; } f = RigBookings.class.getDeclaredField("startSlot"); f.setAccessible(true); f.setInt(this.bookings, 0); f = RigBookings.class.getDeclaredField("endSlot"); f.setAccessible(true); f.setInt(this.bookings, 95); f = RigBookings.class.getDeclaredField("numBookings"); f.setAccessible(true); f.setInt(this.bookings, j); List<MRange> range = this.bookings.getFreeSlots(2); assertNotNull(range); assertEquals(15, range.size()); } }
sahara-labs/scheduling-server
Bookings/src/au/edu/uts/eng/remotelabs/schedserver/bookings/impl/slotsengine/tests/RigBookingsTester.java
Java
bsd-3-clause
45,577
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806_char_ncpy_63b.cpp Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806.label.xml Template File: sources-sink-63b.tmpl.cpp */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: Initialize data as a large string * GoodSource: Initialize data as a small string * Sinks: ncpy * BadSink : Copy data to string using strncpy * Flow Variant: 63 Data flow: pointer to data passed from one function to another in different source files * * */ #include "std_testcase.h" #include <wchar.h> namespace CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806_char_ncpy_63 { #ifndef OMITBAD void badSink(char * * dataPtr) { char * data = *dataPtr; { char dest[50] = ""; /* POTENTIAL FLAW: Possible buffer overflow if data is larger than dest */ strncpy(dest, data, strlen(data)); dest[50-1] = '\0'; /* Ensure the destination buffer is null terminated */ printLine(data); delete [] data; } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(char * * dataPtr) { char * data = *dataPtr; { char dest[50] = ""; /* POTENTIAL FLAW: Possible buffer overflow if data is larger than dest */ strncpy(dest, data, strlen(data)); dest[50-1] = '\0'; /* Ensure the destination buffer is null terminated */ printLine(data); delete [] data; } } #endif /* OMITGOOD */ } /* close namespace */
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE122_Heap_Based_Buffer_Overflow/s04/CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806_char_ncpy_63b.cpp
C++
bsd-3-clause
1,632
<?php /** @var $this \yii\web\View */ use yii\helpers\Html; use hustshenl\metronic\helpers\Layout; use hustshenl\metronic\widgets\Menu; use hustshenl\metronic\widgets\NavBar; use hustshenl\metronic\widgets\Nav; use hustshenl\metronic\widgets\Breadcrumbs; use hustshenl\metronic\widgets\Button; use hustshenl\metronic\widgets\HorizontalMenu; use hustshenl\metronic\Metronic; use hustshenl\metronic\widgets\Badge; $this->beginPage(); Metronic::registerThemeAsset($this); ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <meta charset="<?= Yii::$app->charset ?>"/> <title><?= Html::encode($this->title) ?></title> <?php $this->head() ?> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="width=device-width, initial-scale=1.0" name="viewport"/> <meta name="MobileOptimized" content="320"> <link rel="shortcut icon" href="favicon.ico"/> </head> <!-- END HEAD --> <!-- BEGIN BODY --> <body <?= Layout::getHtmlOptions('body') ?> > <?php $this->beginBody() ?> <?php NavBar::begin( [ 'brandLabel' => 'My Company', 'brandLogoUrl' => Metronic::getAssetsUrl($this) . '/img/logo.png', 'brandUrl' => Yii::$app->homeUrl, 'options' => Layout::getHtmlOptions('header', false), ] ); echo HorizontalMenu::widget( [ 'items' => [ [ 'label' => 'Mega menu', 'type' => HorizontalMenu::ITEM_TYPE_MEGA, 'items' => [ [ //'options' => '', 'label' => 'Layouts', 'items' => [ ['label' => 'Promo Page', 'url' => ['/site/index']], ['label' => 'Email Templates'], ] ], [ //'options' => '', 'label' => 'Layouts 2', 'items' => [ ['label' => 'Promo Page 2'], ['label' => 'Email Templates 2'], ] ], ] ], [ 'label' => 'Full Mega menu', 'type' => HorizontalMenu::ITEM_TYPE_FULL_MEGA, 'text' => \hustshenl\metronic\widgets\Accordion::widget( [ 'items' => [ [ 'header' => 'Item 1', 'content' => 'Content 1...', // open its content by default 'contentOptions' => ['class' => 'in'], 'type' => \hustshenl\metronic\widgets\Accordion::ITEM_TYPE_SUCCESS, ], [ 'header' => 'Item 2', 'content' => 'Content 2...', ], ], 'itemConfig' => ['showIcon' => true], ] ), 'items' => [ [ //'options' => '', 'label' => 'Layouts', 'items' => [ ['label' => 'Promo Page', 'url' => ['/site/index']], ['label' => 'Email Templates'], ] ], [ //'options' => '', 'label' => 'Layouts 2', 'items' => [ ['label' => 'Promo Page 2'], ['label' => 'Email Templates 2'], ] ], ] ], [ 'label' => 'Home', 'items' => [ ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ] ], [ 'label' => 'Home 2', 'url' => ['/site/index'], 'items' => [ [ 'badge' => Badge::widget(['label' => 'Новинка', 'round' => false]), 'label' => 'About', 'url' => ['/site/about'] ], ['label' => 'About', 'url' => ['/site/about']], [ 'label' => 'About', 'url' => ['/site/about'], 'items' => [ ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'Index', 'url' => ['/site/index']], ] ], ['label' => 'About', 'url' => ['/site/about']], ] ], ], ] ); echo Nav::widget( [ 'items' => [ [ 'icon' => 'fa fa-warning', 'badge' => Badge::widget(['label' => 'xxx']), 'label' => 'Home', 'url' => ['/site/index'], // dropdown title 'title' => 'xx', 'more' => ['label' => 'xxx', 'url' => '/', 'icon' => 'm-icon-swapright'], // scroller 'scroller' => ['height' => 200], // end dropdown 'items' => [ ['label' => 'About', 'url' => ['/site/aboutz']], ['label' => 'About', 'url' => ['/site/aboutz']], ['label' => 'About', 'url' => ['/site/aboutz']], ['label' => 'About', 'url' => ['/site/aboutz']], ['label' => 'About', 'url' => ['/site/aboutz']], ['label' => 'About', 'url' => ['/site/aboutz']], ] ], [ 'label' => Nav::userItem('Bob Nilson', Metronic::getAssetsUrl($this) . '/img/avatar1_small.jpg'), 'url' => '#', 'type' => 'user', 'items' => [ [ 'icon' => 'fa fa-calendar', 'label' => 'About', 'url' => ['/site/about'], 'badge' => Badge::widget(['label' => 'xxx']), ], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ['divider'], ['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']], ] ], // [ 'label' => 'Contact', 'url' => ['/site/contact']], ], ] ); NavBar::end(); ?> <?= (Metronic::getComponent()->layoutOption == Metronic::LAYOUT_BOXED) ? Html::beginTag('div', ['class' => 'container']) : ''; ?> <!-- BEGIN CONTAINER --> <div class="page-container"> <!-- BEGIN SIDEBAR --> <?= Menu::widget( [ 'visible' => true, 'items' => [ // Important: you need to specify url as 'controller/action', // not just as 'controller' even if default action is used. ['icon' => 'fa fa-home', 'label' => 'Home', 'url' => ['site/indea']], // 'Products' menu item will be selected as long as the route is 'product/index' [ 'icon' => 'fa fa-cogs', 'badge' => Badge::widget(['label' => 'New', 'round' => false, 'type' => Badge::TYPE_SUCCESS]), 'label' => 'Products', 'url' => '#', 'items' => [ ['label' => 'New Arrivals', 'url' => ['product/index', 'tag' => 'new']], [ 'label' => 'Home', 'url' => '#', 'items' => [ [ 'icon' => 'fa fa-cogs', 'label' => 'Products', 'url' => ['site/index'], 'badge' => Badge::widget( ['label' => 'New', 'round' => false, 'type' => Badge::TYPE_SUCCESS] ), ], ] ], ] ], [ 'icon' => 'fa fa-bookmark-o', 'label' => 'UI Features', 'url' => '#', 'items' => [ [ 'label' => 'Buttons & Icons', 'url' => ['site/'], ], ], ], [ 'icon' => 'fa fa-user', 'label' => 'Login', 'url' => ['site/login'], 'visible' => Yii::$app->user->isGuest ], [ 'icon' => 'fa fa-user', 'label' => 'Login', 'url' => ['site/login'], 'visible' => Yii::$app->user->isGuest ], ], ] ); ?> <!-- END SIDEBAR --> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <div class="row"> <div class="col-md-12"> <!-- BEGIN PAGE TITLE & BREADCRUMB--> <h3 class="page-title"> <?= Html::encode($this->title) ?> <small><?= Html::encode($this->title) ?></small> </h3> <?= Breadcrumbs::widget( [ 'actions' => [ 'label' => 'Action', 'button' => [ 'type' => Button::TYPE_M_BLUE, 'options' => ['data-hover' => 'dropdown', 'delay' => '1000'], ], 'dropdown' => [ 'items' => [ ['label' => 'DropdownA', 'url' => '/'], ['divider'], ['label' => 'DropdownB', 'url' => '#'], ], ], ], 'homeLink' => [ 'label' => 'Home', 'icon' => 'fa fa-home', 'url' => ['/'] ], 'links' => [ [ 'icon' => 'fa fa-cogs', 'label' => 'Sample Post', 'url' => ['post/edit', 'id' => 1] ], 'Edit', ], ] ); ?> </div> </div> <!-- END PAGE HEADER--> <!-- BEGIN PAGE CONTENT--> <div class="row"> <div class="col-md-12"> <?= $content ?> </div> </div> <!-- END PAGE CONTENT--> </div> </div> <!-- END CONTENT --> </div> <!-- END CONTAINER --> <!-- BEGIN FOOTER --> <div class="footer"> <div class="footer-inner"> <?= date('Y') ?> &copy; YiiMetronic. </div> <div class="footer-tools"> <span class="go-top"> <i class="fa fa-angle-up"></i> </span> </div> </div> <?= (Metronic::getComponent()->layoutOption == Metronic::LAYOUT_BOXED) ? Html::endTag('div') : ''; ?> <?php $this->endBody() ?> </body> <!-- END BODY --> </html> <?php $this->endPage() ?>
hustshenl/yii2-metronic-lite
src/layouts/main.php
PHP
bsd-3-clause
16,403
/* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * [email protected]. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This product includes cryptographic software written by Eric Young * ([email protected]). This product includes software written by Tim * Hudson ([email protected]). * */ #include <stdio.h> #include <openssl/bn.h> #include <string.h> #include <openssl/e_os2.h> #if !defined(OPENSSL_SYS_MSDOS) || defined(__DJGPP__) # include <sys/types.h> # include <unistd.h> #else # include <process.h> typedef int pid_t; #endif #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB) # define getpid GetThreadID extern int GetThreadID(void); #endif #include <openssl/crypto.h> #include <openssl/dso.h> #include <openssl/engine.h> #include <openssl/buffer.h> #ifndef OPENSSL_NO_RSA # include <openssl/rsa.h> #endif #ifndef OPENSSL_NO_DSA # include <openssl/dsa.h> #endif #ifndef OPENSSL_NO_DH # include <openssl/dh.h> #endif #include <openssl/bn.h> #ifndef OPENSSL_NO_HW # ifndef OPENSSL_NO_HW_AEP # ifdef FLAT_INC # include "aep.h" # else # include "vendor_defns/aep.h" # endif # define AEP_LIB_NAME "aep engine" # define FAIL_TO_SW 0x10101010 # include "e_aep_err.c" static int aep_init(ENGINE *e); static int aep_finish(ENGINE *e); static int aep_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)); static int aep_destroy(ENGINE *e); static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR hConnection); static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection); static AEP_RV aep_close_connection(AEP_CONNECTION_HNDL hConnection); static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use); /* BIGNUM stuff */ # ifndef OPENSSL_NO_RSA static int aep_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx); # endif /* RSA stuff */ # ifndef OPENSSL_NO_RSA static int aep_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); # endif /* This function is aliased to mod_exp (with the mont stuff dropped). */ # ifndef OPENSSL_NO_RSA static int aep_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); # endif /* DSA stuff */ # ifndef OPENSSL_NO_DSA static int aep_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); static int aep_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); # endif /* DH stuff */ /* This function is aliased to mod_exp (with the DH and mont dropped). */ # ifndef OPENSSL_NO_DH static int aep_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); # endif /* rand stuff */ # ifdef AEPRAND static int aep_rand(unsigned char *buf, int num); static int aep_rand_status(void); # endif /* Bignum conversion stuff */ static AEP_RV GetBigNumSize(AEP_VOID_PTR ArbBigNum, AEP_U32 *BigNumSize); static AEP_RV MakeAEPBigNum(AEP_VOID_PTR ArbBigNum, AEP_U32 BigNumSize, unsigned char *AEP_BigNum); static AEP_RV ConvertAEPBigNum(void *ArbBigNum, AEP_U32 BigNumSize, unsigned char *AEP_BigNum); /* The definitions for control commands specific to this engine */ # define AEP_CMD_SO_PATH ENGINE_CMD_BASE static const ENGINE_CMD_DEFN aep_cmd_defns[] = { {AEP_CMD_SO_PATH, "SO_PATH", "Specifies the path to the 'aep' shared library", ENGINE_CMD_FLAG_STRING}, {0, NULL, NULL, 0} }; # ifndef OPENSSL_NO_RSA /* Our internal RSA_METHOD that we provide pointers to */ static RSA_METHOD aep_rsa = { "Aep RSA method", NULL, /* rsa_pub_encrypt */ NULL, /* rsa_pub_decrypt */ NULL, /* rsa_priv_encrypt */ NULL, /* rsa_priv_encrypt */ aep_rsa_mod_exp, /* rsa_mod_exp */ aep_mod_exp_mont, /* bn_mod_exp */ NULL, /* init */ NULL, /* finish */ 0, /* flags */ NULL, /* app_data */ NULL, /* rsa_sign */ NULL, /* rsa_verify */ NULL /* rsa_keygen */ }; # endif # ifndef OPENSSL_NO_DSA /* Our internal DSA_METHOD that we provide pointers to */ static DSA_METHOD aep_dsa = { "Aep DSA method", NULL, /* dsa_do_sign */ NULL, /* dsa_sign_setup */ NULL, /* dsa_do_verify */ aep_dsa_mod_exp, /* dsa_mod_exp */ aep_mod_exp_dsa, /* bn_mod_exp */ NULL, /* init */ NULL, /* finish */ 0, /* flags */ NULL, /* app_data */ NULL, /* dsa_paramgen */ NULL /* dsa_keygen */ }; # endif # ifndef OPENSSL_NO_DH /* Our internal DH_METHOD that we provide pointers to */ static DH_METHOD aep_dh = { "Aep DH method", NULL, NULL, aep_mod_exp_dh, NULL, NULL, 0, NULL, NULL }; # endif # ifdef AEPRAND /* our internal RAND_method that we provide pointers to */ static RAND_METHOD aep_random = { /* * "AEP RAND method", */ NULL, aep_rand, NULL, NULL, aep_rand, aep_rand_status, }; # endif /* * Define an array of structures to hold connections */ static AEP_CONNECTION_ENTRY aep_app_conn_table[MAX_PROCESS_CONNECTIONS]; /* * Used to determine if this is a new process */ static pid_t recorded_pid = 0; # ifdef AEPRAND static AEP_U8 rand_block[RAND_BLK_SIZE]; static AEP_U32 rand_block_bytes = 0; # endif /* Constants used when creating the ENGINE */ static const char *engine_aep_id = "aep"; static const char *engine_aep_name = "Aep hardware engine support"; static int max_key_len = 2176; /* * This internal function is used by ENGINE_aep() and possibly by the * "dynamic" ENGINE support too */ static int bind_aep(ENGINE *e) { # ifndef OPENSSL_NO_RSA const RSA_METHOD *meth1; # endif # ifndef OPENSSL_NO_DSA const DSA_METHOD *meth2; # endif # ifndef OPENSSL_NO_DH const DH_METHOD *meth3; # endif if (!ENGINE_set_id(e, engine_aep_id) || !ENGINE_set_name(e, engine_aep_name) || # ifndef OPENSSL_NO_RSA !ENGINE_set_RSA(e, &aep_rsa) || # endif # ifndef OPENSSL_NO_DSA !ENGINE_set_DSA(e, &aep_dsa) || # endif # ifndef OPENSSL_NO_DH !ENGINE_set_DH(e, &aep_dh) || # endif # ifdef AEPRAND !ENGINE_set_RAND(e, &aep_random) || # endif !ENGINE_set_init_function(e, aep_init) || !ENGINE_set_destroy_function(e, aep_destroy) || !ENGINE_set_finish_function(e, aep_finish) || !ENGINE_set_ctrl_function(e, aep_ctrl) || !ENGINE_set_cmd_defns(e, aep_cmd_defns)) return 0; # ifndef OPENSSL_NO_RSA /* * We know that the "PKCS1_SSLeay()" functions hook properly to the * aep-specific mod_exp and mod_exp_crt so we use those functions. NB: We * don't use ENGINE_openssl() or anything "more generic" because * something like the RSAref code may not hook properly, and if you own * one of these cards then you have the right to do RSA operations on it * anyway! */ meth1 = RSA_PKCS1_SSLeay(); aep_rsa.rsa_pub_enc = meth1->rsa_pub_enc; aep_rsa.rsa_pub_dec = meth1->rsa_pub_dec; aep_rsa.rsa_priv_enc = meth1->rsa_priv_enc; aep_rsa.rsa_priv_dec = meth1->rsa_priv_dec; # endif # ifndef OPENSSL_NO_DSA /* * Use the DSA_OpenSSL() method and just hook the mod_exp-ish bits. */ meth2 = DSA_OpenSSL(); aep_dsa.dsa_do_sign = meth2->dsa_do_sign; aep_dsa.dsa_sign_setup = meth2->dsa_sign_setup; aep_dsa.dsa_do_verify = meth2->dsa_do_verify; aep_dsa = *DSA_get_default_method(); aep_dsa.dsa_mod_exp = aep_dsa_mod_exp; aep_dsa.bn_mod_exp = aep_mod_exp_dsa; # endif # ifndef OPENSSL_NO_DH /* Much the same for Diffie-Hellman */ meth3 = DH_OpenSSL(); aep_dh.generate_key = meth3->generate_key; aep_dh.compute_key = meth3->compute_key; aep_dh.bn_mod_exp = meth3->bn_mod_exp; # endif /* Ensure the aep error handling is set up */ ERR_load_AEPHK_strings(); return 1; } # ifndef OPENSSL_NO_DYNAMIC_ENGINE static int bind_helper(ENGINE *e, const char *id) { if (id && (strcmp(id, engine_aep_id) != 0)) return 0; if (!bind_aep(e)) return 0; return 1; } IMPLEMENT_DYNAMIC_CHECK_FN() IMPLEMENT_DYNAMIC_BIND_FN(bind_helper) # else static ENGINE *engine_aep(void) { ENGINE *ret = ENGINE_new(); if (!ret) return NULL; if (!bind_aep(ret)) { ENGINE_free(ret); return NULL; } return ret; } void ENGINE_load_aep(void) { /* Copied from eng_[openssl|dyn].c */ ENGINE *toadd = engine_aep(); if (!toadd) return; ENGINE_add(toadd); ENGINE_free(toadd); ERR_clear_error(); } # endif /* * This is a process-global DSO handle used for loading and unloading the Aep * library. NB: This is only set (or unset) during an init() or finish() call * (reference counts permitting) and they're operating with global locks, so * this should be thread-safe implicitly. */ static DSO *aep_dso = NULL; /* * These are the static string constants for the DSO file name and the * function symbol names to bind to. */ static const char *AEP_LIBNAME = NULL; static const char *get_AEP_LIBNAME(void) { if (AEP_LIBNAME) return AEP_LIBNAME; return "aep"; } static void free_AEP_LIBNAME(void) { if (AEP_LIBNAME) OPENSSL_free((void *)AEP_LIBNAME); AEP_LIBNAME = NULL; } static long set_AEP_LIBNAME(const char *name) { free_AEP_LIBNAME(); return ((AEP_LIBNAME = BUF_strdup(name)) != NULL ? 1 : 0); } static const char *AEP_F1 = "AEP_ModExp"; static const char *AEP_F2 = "AEP_ModExpCrt"; # ifdef AEPRAND static const char *AEP_F3 = "AEP_GenRandom"; # endif static const char *AEP_F4 = "AEP_Finalize"; static const char *AEP_F5 = "AEP_Initialize"; static const char *AEP_F6 = "AEP_OpenConnection"; static const char *AEP_F7 = "AEP_SetBNCallBacks"; static const char *AEP_F8 = "AEP_CloseConnection"; /* * These are the function pointers that are (un)set when the library has * successfully (un)loaded. */ static t_AEP_OpenConnection *p_AEP_OpenConnection = NULL; static t_AEP_CloseConnection *p_AEP_CloseConnection = NULL; static t_AEP_ModExp *p_AEP_ModExp = NULL; static t_AEP_ModExpCrt *p_AEP_ModExpCrt = NULL; # ifdef AEPRAND static t_AEP_GenRandom *p_AEP_GenRandom = NULL; # endif static t_AEP_Initialize *p_AEP_Initialize = NULL; static t_AEP_Finalize *p_AEP_Finalize = NULL; static t_AEP_SetBNCallBacks *p_AEP_SetBNCallBacks = NULL; /* (de)initialisation functions. */ static int aep_init(ENGINE *e) { t_AEP_ModExp *p1; t_AEP_ModExpCrt *p2; # ifdef AEPRAND t_AEP_GenRandom *p3; # endif t_AEP_Finalize *p4; t_AEP_Initialize *p5; t_AEP_OpenConnection *p6; t_AEP_SetBNCallBacks *p7; t_AEP_CloseConnection *p8; int to_return = 0; if (aep_dso != NULL) { AEPHKerr(AEPHK_F_AEP_INIT, AEPHK_R_ALREADY_LOADED); goto err; } /* Attempt to load libaep.so. */ aep_dso = DSO_load(NULL, get_AEP_LIBNAME(), NULL, 0); if (aep_dso == NULL) { AEPHKerr(AEPHK_F_AEP_INIT, AEPHK_R_NOT_LOADED); goto err; } if (!(p1 = (t_AEP_ModExp *) DSO_bind_func(aep_dso, AEP_F1)) || !(p2 = (t_AEP_ModExpCrt *) DSO_bind_func(aep_dso, AEP_F2)) || # ifdef AEPRAND !(p3 = (t_AEP_GenRandom *) DSO_bind_func(aep_dso, AEP_F3)) || # endif !(p4 = (t_AEP_Finalize *) DSO_bind_func(aep_dso, AEP_F4)) || !(p5 = (t_AEP_Initialize *) DSO_bind_func(aep_dso, AEP_F5)) || !(p6 = (t_AEP_OpenConnection *) DSO_bind_func(aep_dso, AEP_F6)) || !(p7 = (t_AEP_SetBNCallBacks *) DSO_bind_func(aep_dso, AEP_F7)) || !(p8 = (t_AEP_CloseConnection *) DSO_bind_func(aep_dso, AEP_F8))) { AEPHKerr(AEPHK_F_AEP_INIT, AEPHK_R_NOT_LOADED); goto err; } /* Copy the pointers */ p_AEP_ModExp = p1; p_AEP_ModExpCrt = p2; # ifdef AEPRAND p_AEP_GenRandom = p3; # endif p_AEP_Finalize = p4; p_AEP_Initialize = p5; p_AEP_OpenConnection = p6; p_AEP_SetBNCallBacks = p7; p_AEP_CloseConnection = p8; to_return = 1; return to_return; err: if (aep_dso) DSO_free(aep_dso); aep_dso = NULL; p_AEP_OpenConnection = NULL; p_AEP_ModExp = NULL; p_AEP_ModExpCrt = NULL; # ifdef AEPRAND p_AEP_GenRandom = NULL; # endif p_AEP_Initialize = NULL; p_AEP_Finalize = NULL; p_AEP_SetBNCallBacks = NULL; p_AEP_CloseConnection = NULL; return to_return; } /* Destructor (complements the "ENGINE_aep()" constructor) */ static int aep_destroy(ENGINE *e) { free_AEP_LIBNAME(); ERR_unload_AEPHK_strings(); return 1; } static int aep_finish(ENGINE *e) { int to_return = 0, in_use; AEP_RV rv; if (aep_dso == NULL) { AEPHKerr(AEPHK_F_AEP_FINISH, AEPHK_R_NOT_LOADED); goto err; } rv = aep_close_all_connections(0, &in_use); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_FINISH, AEPHK_R_CLOSE_HANDLES_FAILED); goto err; } if (in_use) { AEPHKerr(AEPHK_F_AEP_FINISH, AEPHK_R_CONNECTIONS_IN_USE); goto err; } rv = p_AEP_Finalize(); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_FINISH, AEPHK_R_FINALIZE_FAILED); goto err; } if (!DSO_free(aep_dso)) { AEPHKerr(AEPHK_F_AEP_FINISH, AEPHK_R_UNIT_FAILURE); goto err; } aep_dso = NULL; p_AEP_CloseConnection = NULL; p_AEP_OpenConnection = NULL; p_AEP_ModExp = NULL; p_AEP_ModExpCrt = NULL; # ifdef AEPRAND p_AEP_GenRandom = NULL; # endif p_AEP_Initialize = NULL; p_AEP_Finalize = NULL; p_AEP_SetBNCallBacks = NULL; to_return = 1; err: return to_return; } static int aep_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)) { int initialised = ((aep_dso == NULL) ? 0 : 1); switch (cmd) { case AEP_CMD_SO_PATH: if (p == NULL) { AEPHKerr(AEPHK_F_AEP_CTRL, ERR_R_PASSED_NULL_PARAMETER); return 0; } if (initialised) { AEPHKerr(AEPHK_F_AEP_CTRL, AEPHK_R_ALREADY_LOADED); return 0; } return set_AEP_LIBNAME((const char *)p); default: break; } AEPHKerr(AEPHK_F_AEP_CTRL, AEPHK_R_CTRL_COMMAND_NOT_IMPLEMENTED); return 0; } static int aep_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx) { int to_return = 0; int r_len = 0; AEP_CONNECTION_HNDL hConnection; AEP_RV rv; r_len = BN_num_bits(m); /* Perform in software if modulus is too large for hardware. */ if (r_len > max_key_len) { AEPHKerr(AEPHK_F_AEP_MOD_EXP, AEPHK_R_SIZE_TOO_LARGE_OR_TOO_SMALL); return BN_mod_exp(r, a, p, m, ctx); } /* * Grab a connection from the pool */ rv = aep_get_connection(&hConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_MOD_EXP, AEPHK_R_GET_HANDLE_FAILED); return BN_mod_exp(r, a, p, m, ctx); } /* * To the card with the mod exp */ rv = p_AEP_ModExp(hConnection, (void *)a, (void *)p, (void *)m, (void *)r, NULL); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_MOD_EXP, AEPHK_R_MOD_EXP_FAILED); rv = aep_close_connection(hConnection); return BN_mod_exp(r, a, p, m, ctx); } /* * Return the connection to the pool */ rv = aep_return_connection(hConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_MOD_EXP, AEPHK_R_RETURN_CONNECTION_FAILED); goto err; } to_return = 1; err: return to_return; } # ifndef OPENSSL_NO_RSA static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx) { AEP_RV rv = AEP_R_OK; AEP_CONNECTION_HNDL hConnection; /* * Grab a connection from the pool */ rv = aep_get_connection(&hConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_MOD_EXP_CRT, AEPHK_R_GET_HANDLE_FAILED); return FAIL_TO_SW; } /* * To the card with the mod exp */ rv = p_AEP_ModExpCrt(hConnection, (void *)a, (void *)p, (void *)q, (void *)dmp1, (void *)dmq1, (void *)iqmp, (void *)r, NULL); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_MOD_EXP_CRT, AEPHK_R_MOD_EXP_CRT_FAILED); rv = aep_close_connection(hConnection); return FAIL_TO_SW; } /* * Return the connection to the pool */ rv = aep_return_connection(hConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_MOD_EXP_CRT, AEPHK_R_RETURN_CONNECTION_FAILED); goto err; } err: return rv; } # endif # ifdef AEPRAND static int aep_rand(unsigned char *buf, int len) { AEP_RV rv = AEP_R_OK; AEP_CONNECTION_HNDL hConnection; CRYPTO_w_lock(CRYPTO_LOCK_RAND); /* * Can the request be serviced with what's already in the buffer? */ if (len <= rand_block_bytes) { memcpy(buf, &rand_block[RAND_BLK_SIZE - rand_block_bytes], len); rand_block_bytes -= len; CRYPTO_w_unlock(CRYPTO_LOCK_RAND); } else /* * If not the get another block of random bytes */ { CRYPTO_w_unlock(CRYPTO_LOCK_RAND); rv = aep_get_connection(&hConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_RAND, AEPHK_R_GET_HANDLE_FAILED); goto err_nounlock; } if (len > RAND_BLK_SIZE) { rv = p_AEP_GenRandom(hConnection, len, 2, buf, NULL); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_RAND, AEPHK_R_GET_RANDOM_FAILED); goto err_nounlock; } } else { CRYPTO_w_lock(CRYPTO_LOCK_RAND); rv = p_AEP_GenRandom(hConnection, RAND_BLK_SIZE, 2, &rand_block[0], NULL); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_RAND, AEPHK_R_GET_RANDOM_FAILED); goto err; } rand_block_bytes = RAND_BLK_SIZE; memcpy(buf, &rand_block[RAND_BLK_SIZE - rand_block_bytes], len); rand_block_bytes -= len; CRYPTO_w_unlock(CRYPTO_LOCK_RAND); } rv = aep_return_connection(hConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_RAND, AEPHK_R_RETURN_CONNECTION_FAILED); goto err_nounlock; } } return 1; err: CRYPTO_w_unlock(CRYPTO_LOCK_RAND); err_nounlock: return 0; } static int aep_rand_status(void) { return 1; } # endif # ifndef OPENSSL_NO_RSA static int aep_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) { int to_return = 0; AEP_RV rv = AEP_R_OK; if (!aep_dso) { AEPHKerr(AEPHK_F_AEP_RSA_MOD_EXP, AEPHK_R_NOT_LOADED); goto err; } /* * See if we have all the necessary bits for a crt */ if (rsa->q && rsa->dmp1 && rsa->dmq1 && rsa->iqmp) { rv = aep_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1, rsa->dmq1, rsa->iqmp, ctx); if (rv == FAIL_TO_SW) { const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); to_return = (*meth->rsa_mod_exp) (r0, I, rsa, ctx); goto err; } else if (rv != AEP_R_OK) goto err; } else { if (!rsa->d || !rsa->n) { AEPHKerr(AEPHK_F_AEP_RSA_MOD_EXP, AEPHK_R_MISSING_KEY_COMPONENTS); goto err; } rv = aep_mod_exp(r0, I, rsa->d, rsa->n, ctx); if (rv != AEP_R_OK) goto err; } to_return = 1; err: return to_return; } # endif # ifndef OPENSSL_NO_DSA static int aep_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) { BIGNUM t; int to_return = 0; BN_init(&t); /* let rr = a1 ^ p1 mod m */ if (!aep_mod_exp(rr, a1, p1, m, ctx)) goto end; /* let t = a2 ^ p2 mod m */ if (!aep_mod_exp(&t, a2, p2, m, ctx)) goto end; /* let rr = rr * t mod m */ if (!BN_mod_mul(rr, rr, &t, m, ctx)) goto end; to_return = 1; end: BN_free(&t); return to_return; } static int aep_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) { return aep_mod_exp(r, a, p, m, ctx); } # endif # ifndef OPENSSL_NO_RSA /* This function is aliased to mod_exp (with the mont stuff dropped). */ static int aep_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) { return aep_mod_exp(r, a, p, m, ctx); } # endif # ifndef OPENSSL_NO_DH /* This function is aliased to mod_exp (with the dh and mont dropped). */ static int aep_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) { return aep_mod_exp(r, a, p, m, ctx); } # endif static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection) { int count; AEP_RV rv = AEP_R_OK; /* * Get the current process id */ pid_t curr_pid; CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); # ifdef NETWARE_CLIB curr_pid = GetThreadID(); # elif defined(_WIN32) curr_pid = _getpid(); # else curr_pid = getpid(); # endif /* * Check if this is the first time this is being called from the current * process */ if (recorded_pid != curr_pid) { /* * Remember our pid so we can check if we're in a new process */ recorded_pid = curr_pid; /* * Call Finalize to make sure we have not inherited some data from a * parent process */ p_AEP_Finalize(); /* * Initialise the AEP API */ rv = p_AEP_Initialize(NULL); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_GET_CONNECTION, AEPHK_R_INIT_FAILURE); recorded_pid = 0; goto end; } /* * Set the AEP big num call back functions */ rv = p_AEP_SetBNCallBacks(&GetBigNumSize, &MakeAEPBigNum, &ConvertAEPBigNum); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_GET_CONNECTION, AEPHK_R_SETBNCALLBACK_FAILURE); recorded_pid = 0; goto end; } # ifdef AEPRAND /* * Reset the rand byte count */ rand_block_bytes = 0; # endif /* * Init the structures */ for (count = 0; count < MAX_PROCESS_CONNECTIONS; count++) { aep_app_conn_table[count].conn_state = NotConnected; aep_app_conn_table[count].conn_hndl = 0; } /* * Open a connection */ rv = p_AEP_OpenConnection(phConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_GET_CONNECTION, AEPHK_R_UNIT_FAILURE); recorded_pid = 0; goto end; } aep_app_conn_table[0].conn_state = InUse; aep_app_conn_table[0].conn_hndl = *phConnection; goto end; } /* * Check the existing connections to see if we can find a free one */ for (count = 0; count < MAX_PROCESS_CONNECTIONS; count++) { if (aep_app_conn_table[count].conn_state == Connected) { aep_app_conn_table[count].conn_state = InUse; *phConnection = aep_app_conn_table[count].conn_hndl; goto end; } } /* * If no connections available, we're going to have to try to open a new * one */ for (count = 0; count < MAX_PROCESS_CONNECTIONS; count++) { if (aep_app_conn_table[count].conn_state == NotConnected) { /* * Open a connection */ rv = p_AEP_OpenConnection(phConnection); if (rv != AEP_R_OK) { AEPHKerr(AEPHK_F_AEP_GET_CONNECTION, AEPHK_R_UNIT_FAILURE); goto end; } aep_app_conn_table[count].conn_state = InUse; aep_app_conn_table[count].conn_hndl = *phConnection; goto end; } } rv = AEP_R_GENERAL_ERROR; end: CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); return rv; } static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection) { int count; CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); /* * Find the connection item that matches this connection handle */ for (count = 0; count < MAX_PROCESS_CONNECTIONS; count++) { if (aep_app_conn_table[count].conn_hndl == hConnection) { aep_app_conn_table[count].conn_state = Connected; break; } } CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); return AEP_R_OK; } static AEP_RV aep_close_connection(AEP_CONNECTION_HNDL hConnection) { int count; AEP_RV rv = AEP_R_OK; CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); /* * Find the connection item that matches this connection handle */ for (count = 0; count < MAX_PROCESS_CONNECTIONS; count++) { if (aep_app_conn_table[count].conn_hndl == hConnection) { rv = p_AEP_CloseConnection(aep_app_conn_table[count].conn_hndl); if (rv != AEP_R_OK) goto end; aep_app_conn_table[count].conn_state = NotConnected; aep_app_conn_table[count].conn_hndl = 0; break; } } end: CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); return rv; } static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use) { int count; AEP_RV rv = AEP_R_OK; *in_use = 0; if (use_engine_lock) CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); for (count = 0; count < MAX_PROCESS_CONNECTIONS; count++) { switch (aep_app_conn_table[count].conn_state) { case Connected: rv = p_AEP_CloseConnection(aep_app_conn_table[count].conn_hndl); if (rv != AEP_R_OK) goto end; aep_app_conn_table[count].conn_state = NotConnected; aep_app_conn_table[count].conn_hndl = 0; break; case InUse: (*in_use)++; break; case NotConnected: break; } } end: if (use_engine_lock) CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); return rv; } /* * BigNum call back functions, used to convert OpenSSL bignums into AEP * bignums. Note only 32bit Openssl build support */ static AEP_RV GetBigNumSize(AEP_VOID_PTR ArbBigNum, AEP_U32 *BigNumSize) { BIGNUM *bn; /* * Cast the ArbBigNum pointer to our BIGNUM struct */ bn = (BIGNUM *)ArbBigNum; # ifdef SIXTY_FOUR_BIT_LONG *BigNumSize = bn->top << 3; # else /* * Size of the bignum in bytes is equal to the bn->top (no of 32 bit * words) multiplies by 4 */ *BigNumSize = bn->top << 2; # endif return AEP_R_OK; } static AEP_RV MakeAEPBigNum(AEP_VOID_PTR ArbBigNum, AEP_U32 BigNumSize, unsigned char *AEP_BigNum) { BIGNUM *bn; # ifndef SIXTY_FOUR_BIT_LONG unsigned char *buf; int i; # endif /* * Cast the ArbBigNum pointer to our BIGNUM struct */ bn = (BIGNUM *)ArbBigNum; # ifdef SIXTY_FOUR_BIT_LONG memcpy(AEP_BigNum, bn->d, BigNumSize); # else /* * Must copy data into a (monotone) least significant byte first format * performing endian conversion if necessary */ for (i = 0; i < bn->top; i++) { buf = (unsigned char *)&bn->d[i]; *((AEP_U32 *)AEP_BigNum) = (AEP_U32) ((unsigned)buf[1] << 8 | buf[0]) | ((unsigned)buf[3] << 8 | buf[2]) << 16; AEP_BigNum += 4; } # endif return AEP_R_OK; } /* * Turn an AEP Big Num back to a user big num */ static AEP_RV ConvertAEPBigNum(void *ArbBigNum, AEP_U32 BigNumSize, unsigned char *AEP_BigNum) { BIGNUM *bn; # ifndef SIXTY_FOUR_BIT_LONG int i; # endif bn = (BIGNUM *)ArbBigNum; /* * Expand the result bn so that it can hold our big num. Size is in bits */ bn_expand(bn, (int)(BigNumSize << 3)); # ifdef SIXTY_FOUR_BIT_LONG bn->top = BigNumSize >> 3; if ((BigNumSize & 7) != 0) bn->top++; memset(bn->d, 0, bn->top << 3); memcpy(bn->d, AEP_BigNum, BigNumSize); # else bn->top = BigNumSize >> 2; for (i = 0; i < bn->top; i++) { bn->d[i] = (AEP_U32) ((unsigned)AEP_BigNum[3] << 8 | AEP_BigNum[2]) << 16 | ((unsigned)AEP_BigNum[1] << 8 | AEP_BigNum[0]); AEP_BigNum += 4; } # endif return AEP_R_OK; } # endif /* !OPENSSL_NO_HW_AEP */ #endif /* !OPENSSL_NO_HW */
GaloisInc/hacrypto
src/C/openssl/openssl-0.9.8zh/engines/e_aep.c
C
bsd-3-clause
32,491
<!DOCTYPE html> <html class="ui-mobile-rendering"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery Mobile Docs - Slider</title> <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css" /> <link rel="stylesheet" href="../../_assets/css/jqm-docs.css"/> <script src="../../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script> <script data-main="../../../js/jquery.mobile.docs" src="../../../external/requirejs/require.js"></script> <script src="../../../js/jquery.js"></script> </head> <body> <div data-role="page" class="type-interior"> <div data-role="header" data-theme="f"> <h1>Slider</h1> <a href="../../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a> </div><!-- /header --> <div data-role="content"> <div class="content-primary"> <form action="#" method="get"> <h2>Slider</h2> <ul data-role="controlgroup" data-type="horizontal" class="localnav"> <li><a href="index.html" data-role="button" data-transition="fade" class="ui-btn-active">Basics</a></li> <li><a href="options.html" data-role="button" data-transition="fade">Options</a></li> <li><a href="methods.html" data-role="button" data-transition="fade">Methods</a></li> <li><a href="events.html" data-role="button" data-transition="fade">Events</a></li> </ul> <p>To add a slider widget to your page, use a standard <code>input</code> with the <code>type="range"</code> attribute. The input's <code>value</code> is used to configure the starting position of the handle and the value is populated in the text input. Specify <code>min</code> and <code>max</code> attribute values to set the slider's range. If you want to constrain input to specific increments, add the <code>step</code> attribute. Set the <code>value</code> attribute to define the initial value. The framework will parse these attributes to configure the slider widget. View the <a href="../../api/data-attributes.html">data- attribute reference</a> to see all the possible attributes you can add to sliders.</p> <p>As you drag the slider's handle, the framework will update the native input's value (and vice-versa) so they are always in sync; this ensures that the value is submitted with the form.</p> <p>Set the <code>for</code> attribute of the <code>label</code> to match the ID of the <code>input</code> so they are semantically associated. It's possible to <a href="../docs-forms.html">accessibly hide the label</a> if it's not desired in the page layout, but we require that it is present in the markup for semantic and accessibility reasons.</p> <p>The framework will find all <code>input</code> elements with a <code>type="range"</code> and automatically enhance them into a slider with an accompanying input, no need to apply a <code>data-role</code> attribute. To prevent the automatic enhancement of this input into a slider, add <code>data-role="none"</code> attribute to the <code>input</code> and wrap them in a <code>div</code> with the <code> data-role="fieldcontain"</code> attribute to group them. In this example, the acceptable range is 0-100. </p> <pre><code> &lt;label for=&quot;slider-0&quot;&gt;Input slider:&lt;/label&gt; &lt;input type=&quot;range&quot; name=&quot;slider&quot; id=&quot;slider-0&quot; value=&quot;60&quot; min=&quot;0&quot; max=&quot;100&quot; /&gt; </code></pre> <p>The default slider with these settings is displayed like this:</p> <label for="slider-0">Input slider:</label> <input type="range" name="slider-1" id="slider-0" value="60" min="0" max="100" /> <h2>Step increment</h2> <p>To force the slider to snap to a specific increment, add the HTML5 <code>step</code> attribute to the input. By default, the step is 1, but in this example, the step is 50 and the max value is 500./p> <pre><code> &lt;label for=&quot;slider-step&quot;&gt;Input slider:&lt;/label&gt; &lt;input type=&quot;range&quot; name=&quot;slider&quot; id=&quot;slider-step&quot; value=&quot;150&quot; min=&quot;0&quot; max=&quot;500&quot; <strong>step=&quot;50&quot;</strong> /&gt; </code></pre> <p>This will produce an input that snaps to increments of 10. If the a value is added to the input that isn't valid with the step increment, the value will be reset on blur to the closest step.</p> <label for="slider-step">Input slider:</label> <input type="range" name="slider-1" id="slider-step" value="150" min="0" max="500" step="50" /> <h2>Fill highlight</h2> <p>To have a highlight fill on the track up to the slider handle position, add the <code>data-highlight="true"</code> attribute to the input. The fill uses active state swatch. </p> <pre><code> &lt;label for=&quot;slider-fill&quot;&gt;Input slider:&lt;/label&gt; &lt;input type=&quot;range&quot; name=&quot;slider&quot; id=&quot;slider-fill&quot; value=&quot;60&quot; min=&quot;0&quot; max=&quot;100&quot; <strong>data-highlight=&quot;true&quot;</strong> /&gt; </code></pre> <p>This will produce an input that a not as tall as the standard version and has a smaller text size.</p> <label for="slider-min">Input slider:</label> <input type="range" name="slider-1" id="slider-min" value="60" min="0" max="100" data-highlight="true" /> <h2>Mini version</h2> <p>For a more compact version that is useful in toolbars and tight spaces, add the <code>data-mini="true"</code> attribute to the element to create a <a href="../forms-all-mini.html">mini version</a>. </p> <pre><code> &lt;label for=&quot;slider-0&quot;&gt;Input slider:&lt;/label&gt; &lt;input type=&quot;range&quot; name=&quot;slider&quot; id=&quot;slider-0&quot; value=&quot;25&quot; min=&quot;0&quot; max=&quot;100&quot; data-highlight=&quot;true&quot; <strong>data-mini=&quot;true&quot;</strong> /&gt; </code></pre> <p>This will produce an input that a not as tall as the standard version and has a smaller text size.</p> <label for="slider-min">Input slider:</label> <input type="range" name="slider-1" id="slider-min" value="25" min="0" max="100" data-highlight="true" data-mini="true" /> <h2>Field containers</h2> <p>Optionally wrap the slider markup in a container with the <code>data-role="fieldcontain"</code> attribute to help visually group it in a longer form. In this example, the <code>step</code> attribute is omitted to allow any whole number value to be selected.</p> <pre><code> <strong>&lt;div data-role=&quot;fieldcontain&quot;&gt; </strong> &lt;label for=&quot;slider&quot;&gt;Input slider:&lt;/label&gt; &lt;input type=&quot;range&quot; name=&quot;slider&quot; id=&quot;slider&quot; value=&quot;25&quot; min=&quot;0&quot; max=&quot;100&quot; /&gt; <strong>&lt;/div&gt; </strong></code></pre> <p>The slider is now displayed like this:</p> <div data-role="fieldcontain"> <label for="slider-1">Input slider:</label> <input type="range" name="slider-1" id="slider-1" value="25" min="0" max="100" /> </div> <p>Sliders also respond to key commands. Right Arrow, Up Arrow and Page Up keys increase the value; Left Arrow, Down Arrow and Page Down keys decrease it. To move the slider to its minimum or maximum value, use the Home or End key, respectively.</p> <h2>Calling the slider plugin</h2> <p>This plugin will auto initialize on any page that contains a text <code>input</code> with the <code>type="range"</code> attribute. However, if needed you can directly call the <code>slider</code> plugin on any selector, just like any jQuery plugin:</p> <pre><code> $('input').slider(); </code></pre> <h2>Theming the slider</h2> <p>To set the theme swatch for the slider, add a <code>data-theme</code> attribute to the <code>input</code> which will apply the theme to both the input, handle and track. The track swatch can be set separately by adding the <code>data-track-theme</code> attribute to apply the down state version of the selected button swatch.</p> <pre><code> &lt;div data-role=&quot;fieldcontain&quot;&gt; &lt;label for=&quot;slider-2&quot;&gt;Input slider:&lt;/label&gt; &lt;input type=&quot;range&quot; name=&quot;slider-2&quot; id=&quot;slider-2&quot; value=&quot;25&quot; min=&quot;0&quot; max=&quot;100&quot; <strong>data-theme=&quot;a&quot; data-track-theme=&quot;b&quot;</strong> /&gt; &lt;/div&gt; </code></pre> <p>This will produce a themed slider:</p> <div data-role="fieldcontain"> <label for="slider-2">Input slider:</label> <input type="range" name="slider-2" id="slider-2" value="25" min="0" max="100" data-theme="a" data-track-theme="b" /> </div> </form> </div><!--/content-primary --> <div class="content-secondary"> <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d"> <h3>More in this section</h3> <ul data-role="listview" data-theme="c" data-dividertheme="d"> <li data-role="list-divider">Form elements</li> <li><a href="../docs-forms.html">Form basics</a></li> <li><a href="../forms-all.html">Form element gallery</a></li> <li><a href="../forms-all-mini.html">Mini form element gallery</a></li> <li><a href="../textinputs/index.html">Text inputs</a></li> <li><a href="../search/">Search input</a></li> <li data-theme="a"><a href="index.html">Slider</a></li> <li><a href="../switch/">Flip toggle switch</a></li> <li><a href="../radiobuttons/">Radio buttons</a></li> <li><a href="../checkboxes/">Checkboxes</a></li> <li><a href="../selects/">Select menus</a></li> <li><a href="../forms-themes.html">Theming forms</a></li> <li><a href="../forms-all-native.html">Native form elements</a></li> <li><a href="../forms-sample.html">Submitting forms</a></li> </ul> </div> </div> </div><!-- /content --> <div data-role="footer" class="footer-docs" data-theme="c"> <p>&copy; 2011 The jQuery Project</p> </div> </div><!-- /page --> </body> </html>
madeinnordeste/open-rsvp
static/plugin/jquery-mobile/docs/forms/slider/index.html
HTML
bsd-3-clause
10,015
<?php /** * Base node-class * * The node class implements the method used by both the File and the Directory classes * * @package Sabre * @subpackage DAV * @copyright Copyright (C) 2007-2010 Rooftop Solutions. All rights reserved. * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ abstract class Sabre_DAV_FSExt_Node extends Sabre_DAV_FS_Node implements Sabre_DAV_ILockable, Sabre_DAV_IProperties { /** * Returns all the locks on this node * * @return array */ function getLocks() { $resourceData = $this->getResourceData(); $locks = $resourceData['locks']; foreach($locks as $k=>$lock) { if (time() > $lock->timeout + $lock->created) unset($locks[$k]); } return $locks; } /** * Locks this node * * @param Sabre_DAV_Locks_LockInfo $lockInfo * @return void */ function lock(Sabre_DAV_Locks_LockInfo $lockInfo) { // We're making the lock timeout 30 minutes $lockInfo->timeout = 1800; $lockInfo->created = time(); $resourceData = $this->getResourceData(); if (!isset($resourceData['locks'])) $resourceData['locks'] = array(); $current = null; foreach($resourceData['locks'] as $k=>$lock) { if ($lock->token === $lockInfo->token) $current = $k; } if (!is_null($current)) $resourceData['locks'][$current] = $lockInfo; else $resourceData['locks'][] = $lockInfo; $this->putResourceData($resourceData); } /** * Removes a lock from this node * * @param Sabre_DAV_Locks_LockInfo $lockInfo * @return bool */ function unlock(Sabre_DAV_Locks_LockInfo $lockInfo) { //throw new Sabre_DAV_Exception('bla'); $resourceData = $this->getResourceData(); foreach($resourceData['locks'] as $k=>$lock) { if ($lock->token === $lockInfo->token) { unset($resourceData['locks'][$k]); $this->putResourceData($resourceData); return true; } } return false; } /** * Updates properties on this node, * * @param array $mutations * @see Sabre_DAV_IProperties::updateProperties * @return bool|array */ public function updateProperties($properties) { $resourceData = $this->getResourceData(); $result = array(); foreach($properties as $propertyName=>$propertyValue) { // If it was null, we need to delete the property if (is_null($propertyValue)) { if (isset($resourceData['properties'][$propertyName])) { unset($resourceData['properties'][$propertyName]); } } else { $resourceData['properties'][$propertyName] = $propertyValue; } } $this->putResourceData($resourceData); return true; } /** * Returns a list of properties for this nodes.; * * The properties list is a list of propertynames the client requested, encoded as xmlnamespace#tagName, for example: http://www.example.org/namespace#author * If the array is empty, all properties should be returned * * @param array $properties * @return void */ function getProperties($properties) { $resourceData = $this->getResourceData(); // if the array was empty, we need to return everything if (!$properties) return $resourceData['properties']; $props = array(); foreach($properties as $property) { if (isset($resourceData['properties'][$property])) $props[$property] = $resourceData['properties'][$property]; } return $props; } /** * Returns the path to the resource file * * @return string */ protected function getResourceInfoPath() { list($parentDir) = Sabre_DAV_URLUtil::splitPath($this->path); return $parentDir . '/.sabredav'; } /** * Returns all the stored resource information * * @return array */ protected function getResourceData() { $path = $this->getResourceInfoPath(); if (!file_exists($path)) return array('locks'=>array(), 'properties' => array()); // opening up the file, and creating a shared lock $handle = fopen($path,'r'); flock($handle,LOCK_SH); $data = ''; // Reading data until the eof while(!feof($handle)) { $data.=fread($handle,8192); } // We're all good fclose($handle); // Unserializing and checking if the resource file contains data for this file $data = unserialize($data); if (!isset($data[$this->getName()])) { return array('locks'=>array(), 'properties' => array()); } $data = $data[$this->getName()]; if (!isset($data['locks'])) $data['locks'] = array(); if (!isset($data['properties'])) $data['properties'] = array(); return $data; } /** * Updates the resource information * * @param array $newData * @return void */ protected function putResourceData(array $newData) { $path = $this->getResourceInfoPath(); // opening up the file, and creating a shared lock $handle = fopen($path,'a+'); flock($handle,LOCK_EX); $data = ''; rewind($handle); // Reading data until the eof while(!feof($handle)) { $data.=fread($handle,8192); } // Unserializing and checking if the resource file contains data for this file $data = unserialize($data); $data[$this->getName()] = $newData; ftruncate($handle,0); rewind($handle); fwrite($handle,serialize($data)); fclose($handle); } /** * Renames the node * * @param string $name The new name * @return void */ public function setName($name) { list($parentPath, ) = Sabre_DAV_URLUtil::splitPath($this->path); list(, $newName) = Sabre_DAV_URLUtil::splitPath($name); $newPath = $parentPath . '/' . $newName; // We're deleting the existing resourcedata, and recreating it // for the new path. $resourceData = $this->getResourceData(); $this->deleteResourceData(); rename($this->path,$newPath); $this->path = $newPath; $this->putResourceData($resourceData); } public function deleteResourceData() { // When we're deleting this node, we also need to delete any resource information $path = $this->getResourceInfoPath(); if (!file_exists($path)) return true; // opening up the file, and creating a shared lock $handle = fopen($path,'a+'); flock($handle,LOCK_EX); $data = ''; rewind($handle); // Reading data until the eof while(!feof($handle)) { $data.=fread($handle,8192); } // Unserializing and checking if the resource file contains data for this file $data = unserialize($data); if (isset($data[$this->getName()])) unset($data[$this->getName()]); ftruncate($handle,0); rewind($handle); fwrite($handle,serialize($data)); fclose($handle); } public function delete() { return $this->deleteResourceData(); } }
jtietema/Fizzy
library/Sabre/DAV/FSExt/Node.php
PHP
bsd-3-clause
7,616
subroutine DHaj(n, aj, extend, exitstatus) !------------------------------------------------------------------------------ ! ! This subroutine will compute the weights a_j that are used to ! expand an equally sampled grid into spherical harmonics by using ! the sampling theorem presented in Driscoll and Healy (1994). ! ! Note that the number of samples, n, must be even! Also, a_j(1) = 0 ! ! Calling parameters ! ! IN ! n Number of samples in longitude and latitude. ! ! IN, optional ! extend If 1, include the latitudinal band for 90 S, which ! increases the dimension of aj by 1. ! ! OUT, optional ! aj Vector of length n or n+1 containing the weights. ! ! Copyright (c) 2005-2019, SHTOOLS ! All rights reserved. ! !------------------------------------------------------------------------------ use ftypes implicit none integer(int32), intent(in) :: n real(dp), intent(out) :: aj(:) integer(int32), intent(in), optional :: extend integer(int32), intent(out), optional :: exitstatus integer(int32) :: j, l, n_out, extend_grid real(dp) :: sum1, pi if (present(exitstatus)) exitstatus = 0 pi = acos(-1.0_dp) if (mod(n,2) /= 0) then print*, "Error --- DH_aj" print*, "The number of samples in the equi-dimensional grid must " // & "be even for use with SHExpandDH" print*, "Input value of N is ", n if (present(exitstatus)) then exitstatus = 2 return else stop end if end if if (present(extend)) then if (extend == 0) then extend_grid = 0 n_out = n else if (extend == 1) then extend_grid = 1 n_out = n + 1 else print*, "Error --- DHaj" print*, "Optional parameter EXTEND must be 0 or 1." print*, "Input value is ", extend if (present(exitstatus)) then exitstatus = 2 return else stop end if end if else extend_grid = 0 n_out = n end if if (size(aj) < n_out) then print*, "Error --- DH_aj" print*, "The size of AJ must be greater than or equal " // & "to ", n_out print*, "Input array is dimensioned as ", size(aj) if (present(exitstatus)) then exitstatus = 1 return else stop end if end if do j = 0, n-1 sum1 = 0.0_dp do l = 0, n/2 -1 sum1 = sum1 + sin( dble(2*l+1) * pi * dble(j) / dble(n) ) & / dble(2*l+1) end do aj(j+1) = sum1 * sin(pi * dble(j) / dble(n)) * sqrt(8.0_dp) / dble(n) end do if (extend_grid == 1) then aj(n_out) = 0.0_dp end if end subroutine DHaj
SHTOOLS/SHTOOLS
src/DHaj.f95
FORTRAN
bsd-3-clause
2,950
/* * Copyright 2009, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "core/cross/client.h" #include "import/cross/targz_processor.h" #include "tests/common/win/testing_common.h" #include "tests/common/cross/test_utils.h" namespace o3d { class TarProcessorTest : public testing::Test { }; // We verify that the tar file contains exactly these filenames static const char *kFilename1 = "test/file1"; static const char *kFilename2 = "test/file2"; static const char *kFilename3 = "test/file3"; // With each file having these exact contents #define kFileContents1 "the cat in the hat\n" #define kFileContents2 "abracadabra\n" #define kFileContents3 "I think therefore I am\n" // we should receive these (and exactly these bytes in this order) static const char *kConcatenatedContents = kFileContents1 kFileContents2 kFileContents3; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class TarTestClient : public ArchiveCallbackClient { public: explicit TarTestClient() : file_count_(0), index_(0) {} // ArchiveCallbackClient methods virtual void ReceiveFileHeader(const ArchiveFileInfo &file_info); virtual bool ReceiveFileData(MemoryReadStream *stream, size_t nbytes); int GetFileCount() const { return file_count_; } size_t GetNumTotalBytesReceived() const { return index_; } private: int file_count_; int index_; }; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void TarTestClient::ReceiveFileHeader(const ArchiveFileInfo &file_info) { // We get called one time for each file in the archive // Check that the filenames match our expectation switch (file_count_) { case 0: EXPECT_TRUE(!strcmp(kFilename1, file_info.GetFileName().c_str())); break; case 1: EXPECT_TRUE(!strcmp(kFilename2, file_info.GetFileName().c_str())); break; case 2: EXPECT_TRUE(!strcmp(kFilename3, file_info.GetFileName().c_str())); break; } file_count_++; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bool TarTestClient::ReceiveFileData(MemoryReadStream *stream, size_t nbytes) { const char *p = reinterpret_cast<const char*>( stream->GetDirectMemoryPointer()); // Note: ReceiveFileData() may be called multiple times for each file, until // the complete file contents have been given... // We're receiving three file, one after the other // The bytes we receive are the concatenated contents of the three files // (with calls to ReceiveFileHeader() separating each one) // EXPECT_TRUE(index_ + nbytes <= strlen(kConcatenatedContents)); EXPECT_TRUE(!strncmp(kConcatenatedContents + index_, p, nbytes)); index_ += nbytes; return true; } // Loads a tar file, runs it through the processor. // In our callbacks, we verify that we receive three files with known contents // TEST_F(TarProcessorTest, LoadTarFile) { String filepath = *g_program_path + "/archive_files/test1.tar"; // Read the test tar file into memory size_t file_size; uint8 *tar_data = test_utils::ReadFile(filepath, &file_size); ASSERT_TRUE(tar_data != NULL); // Gets header and file data callbacks TarTestClient callback_client; // The class we're testing... TarProcessor tar_processor(&callback_client); // Now that we've read the compressed file into memory, lets // feed it, a chunk at a time, into the tar_processor const int kChunkSize = 32; MemoryReadStream tar_stream(tar_data, file_size); size_t bytes_to_process = file_size; int result = Z_OK; while (bytes_to_process > 0) { size_t bytes_this_time = bytes_to_process < kChunkSize ? bytes_to_process : kChunkSize; result = tar_processor.ProcessBytes(&tar_stream, bytes_this_time); EXPECT_TRUE(result == Z_OK); bytes_to_process -= bytes_this_time; } free(tar_data); } } // namespace
amyvmiwei/chromium
o3d/import/cross/tar_processor_test.cc
C++
bsd-3-clause
5,379
// Test host codegen. // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-64 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-64 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-32 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-32 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // Test target codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s --check-prefix TCHECK --check-prefix TCHECK-64 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s // RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix TCHECK --check-prefix TCHECK-64 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck %s --check-prefix TCHECK --check-prefix TCHECK-32 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s // RUN: %clang_cc1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix TCHECK --check-prefix TCHECK-32 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm-bc %s -o %t-x86-host.bc // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefix SIMD-ONLY1 %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -o %t %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s // SIMD-ONLY1-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics #ifndef HEADER #define HEADER // CHECK-DAG: [[TT:%.+]] = type { i64, i8 } // CHECK-DAG: [[S1:%.+]] = type { double } // CHECK-DAG: [[ENTTY:%.+]] = type { i8*, i8*, i[[SZ:32|64]], i32, i32 } // CHECK-DAG: [[DEVTY:%.+]] = type { i8*, i8*, [[ENTTY]]*, [[ENTTY]]* } // CHECK-DAG: [[DSCTY:%.+]] = type { i32, [[DEVTY]]*, [[ENTTY]]*, [[ENTTY]]* } // TCHECK: [[ENTTY:%.+]] = type { i8*, i8*, i{{32|64}}, i32, i32 } // CHECK-DAG: $[[REGFN:\.omp_offloading\..+]] = comdat // We have 8 target regions, but only 7 that actually will generate offloading // code and have mapped arguments, and only 5 have all-constant map sizes. // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i[[SZ]]] [i[[SZ]] 0, i[[SZ]] 4] // CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] // CHECK-DAG: [[SIZET2:@.+]] = private unnamed_addr constant [1 x i{{32|64}}] [i[[SZ]] 2] // CHECK-DAG: [[MAPT2:@.+]] = private unnamed_addr constant [1 x i64] [i64 800] // CHECK-DAG: [[SIZET3:@.+]] = private unnamed_addr constant [2 x i[[SZ]]] [i[[SZ]] 4, i[[SZ]] 2] // CHECK-DAG: [[MAPT3:@.+]] = private unnamed_addr constant [2 x i64] [i64 800, i64 800] // CHECK-DAG: [[MAPT4:@.+]] = private unnamed_addr constant [9 x i64] [i64 800, i64 547, i64 288, i64 547, i64 547, i64 288, i64 288, i64 547, i64 547] // CHECK-DAG: [[SIZET5:@.+]] = private unnamed_addr constant [3 x i[[SZ]]] [i[[SZ]] 4, i[[SZ]] 2, i[[SZ]] 40] // CHECK-DAG: [[MAPT5:@.+]] = private unnamed_addr constant [3 x i64] [i64 800, i64 800, i64 547] // CHECK-DAG: [[SIZET6:@.+]] = private unnamed_addr constant [4 x i[[SZ]]] [i[[SZ]] 4, i[[SZ]] 2, i[[SZ]] 1, i[[SZ]] 40] // CHECK-DAG: [[MAPT6:@.+]] = private unnamed_addr constant [4 x i64] [i64 800, i64 800, i64 800, i64 547] // CHECK-DAG: [[MAPT7:@.+]] = private unnamed_addr constant [6 x i64] [i64 32, i64 281474976711171, i64 800, i64 288, i64 288, i64 547] // CHECK-DAG: @{{.*}} = weak constant i8 0 // CHECK-DAG: @{{.*}} = weak constant i8 0 // CHECK-DAG: @{{.*}} = weak constant i8 0 // CHECK-DAG: @{{.*}} = weak constant i8 0 // CHECK-DAG: @{{.*}} = weak constant i8 0 // CHECK-DAG: @{{.*}} = weak constant i8 0 // CHECK-DAG: @{{.*}} = weak constant i8 0 // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK: @{{.+}} = weak constant [[ENTTY]] // TCHECK-NOT: @{{.+}} = weak constant [[ENTTY]] // Check if offloading descriptor is created. // CHECK: [[ENTBEGIN:@.+]] = external constant [[ENTTY]] // CHECK: [[ENTEND:@.+]] = external constant [[ENTTY]] // CHECK: [[DEVBEGIN:@.+]] = extern_weak constant i8 // CHECK: [[DEVEND:@.+]] = extern_weak constant i8 // CHECK: [[IMAGES:@.+]] = internal unnamed_addr constant [1 x [[DEVTY]]] [{{.+}} { i8* [[DEVBEGIN]], i8* [[DEVEND]], [[ENTTY]]* [[ENTBEGIN]], [[ENTTY]]* [[ENTEND]] }], comdat($[[REGFN]]) // CHECK: [[DESC:@.+]] = internal constant [[DSCTY]] { i32 1, [[DEVTY]]* getelementptr inbounds ([1 x [[DEVTY]]], [1 x [[DEVTY]]]* [[IMAGES]], i32 0, i32 0), [[ENTTY]]* [[ENTBEGIN]], [[ENTTY]]* [[ENTEND]] }, comdat($[[REGFN]]) // Check target registration is registered as a Ctor. // CHECK: appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* @[[REGFN]], i8* bitcast (void ()* @[[REGFN]] to i8*) }] template<typename tx, typename ty> struct TT{ tx X; ty Y; }; int global; extern int global; // CHECK: define {{.*}}[[FOO:@.+]]( int foo(int n) { int a = 0; short aa = 0; float b[10]; float bn[n]; double c[5][10]; double cn[5][n]; TT<long long, char> d; static long *plocal; // CHECK: [[ADD:%.+]] = add nsw i32 // CHECK: store i32 [[ADD]], i32* [[DEVICE_CAP:%.+]], // CHECK: [[DEV:%.+]] = load i32, i32* [[DEVICE_CAP]], // CHECK: [[DEVICE:%.+]] = sext i32 [[DEV]] to i64 // CHECK: [[RET:%.+]] = call i32 @__tgt_target(i64 [[DEVICE]], i8* @{{[^,]+}}, i32 0, i8** null, i8** null, i[[SZ]]* null, i64* null) // CHECK-NEXT: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:[^,]+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT0:@.+]]() // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] #pragma omp target device(global + a) { } // CHECK-DAG: [[ADD:%.+]] = add nsw i32 // CHECK-DAG: store i32 [[ADD]], i32* [[DEVICE_CAP:%.+]], // CHECK-DAG: [[DEV:%.+]] = load i32, i32* [[DEVICE_CAP]], // CHECK-DAG: [[DEVICE:%.+]] = sext i32 [[DEV]] to i64 // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target_nowait(i64 [[DEVICE]], i8* @{{[^,]+}}, i32 2, i8** [[BPR:%[^,]+]], i8** [[PR:%[^,]+]], i[[SZ]]* getelementptr inbounds ([2 x i[[SZ]]], [2 x i[[SZ]]]* [[SIZET]], i32 0, i32 0), i64* getelementptr inbounds ([2 x i64], [2 x i64]* [[MAPT]], i32 0, i32 0) // CHECK-DAG: [[BPR]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[PR]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 0 // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]** // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]** // CHECK-DAG: store i[[SZ]]* [[BP0:%[^,]+]], i[[SZ]]** [[CBPADDR0]] // CHECK-DAG: store i[[SZ]]* [[BP0]], i[[SZ]]** [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 1 // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[BP1:%[^,]+]], i[[SZ]]* [[CBPADDR1]] // CHECK-DAG: store i[[SZ]] [[BP1]], i[[SZ]]* [[CPADDR1]] // CHECK: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:[^,]+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT0_:@.+]](i[[SZ]]* [[BP0]], i[[SZ]] [[BP1]]) // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] #pragma omp target device(global + a) nowait { static int local1; *plocal = global; local1 = global; } // CHECK: call void [[HVT1:@.+]](i[[SZ]] {{[^,]+}}) #pragma omp target if(0) firstprivate(global) { global += 1; } // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target(i64 -1, i8* @{{[^,]+}}, i32 1, i8** [[BP:%[^,]+]], i8** [[P:%[^,]+]], i[[SZ]]* getelementptr inbounds ([1 x i[[SZ]]], [1 x i[[SZ]]]* [[SIZET2]], i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* [[MAPT2]], i32 0, i32 0)) // CHECK-DAG: [[BP]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BPR:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[P]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[BPR]], i32 0, i32 [[IDX0:[0-9]+]] // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[PR]], i32 0, i32 [[IDX0]] // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[BP0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] // CHECK-DAG: store i[[SZ]] [[P0:%[^,]+]], i[[SZ]]* [[CPADDR0]] // CHECK: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:[^,]+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT2:@.+]](i[[SZ]] {{[^,]+}}) // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] #pragma omp target if(1) { aa += 1; } // CHECK: [[IF:%.+]] = icmp sgt i32 {{[^,]+}}, 10 // CHECK: br i1 [[IF]], label %[[IFTHEN:[^,]+]], label %[[IFELSE:[^,]+]] // CHECK: [[IFTHEN]] // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target(i64 -1, i8* @{{[^,]+}}, i32 2, i8** [[BPR:%[^,]+]], i8** [[PR:%[^,]+]], i[[SZ]]* getelementptr inbounds ([2 x i[[SZ]]], [2 x i[[SZ]]]* [[SIZET3]], i32 0, i32 0), i64* getelementptr inbounds ([2 x i64], [2 x i64]* [[MAPT3]], i32 0, i32 0)) // CHECK-DAG: [[BPR]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[PR]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 0 // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[BP0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] // CHECK-DAG: store i[[SZ]] [[P0:%[^,]+]], i[[SZ]]* [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[P]], i32 0, i32 1 // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[BP1:%[^,]+]], i[[SZ]]* [[CBPADDR1]] // CHECK-DAG: store i[[SZ]] [[P1:%[^,]+]], i[[SZ]]* [[CPADDR1]] // CHECK: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:.+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT3:@.+]]({{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] // CHECK-NEXT: br label %[[IFEND:.+]] // CHECK: [[IFELSE]] // CHECK: call void [[HVT3]]({{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[IFEND]] // CHECK: [[IFEND]] #pragma omp target if(n>10) { a += 1; aa += 1; } // We capture 3 VLA sizes in this target region // CHECK-64: [[A_VAL:%.+]] = load i32, i32* %{{.+}}, // CHECK-64: [[A_ADDR:%.+]] = bitcast i[[SZ]]* [[A_CADDR:%.+]] to i32* // CHECK-64: store i32 [[A_VAL]], i32* [[A_ADDR]], // CHECK-64: [[A_CVAL:%.+]] = load i[[SZ]], i[[SZ]]* [[A_CADDR]], // CHECK-32: [[A_VAL:%.+]] = load i32, i32* %{{.+}}, // CHECK-32: store i32 [[A_VAL]], i32* [[A_CADDR:%.+]], // CHECK-32: [[A_CVAL:%.+]] = load i[[SZ]], i[[SZ]]* [[A_CADDR]], // CHECK: [[IF:%.+]] = icmp sgt i32 {{[^,]+}}, 20 // CHECK: br i1 [[IF]], label %[[TRY:[^,]+]], label %[[IFELSE:[^,]+]] // CHECK: [[TRY]] // CHECK: [[BNSIZE:%.+]] = mul nuw i[[SZ]] [[VLA0:%.+]], 4 // CHECK: [[CNELEMSIZE2:%.+]] = mul nuw i[[SZ]] 5, [[VLA1:%.+]] // CHECK: [[CNSIZE:%.+]] = mul nuw i[[SZ]] [[CNELEMSIZE2]], 8 // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target(i64 -1, i8* @{{[^,]+}}, i32 9, i8** [[BPR:%[^,]+]], i8** [[PR:%[^,]+]], i[[SZ]]* [[SR:%[^,]+]], i64* getelementptr inbounds ([9 x i64], [9 x i64]* [[MAPT4]], i32 0, i32 0)) // CHECK-DAG: [[BPR]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[PR]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[SR]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S:%[^,]+]], i32 0, i32 0 // CHECK-DAG: [[SADDR0:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX0:0]] // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX0]] // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX0]] // CHECK-DAG: [[SADDR1:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX1:1]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX1]] // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX1]] // CHECK-DAG: [[SADDR2:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX2:2]] // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX2]] // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX2]] // CHECK-DAG: [[SADDR3:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX3:3]] // CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX3]] // CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX3]] // CHECK-DAG: [[SADDR4:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX4:4]] // CHECK-DAG: [[BPADDR4:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX4]] // CHECK-DAG: [[PADDR4:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX4]] // CHECK-DAG: [[SADDR5:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX5:5]] // CHECK-DAG: [[BPADDR5:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX5]] // CHECK-DAG: [[PADDR5:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX5]] // CHECK-DAG: [[SADDR6:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX6:6]] // CHECK-DAG: [[BPADDR6:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX6]] // CHECK-DAG: [[PADDR6:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX6]] // CHECK-DAG: [[SADDR7:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX7:7]] // CHECK-DAG: [[BPADDR7:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX7]] // CHECK-DAG: [[PADDR7:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX7]] // CHECK-DAG: [[SADDR8:%.+]] = getelementptr inbounds [9 x i[[SZ]]], [9 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX8:8]] // CHECK-DAG: [[BPADDR8:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[BP]], i32 0, i32 [[IDX8]] // CHECK-DAG: [[PADDR8:%.+]] = getelementptr inbounds [9 x i8*], [9 x i8*]* [[P]], i32 0, i32 [[IDX8]] // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. // CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to i[[SZ]]* // CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR2]] // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR2]] // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR2]] // CHECK-DAG: [[CBPADDR6:%.+]] = bitcast i8** [[BPADDR6]] to i[[SZ]]* // CHECK-DAG: [[CPADDR6:%.+]] = bitcast i8** [[PADDR6]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CBPADDR6]] // CHECK-DAG: store i[[SZ]] [[VLA1]], i[[SZ]]* [[CPADDR6]] // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR6]] // CHECK-DAG: [[CBPADDR5:%.+]] = bitcast i8** [[BPADDR5]] to i[[SZ]]* // CHECK-DAG: [[CPADDR5:%.+]] = bitcast i8** [[PADDR5]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CBPADDR5]] // CHECK-DAG: store i[[SZ]] 5, i[[SZ]]* [[CPADDR5]] // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR5]] // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CBPADDR0]] // CHECK-DAG: store i[[SZ]] [[A_CVAL]], i[[SZ]]* [[CPADDR0]] // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* [[SADDR0]] // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to [10 x float]** // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to [10 x float]** // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CBPADDR1]] // CHECK-DAG: store [10 x float]* %{{.+}}, [10 x float]** [[CPADDR1]] // CHECK-DAG: store i[[SZ]] 40, i[[SZ]]* [[SADDR1]] // CHECK-DAG: [[CBPADDR3:%.+]] = bitcast i8** [[BPADDR3]] to float** // CHECK-DAG: [[CPADDR3:%.+]] = bitcast i8** [[PADDR3]] to float** // CHECK-DAG: store float* %{{.+}}, float** [[CBPADDR3]] // CHECK-DAG: store float* %{{.+}}, float** [[CPADDR3]] // CHECK-DAG: store i[[SZ]] [[BNSIZE]], i[[SZ]]* [[SADDR3]] // CHECK-DAG: [[CBPADDR4:%.+]] = bitcast i8** [[BPADDR4]] to [5 x [10 x double]]** // CHECK-DAG: [[CPADDR4:%.+]] = bitcast i8** [[PADDR4]] to [5 x [10 x double]]** // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CBPADDR4]] // CHECK-DAG: store [5 x [10 x double]]* %{{.+}}, [5 x [10 x double]]** [[CPADDR4]] // CHECK-DAG: store i[[SZ]] 400, i[[SZ]]* [[SADDR4]] // CHECK-DAG: [[CBPADDR7:%.+]] = bitcast i8** [[BPADDR7]] to double** // CHECK-DAG: [[CPADDR7:%.+]] = bitcast i8** [[PADDR7]] to double** // CHECK-DAG: store double* %{{.+}}, double** [[CBPADDR7]] // CHECK-DAG: store double* %{{.+}}, double** [[CPADDR7]] // CHECK-DAG: store i[[SZ]] [[CNSIZE]], i[[SZ]]* [[SADDR7]] // CHECK-DAG: [[CBPADDR8:%.+]] = bitcast i8** [[BPADDR8]] to [[TT]]** // CHECK-DAG: [[CPADDR8:%.+]] = bitcast i8** [[PADDR8]] to [[TT]]** // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CBPADDR8]] // CHECK-DAG: store [[TT]]* %{{.+}}, [[TT]]** [[CPADDR8]] // CHECK-DAG: store i[[SZ]] {{12|16}}, i[[SZ]]* [[SADDR8]] // CHECK: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:.+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT4:@.+]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] // CHECK-NEXT: br label %[[IFEND:.+]] // CHECK: [[IFELSE]] // CHECK: call void [[HVT4]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[IFEND]] // CHECK: [[IFEND]] #pragma omp target if(n>20) { a += 1; b[2] += 1.0; bn[3] += 1.0; c[1][2] += 1.0; cn[1][3] += 1.0; d.X += 1; d.Y += 1; } return a; } // Check that the offloading functions are emitted and that the arguments are // correct and loaded correctly for the target regions in foo(). // CHECK: define internal void [[HVT0]]() // CHECK: define internal void [[HVT1]](i[[SZ]] %{{.+}}) // Create stack storage and store argument in there. // CHECK: [[AA_ADDR:%.+]] = alloca i[[SZ]], align // CHECK: store i[[SZ]] %{{.+}}, i[[SZ]]* [[AA_ADDR]], align // CHECK-64: [[AA_CADDR:%.+]] = bitcast i[[SZ]]* [[AA_ADDR]] to i32* // CHECK-64: load i32, i32* [[AA_CADDR]], align // CHECK-32: load i32, i32* [[AA_ADDR]], align // CHECK: define internal void [[HVT2]](i[[SZ]] %{{.+}}) // Create stack storage and store argument in there. // CHECK: [[AA_ADDR:%.+]] = alloca i[[SZ]], align // CHECK: store i[[SZ]] %{{.+}}, i[[SZ]]* [[AA_ADDR]], align // CHECK: [[AA_CADDR:%.+]] = bitcast i[[SZ]]* [[AA_ADDR]] to i16* // CHECK: load i16, i16* [[AA_CADDR]], align // CHECK: define internal void [[HVT3]] // Create stack storage and store argument in there. // CHECK: [[A_ADDR:%.+]] = alloca i[[SZ]], align // CHECK: [[AA_ADDR:%.+]] = alloca i[[SZ]], align // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[A_ADDR]], align // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[AA_ADDR]], align // CHECK-64-DAG:[[A_CADDR:%.+]] = bitcast i[[SZ]]* [[A_ADDR]] to i32* // CHECK-DAG: [[AA_CADDR:%.+]] = bitcast i[[SZ]]* [[AA_ADDR]] to i16* // CHECK-64-DAG:load i32, i32* [[A_CADDR]], align // CHECK-32-DAG:load i32, i32* [[A_ADDR]], align // CHECK-DAG: load i16, i16* [[AA_CADDR]], align // CHECK: define internal void [[HVT4]] // Create local storage for each capture. // CHECK: [[LOCAL_A:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_B:%.+]] = alloca [10 x float]* // CHECK: [[LOCAL_VLA1:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_BN:%.+]] = alloca float* // CHECK: [[LOCAL_C:%.+]] = alloca [5 x [10 x double]]* // CHECK: [[LOCAL_VLA2:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_VLA3:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_CN:%.+]] = alloca double* // CHECK: [[LOCAL_D:%.+]] = alloca [[TT]]* // CHECK-DAG: store i[[SZ]] [[ARG_A:%.+]], i[[SZ]]* [[LOCAL_A]] // CHECK-DAG: store [10 x float]* [[ARG_B:%.+]], [10 x float]** [[LOCAL_B]] // CHECK-DAG: store i[[SZ]] [[ARG_VLA1:%.+]], i[[SZ]]* [[LOCAL_VLA1]] // CHECK-DAG: store float* [[ARG_BN:%.+]], float** [[LOCAL_BN]] // CHECK-DAG: store [5 x [10 x double]]* [[ARG_C:%.+]], [5 x [10 x double]]** [[LOCAL_C]] // CHECK-DAG: store i[[SZ]] [[ARG_VLA2:%.+]], i[[SZ]]* [[LOCAL_VLA2]] // CHECK-DAG: store i[[SZ]] [[ARG_VLA3:%.+]], i[[SZ]]* [[LOCAL_VLA3]] // CHECK-DAG: store double* [[ARG_CN:%.+]], double** [[LOCAL_CN]] // CHECK-DAG: store [[TT]]* [[ARG_D:%.+]], [[TT]]** [[LOCAL_D]] // CHECK-64-DAG:[[REF_A:%.+]] = bitcast i[[SZ]]* [[LOCAL_A]] to i32* // CHECK-DAG: [[REF_B:%.+]] = load [10 x float]*, [10 x float]** [[LOCAL_B]], // CHECK-DAG: [[VAL_VLA1:%.+]] = load i[[SZ]], i[[SZ]]* [[LOCAL_VLA1]], // CHECK-DAG: [[REF_BN:%.+]] = load float*, float** [[LOCAL_BN]], // CHECK-DAG: [[REF_C:%.+]] = load [5 x [10 x double]]*, [5 x [10 x double]]** [[LOCAL_C]], // CHECK-DAG: [[VAL_VLA2:%.+]] = load i[[SZ]], i[[SZ]]* [[LOCAL_VLA2]], // CHECK-DAG: [[VAL_VLA3:%.+]] = load i[[SZ]], i[[SZ]]* [[LOCAL_VLA3]], // CHECK-DAG: [[REF_CN:%.+]] = load double*, double** [[LOCAL_CN]], // CHECK-DAG: [[REF_D:%.+]] = load [[TT]]*, [[TT]]** [[LOCAL_D]], // Use captures. // CHECK-64-DAG: load i32, i32* [[REF_A]] // CHECK-32-DAG: load i32, i32* [[LOCAL_A]] // CHECK-DAG: getelementptr inbounds [10 x float], [10 x float]* [[REF_B]], i[[SZ]] 0, i[[SZ]] 2 // CHECK-DAG: getelementptr inbounds float, float* [[REF_BN]], i[[SZ]] 3 // CHECK-DAG: getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* [[REF_C]], i[[SZ]] 0, i[[SZ]] 1 // CHECK-DAG: getelementptr inbounds double, double* [[REF_CN]], i[[SZ]] %{{.+}} // CHECK-DAG: getelementptr inbounds [[TT]], [[TT]]* [[REF_D]], i32 0, i32 0 template<typename tx> tx ftemplate(int n) { tx a = 0; short aa = 0; tx b[10]; #pragma omp target if(n>40) { a += 1; aa += 1; b[2] += 1; } return a; } static int fstatic(int n) { int a = 0; short aa = 0; char aaa = 0; int b[10]; #pragma omp target if(n>50) { a += 1; aa += 1; aaa += 1; b[2] += 1; } return a; } struct S1 { double a; int r1(int n){ int b = n+1; short int c[2][n]; #pragma omp target if(n>60) { this->a = (double)b + 1.5; c[1][1] = ++a; } return c[1][1] + (int)b; } }; // CHECK: define {{.*}}@{{.*}}bar{{.*}} int bar(int n){ int a = 0; // CHECK: call {{.*}}i32 [[FOO]](i32 {{.*}}) a += foo(n); S1 S; // CHECK: call {{.*}}i32 [[FS1:@.+]]([[S1]]* {{.*}}, i32 {{.*}}) a += S.r1(n); // CHECK: call {{.*}}i32 [[FSTATIC:@.+]](i32 {{.*}}) a += fstatic(n); // CHECK: call {{.*}}i32 [[FTEMPLATE:@.+]](i32 {{.*}}) a += ftemplate<int>(n); return a; } // // CHECK: define {{.*}}[[FS1]] // // CHECK: i8* @llvm.stacksave() // CHECK-64: [[B_ADDR:%.+]] = bitcast i[[SZ]]* [[B_CADDR:%.+]] to i32* // CHECK-64: store i32 %{{.+}}, i32* [[B_ADDR]], // CHECK-64: [[B_CVAL:%.+]] = load i[[SZ]], i[[SZ]]* [[B_CADDR]], // CHECK-32: store i32 %{{.+}}, i32* %__vla_expr // CHECK-32: store i32 %{{.+}}, i32* [[B_ADDR:%.+]], // CHECK-32: [[B_CVAL:%.+]] = load i[[SZ]], i[[SZ]]* [[B_ADDR]], // CHECK: [[IF:%.+]] = icmp sgt i32 {{[^,]+}}, 60 // CHECK: br i1 [[IF]], label %[[TRY:[^,]+]], label %[[IFELSE:[^,]+]] // CHECK: [[TRY]] // We capture 2 VLA sizes in this target region // CHECK: [[CELEMSIZE2:%.+]] = mul nuw i[[SZ]] 2, [[VLA0:%.+]] // CHECK: [[CSIZE:%.+]] = mul nuw i[[SZ]] [[CELEMSIZE2]], 2 // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target(i64 -1, i8* @{{[^,]+}}, i32 6, i8** [[BPR:%[^,]+]], i8** [[PR:%[^,]+]], i[[SZ]]* [[SR:%[^,]+]], i64* getelementptr inbounds ([6 x i64], [6 x i64]* [[MAPT7]], i32 0, i32 0)) // CHECK-DAG: [[BPR]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[BP:%.+]], i32 0, i32 0 // CHECK-DAG: [[PR]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[P:%.+]], i32 0, i32 0 // CHECK-DAG: [[SR]] = getelementptr inbounds [6 x i[[SZ]]], [6 x i[[SZ]]]* [[S:%.+]], i32 0, i32 0 // CHECK-DAG: [[SADDR0:%.+]] = getelementptr inbounds [6 x i[[SZ]]], [6 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX0:0]] // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[BP]], i32 0, i32 [[IDX0]] // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[P]], i32 0, i32 [[IDX0]] // CHECK-DAG: [[SADDR1:%.+]] = getelementptr inbounds [6 x i[[SZ]]], [6 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX1:1]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[BP]], i32 0, i32 [[IDX1]] // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[P]], i32 0, i32 [[IDX1]] // CHECK-DAG: [[SADDR2:%.+]] = getelementptr inbounds [6 x i[[SZ]]], [6 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX2:2]] // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[BP]], i32 0, i32 [[IDX2]] // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[P]], i32 0, i32 [[IDX2]] // CHECK-DAG: [[SADDR3:%.+]] = getelementptr inbounds [6 x i[[SZ]]], [6 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX3:3]] // CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[BP]], i32 0, i32 [[IDX3]] // CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[P]], i32 0, i32 [[IDX3]] // CHECK-DAG: [[SADDR4:%.+]] = getelementptr inbounds [6 x i[[SZ]]], [6 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX4:4]] // CHECK-DAG: [[BPADDR4:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[BP]], i32 0, i32 [[IDX4]] // CHECK-DAG: [[PADDR4:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[P]], i32 0, i32 [[IDX4]] // CHECK-DAG: [[SADDR5:%.+]] = getelementptr inbounds [6 x i[[SZ]]], [6 x i[[SZ]]]* [[S]], i32 0, i32 [[IDX5:5]] // CHECK-DAG: [[BPADDR5:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[BP]], i32 0, i32 [[IDX5]] // CHECK-DAG: [[PADDR5:%.+]] = getelementptr inbounds [6 x i8*], [6 x i8*]* [[P]], i32 0, i32 [[IDX5]] // The names below are not necessarily consistent with the names used for the // addresses above as some are repeated. // CHECK-DAG: [[CBPADDR5:%.+]] = bitcast i8** [[BPADDR5]] to i16** // CHECK-DAG: [[CPADDR5:%.+]] = bitcast i8** [[PADDR5]] to i16** // CHECK-DAG: store i16* %{{.+}}, i16** [[CBPADDR5]] // CHECK-DAG: store i16* %{{.+}}, i16** [[CPADDR5]] // CHECK-DAG: store i[[SZ]] [[CSIZE]], i[[SZ]]* [[SADDR5]] // CHECK-DAG: [[CBPADDR4:%.+]] = bitcast i8** [[BPADDR4]] to i[[SZ]]* // CHECK-DAG: [[CPADDR4:%.+]] = bitcast i8** [[PADDR4]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CBPADDR4]] // CHECK-DAG: store i[[SZ]] [[VLA0]], i[[SZ]]* [[CPADDR4]] // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR4]] // CHECK-DAG: [[CBPADDR3:%.+]] = bitcast i8** [[BPADDR3]] to i[[SZ]]* // CHECK-DAG: [[CPADDR3:%.+]] = bitcast i8** [[PADDR3]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CBPADDR3]] // CHECK-DAG: store i[[SZ]] 2, i[[SZ]]* [[CPADDR3]] // CHECK-DAG: store i[[SZ]] {{4|8}}, i[[SZ]]* [[SADDR3]] // CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to i[[SZ]]* // CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CBPADDR2]] // CHECK-DAG: store i[[SZ]] [[B_CVAL]], i[[SZ]]* [[CPADDR2]] // CHECK-DAG: store i[[SZ]] 4, i[[SZ]]* [[SADDR2]] // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to [[S1]]** // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to double** // CHECK-DAG: store [[S1]]* [[THIS:%.+]], [[S1]]** [[CBPADDR0]] // CHECK-DAG: store double* [[A:%.+]], double** [[CPADDR0]] // CHECK-DAG: store i[[SZ]] %{{.+}}, i[[SZ]]* [[SADDR0]] // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to [[S1]]** // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to double** // CHECK-DAG: store [[S1]]* [[THIS]], [[S1]]** [[CBPADDR1]] // CHECK-DAG: store double* [[A]], double** [[CPADDR1]] // CHECK-DAG: store i[[SZ]] 8, i[[SZ]]* [[SADDR1]] // CHECK: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:.+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT7:@.+]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] // CHECK-NEXT: br label %[[IFEND:.+]] // CHECK: [[IFELSE]] // CHECK: call void [[HVT7]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[IFEND]] // CHECK: [[IFEND]] // // CHECK: define {{.*}}[[FSTATIC]] // // CHECK: [[IF:%.+]] = icmp sgt i32 {{[^,]+}}, 50 // CHECK: br i1 [[IF]], label %[[IFTHEN:[^,]+]], label %[[IFELSE:[^,]+]] // CHECK: [[IFTHEN]] // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target(i64 -1, i8* @{{[^,]+}}, i32 4, i8** [[BPR:%[^,]+]], i8** [[PR:%[^,]+]], i[[SZ]]* getelementptr inbounds ([4 x i[[SZ]]], [4 x i[[SZ]]]* [[SIZET6]], i32 0, i32 0), i64* getelementptr inbounds ([4 x i64], [4 x i64]* [[MAPT6]], i32 0, i32 0)) // CHECK-DAG: [[BPR]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP:%.+]], i32 0, i32 0 // CHECK-DAG: [[PR]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P:%.+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 0 // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VAL0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] // CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 1 // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VAL1:%[^,]+]], i[[SZ]]* [[CBPADDR1]] // CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1]] // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 2 // CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to i[[SZ]]* // CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VAL2:%[^,]+]], i[[SZ]]* [[CBPADDR2]] // CHECK-DAG: store i[[SZ]] [[VAL2]], i[[SZ]]* [[CPADDR2]] // CHECK-DAG: [[BPADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[BP]], i32 0, i32 3 // CHECK-DAG: [[PADDR3:%.+]] = getelementptr inbounds [4 x i8*], [4 x i8*]* [[P]], i32 0, i32 3 // CHECK-DAG: [[CBPADDR3:%.+]] = bitcast i8** [[BPADDR3]] to [10 x i32]** // CHECK-DAG: [[CPADDR3:%.+]] = bitcast i8** [[PADDR3]] to [10 x i32]** // CHECK-DAG: store [10 x i32]* [[VAL3:%[^,]+]], [10 x i32]** [[CBPADDR3]] // CHECK-DAG: store [10 x i32]* [[VAL3]], [10 x i32]** [[CPADDR3]] // CHECK: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:.+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT6:@.+]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] // CHECK-NEXT: br label %[[IFEND:.+]] // CHECK: [[IFELSE]] // CHECK: call void [[HVT6]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[IFEND]] // CHECK: [[IFEND]] // // CHECK: define {{.*}}[[FTEMPLATE]] // // CHECK: [[IF:%.+]] = icmp sgt i32 {{[^,]+}}, 40 // CHECK: br i1 [[IF]], label %[[IFTHEN:[^,]+]], label %[[IFELSE:[^,]+]] // CHECK: [[IFTHEN]] // CHECK-DAG: [[RET:%.+]] = call i32 @__tgt_target(i64 -1, i8* @{{[^,]+}}, i32 3, i8** [[BPR:%[^,]+]], i8** [[PR:%[^,]+]], i[[SZ]]* getelementptr inbounds ([3 x i[[SZ]]], [3 x i[[SZ]]]* [[SIZET5]], i32 0, i32 0), i64* getelementptr inbounds ([3 x i64], [3 x i64]* [[MAPT5]], i32 0, i32 0)) // CHECK-DAG: [[BPR]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP:%.+]], i32 0, i32 0 // CHECK-DAG: [[PR]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P:%.+]], i32 0, i32 0 // CHECK-DAG: [[BPADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 0 // CHECK-DAG: [[PADDR0:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 0 // CHECK-DAG: [[CBPADDR0:%.+]] = bitcast i8** [[BPADDR0]] to i[[SZ]]* // CHECK-DAG: [[CPADDR0:%.+]] = bitcast i8** [[PADDR0]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VAL0:%[^,]+]], i[[SZ]]* [[CBPADDR0]] // CHECK-DAG: store i[[SZ]] [[VAL0]], i[[SZ]]* [[CPADDR0]] // CHECK-DAG: [[BPADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 1 // CHECK-DAG: [[PADDR1:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 1 // CHECK-DAG: [[CBPADDR1:%.+]] = bitcast i8** [[BPADDR1]] to i[[SZ]]* // CHECK-DAG: [[CPADDR1:%.+]] = bitcast i8** [[PADDR1]] to i[[SZ]]* // CHECK-DAG: store i[[SZ]] [[VAL1:%[^,]+]], i[[SZ]]* [[CBPADDR1]] // CHECK-DAG: store i[[SZ]] [[VAL1]], i[[SZ]]* [[CPADDR1]] // CHECK-DAG: [[BPADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[BP]], i32 0, i32 2 // CHECK-DAG: [[PADDR2:%.+]] = getelementptr inbounds [3 x i8*], [3 x i8*]* [[P]], i32 0, i32 2 // CHECK-DAG: [[CBPADDR2:%.+]] = bitcast i8** [[BPADDR2]] to [10 x i32]** // CHECK-DAG: [[CPADDR2:%.+]] = bitcast i8** [[PADDR2]] to [10 x i32]** // CHECK-DAG: store [10 x i32]* [[VAL2:%[^,]+]], [10 x i32]** [[CBPADDR2]] // CHECK-DAG: store [10 x i32]* [[VAL2]], [10 x i32]** [[CPADDR2]] // CHECK: [[ERROR:%.+]] = icmp ne i32 [[RET]], 0 // CHECK-NEXT: br i1 [[ERROR]], label %[[FAIL:.+]], label %[[END:[^,]+]] // CHECK: [[FAIL]] // CHECK: call void [[HVT5:@.+]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[END]] // CHECK: [[END]] // CHECK-NEXT: br label %[[IFEND:.+]] // CHECK: [[IFELSE]] // CHECK: call void [[HVT5]]({{[^,]+}}, {{[^,]+}}, {{[^,]+}}) // CHECK-NEXT: br label %[[IFEND]] // CHECK: [[IFEND]] // Check that the offloading functions are emitted and that the arguments are // correct and loaded correctly for the target regions of the callees of bar(). // CHECK: define internal void [[HVT7]] // Create local storage for each capture. // CHECK: [[LOCAL_THIS:%.+]] = alloca [[S1]]* // CHECK: [[LOCAL_B:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_VLA1:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_VLA2:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_C:%.+]] = alloca i16* // CHECK-DAG: store [[S1]]* [[ARG_THIS:%.+]], [[S1]]** [[LOCAL_THIS]] // CHECK-DAG: store i[[SZ]] [[ARG_B:%.+]], i[[SZ]]* [[LOCAL_B]] // CHECK-DAG: store i[[SZ]] [[ARG_VLA1:%.+]], i[[SZ]]* [[LOCAL_VLA1]] // CHECK-DAG: store i[[SZ]] [[ARG_VLA2:%.+]], i[[SZ]]* [[LOCAL_VLA2]] // CHECK-DAG: store i16* [[ARG_C:%.+]], i16** [[LOCAL_C]] // Store captures in the context. // CHECK-DAG: [[REF_THIS:%.+]] = load [[S1]]*, [[S1]]** [[LOCAL_THIS]], // CHECK-64-DAG:[[REF_B:%.+]] = bitcast i[[SZ]]* [[LOCAL_B]] to i32* // CHECK-DAG: [[VAL_VLA1:%.+]] = load i[[SZ]], i[[SZ]]* [[LOCAL_VLA1]], // CHECK-DAG: [[VAL_VLA2:%.+]] = load i[[SZ]], i[[SZ]]* [[LOCAL_VLA2]], // CHECK-DAG: [[REF_C:%.+]] = load i16*, i16** [[LOCAL_C]], // Use captures. // CHECK-DAG: getelementptr inbounds [[S1]], [[S1]]* [[REF_THIS]], i32 0, i32 0 // CHECK-64-DAG:load i32, i32* [[REF_B]] // CHECK-32-DAG:load i32, i32* [[LOCAL_B]] // CHECK-DAG: getelementptr inbounds i16, i16* [[REF_C]], i[[SZ]] %{{.+}} // CHECK: define internal void [[HVT6]] // Create local storage for each capture. // CHECK: [[LOCAL_A:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_AA:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_AAA:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_B:%.+]] = alloca [10 x i32]* // CHECK-DAG: store i[[SZ]] [[ARG_A:%.+]], i[[SZ]]* [[LOCAL_A]] // CHECK-DAG: store i[[SZ]] [[ARG_AA:%.+]], i[[SZ]]* [[LOCAL_AA]] // CHECK-DAG: store i[[SZ]] [[ARG_AAA:%.+]], i[[SZ]]* [[LOCAL_AAA]] // CHECK-DAG: store [10 x i32]* [[ARG_B:%.+]], [10 x i32]** [[LOCAL_B]] // Store captures in the context. // CHECK-64-DAG: [[REF_A:%.+]] = bitcast i[[SZ]]* [[LOCAL_A]] to i32* // CHECK-DAG: [[REF_AA:%.+]] = bitcast i[[SZ]]* [[LOCAL_AA]] to i16* // CHECK-DAG: [[REF_AAA:%.+]] = bitcast i[[SZ]]* [[LOCAL_AAA]] to i8* // CHECK-DAG: [[REF_B:%.+]] = load [10 x i32]*, [10 x i32]** [[LOCAL_B]], // Use captures. // CHECK-64-DAG: load i32, i32* [[REF_A]] // CHECK-DAG: load i16, i16* [[REF_AA]] // CHECK-DAG: load i8, i8* [[REF_AAA]] // CHECK-32-DAG: load i32, i32* [[LOCAL_A]] // CHECK-DAG: getelementptr inbounds [10 x i32], [10 x i32]* [[REF_B]], i[[SZ]] 0, i[[SZ]] 2 // CHECK: define internal void [[HVT5]] // Create local storage for each capture. // CHECK: [[LOCAL_A:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_AA:%.+]] = alloca i[[SZ]] // CHECK: [[LOCAL_B:%.+]] = alloca [10 x i32]* // CHECK-DAG: store i[[SZ]] [[ARG_A:%.+]], i[[SZ]]* [[LOCAL_A]] // CHECK-DAG: store i[[SZ]] [[ARG_AA:%.+]], i[[SZ]]* [[LOCAL_AA]] // CHECK-DAG: store [10 x i32]* [[ARG_B:%.+]], [10 x i32]** [[LOCAL_B]] // Store captures in the context. // CHECK-64-DAG:[[REF_A:%.+]] = bitcast i[[SZ]]* [[LOCAL_A]] to i32* // CHECK-DAG: [[REF_AA:%.+]] = bitcast i[[SZ]]* [[LOCAL_AA]] to i16* // CHECK-DAG: [[REF_B:%.+]] = load [10 x i32]*, [10 x i32]** [[LOCAL_B]], // Use captures. // CHECK-64-DAG: load i32, i32* [[REF_A]] // CHECK-32-DAG: load i32, i32* [[LOCAL_A]] // CHECK-DAG: load i16, i16* [[REF_AA]] // CHECK-DAG: getelementptr inbounds [10 x i32], [10 x i32]* [[REF_B]], i[[SZ]] 0, i[[SZ]] 2 void bar () { #define pragma_target _Pragma("omp target") pragma_target {} } #endif
youtube/cobalt
third_party/llvm-project/clang/test/OpenMP/target_codegen.cpp
C++
bsd-3-clause
44,899
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/appcache/appcache_dispatcher_host.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "content/browser/appcache/chrome_appcache_service.h" #include "content/browser/bad_message.h" #include "content/common/appcache_messages.h" #include "content/public/browser/user_metrics.h" namespace content { AppCacheDispatcherHost::AppCacheDispatcherHost( ChromeAppCacheService* appcache_service, int process_id) : BrowserMessageFilter(AppCacheMsgStart), appcache_service_(appcache_service), frontend_proxy_(this), process_id_(process_id), weak_factory_(this) { } void AppCacheDispatcherHost::OnChannelConnected(int32 peer_pid) { if (appcache_service_.get()) { backend_impl_.Initialize( appcache_service_.get(), &frontend_proxy_, process_id_); get_status_callback_ = base::Bind(&AppCacheDispatcherHost::GetStatusCallback, weak_factory_.GetWeakPtr()); start_update_callback_ = base::Bind(&AppCacheDispatcherHost::StartUpdateCallback, weak_factory_.GetWeakPtr()); swap_cache_callback_ = base::Bind(&AppCacheDispatcherHost::SwapCacheCallback, weak_factory_.GetWeakPtr()); } } bool AppCacheDispatcherHost::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(AppCacheDispatcherHost, message) IPC_MESSAGE_HANDLER(AppCacheHostMsg_RegisterHost, OnRegisterHost) IPC_MESSAGE_HANDLER(AppCacheHostMsg_UnregisterHost, OnUnregisterHost) IPC_MESSAGE_HANDLER(AppCacheHostMsg_SetSpawningHostId, OnSetSpawningHostId) IPC_MESSAGE_HANDLER(AppCacheHostMsg_GetResourceList, OnGetResourceList) IPC_MESSAGE_HANDLER(AppCacheHostMsg_SelectCache, OnSelectCache) IPC_MESSAGE_HANDLER(AppCacheHostMsg_SelectCacheForWorker, OnSelectCacheForWorker) IPC_MESSAGE_HANDLER(AppCacheHostMsg_SelectCacheForSharedWorker, OnSelectCacheForSharedWorker) IPC_MESSAGE_HANDLER(AppCacheHostMsg_MarkAsForeignEntry, OnMarkAsForeignEntry) IPC_MESSAGE_HANDLER_DELAY_REPLY(AppCacheHostMsg_GetStatus, OnGetStatus) IPC_MESSAGE_HANDLER_DELAY_REPLY(AppCacheHostMsg_StartUpdate, OnStartUpdate) IPC_MESSAGE_HANDLER_DELAY_REPLY(AppCacheHostMsg_SwapCache, OnSwapCache) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; } AppCacheDispatcherHost::~AppCacheDispatcherHost() {} void AppCacheDispatcherHost::OnRegisterHost(int host_id) { if (appcache_service_.get()) { if (!backend_impl_.RegisterHost(host_id)) { bad_message::ReceivedBadMessage(this, bad_message::ACDH_REGISTER); } } } void AppCacheDispatcherHost::OnUnregisterHost(int host_id) { if (appcache_service_.get()) { if (!backend_impl_.UnregisterHost(host_id)) { bad_message::ReceivedBadMessage(this, bad_message::ACDH_UNREGISTER); } } } void AppCacheDispatcherHost::OnSetSpawningHostId( int host_id, int spawning_host_id) { if (appcache_service_.get()) { if (!backend_impl_.SetSpawningHostId(host_id, spawning_host_id)) bad_message::ReceivedBadMessage(this, bad_message::ACDH_SET_SPAWNING); } } void AppCacheDispatcherHost::OnSelectCache( int host_id, const GURL& document_url, int64 cache_document_was_loaded_from, const GURL& opt_manifest_url) { if (appcache_service_.get()) { if (!backend_impl_.SelectCache(host_id, document_url, cache_document_was_loaded_from, opt_manifest_url)) { bad_message::ReceivedBadMessage(this, bad_message::ACDH_SELECT_CACHE); } } else { frontend_proxy_.OnCacheSelected(host_id, AppCacheInfo()); } } void AppCacheDispatcherHost::OnSelectCacheForWorker( int host_id, int parent_process_id, int parent_host_id) { if (appcache_service_.get()) { if (!backend_impl_.SelectCacheForWorker( host_id, parent_process_id, parent_host_id)) { bad_message::ReceivedBadMessage( this, bad_message::ACDH_SELECT_CACHE_FOR_WORKER); } } else { frontend_proxy_.OnCacheSelected(host_id, AppCacheInfo()); } } void AppCacheDispatcherHost::OnSelectCacheForSharedWorker( int host_id, int64 appcache_id) { if (appcache_service_.get()) { if (!backend_impl_.SelectCacheForSharedWorker(host_id, appcache_id)) bad_message::ReceivedBadMessage( this, bad_message::ACDH_SELECT_CACHE_FOR_SHARED_WORKER); } else { frontend_proxy_.OnCacheSelected(host_id, AppCacheInfo()); } } void AppCacheDispatcherHost::OnMarkAsForeignEntry( int host_id, const GURL& document_url, int64 cache_document_was_loaded_from) { if (appcache_service_.get()) { if (!backend_impl_.MarkAsForeignEntry( host_id, document_url, cache_document_was_loaded_from)) { bad_message::ReceivedBadMessage(this, bad_message::ACDH_MARK_AS_FOREIGN_ENTRY); } } } void AppCacheDispatcherHost::OnGetResourceList( int host_id, std::vector<AppCacheResourceInfo>* params) { if (appcache_service_.get()) backend_impl_.GetResourceList(host_id, params); } void AppCacheDispatcherHost::OnGetStatus(int host_id, IPC::Message* reply_msg) { if (pending_reply_msg_) { bad_message::ReceivedBadMessage( this, bad_message::ACDH_PENDING_REPLY_IN_GET_STATUS); delete reply_msg; return; } pending_reply_msg_.reset(reply_msg); if (appcache_service_.get()) { if (!backend_impl_.GetStatusWithCallback( host_id, get_status_callback_, reply_msg)) { bad_message::ReceivedBadMessage(this, bad_message::ACDH_GET_STATUS); } return; } GetStatusCallback(APPCACHE_STATUS_UNCACHED, reply_msg); } void AppCacheDispatcherHost::OnStartUpdate(int host_id, IPC::Message* reply_msg) { if (pending_reply_msg_) { bad_message::ReceivedBadMessage( this, bad_message::ACDH_PENDING_REPLY_IN_START_UPDATE); delete reply_msg; return; } pending_reply_msg_.reset(reply_msg); if (appcache_service_.get()) { if (!backend_impl_.StartUpdateWithCallback( host_id, start_update_callback_, reply_msg)) { bad_message::ReceivedBadMessage(this, bad_message::ACDH_START_UPDATE); } return; } StartUpdateCallback(false, reply_msg); } void AppCacheDispatcherHost::OnSwapCache(int host_id, IPC::Message* reply_msg) { if (pending_reply_msg_) { bad_message::ReceivedBadMessage( this, bad_message::ACDH_PENDING_REPLY_IN_SWAP_CACHE); delete reply_msg; return; } pending_reply_msg_.reset(reply_msg); if (appcache_service_.get()) { if (!backend_impl_.SwapCacheWithCallback( host_id, swap_cache_callback_, reply_msg)) { bad_message::ReceivedBadMessage(this, bad_message::ACDH_SWAP_CACHE); } return; } SwapCacheCallback(false, reply_msg); } void AppCacheDispatcherHost::GetStatusCallback( AppCacheStatus status, void* param) { IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); DCHECK_EQ(pending_reply_msg_.get(), reply_msg); AppCacheHostMsg_GetStatus::WriteReplyParams(reply_msg, status); Send(pending_reply_msg_.release()); } void AppCacheDispatcherHost::StartUpdateCallback(bool result, void* param) { IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); DCHECK_EQ(pending_reply_msg_.get(), reply_msg); AppCacheHostMsg_StartUpdate::WriteReplyParams(reply_msg, result); Send(pending_reply_msg_.release()); } void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) { IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); DCHECK_EQ(pending_reply_msg_.get(), reply_msg); AppCacheHostMsg_SwapCache::WriteReplyParams(reply_msg, result); Send(pending_reply_msg_.release()); } } // namespace content
Bysmyyr/chromium-crosswalk
content/browser/appcache/appcache_dispatcher_host.cc
C++
bsd-3-clause
8,120
<?php /** * RoboKassa driver for Omnipay PHP payment library. * * @link https://github.com/hiqdev/omnipay-robokassa * @package omnipay-robokassa * @license MIT * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/) */ error_reporting(E_ALL & ~E_NOTICE); require_once __DIR__ . '/../vendor/autoload.php';
hiqdev/php-merchant-robokassa
tests/_bootstrap.php
PHP
bsd-3-clause
333
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #ifndef RUNTIME_VM_FIELD_TABLE_H_ #define RUNTIME_VM_FIELD_TABLE_H_ #include "platform/assert.h" #include "platform/atomic.h" #include "vm/bitfield.h" #include "vm/class_id.h" #include "vm/globals.h" #include "vm/growable_array.h" #include "vm/tagged_pointer.h" namespace dart { class Isolate; class Field; class FieldInvalidator; class FieldTable { public: explicit FieldTable(Isolate* isolate) : top_(0), capacity_(0), free_head_(-1), table_(nullptr), old_tables_(new MallocGrowableArray<ObjectPtr*>()), isolate_(isolate), is_ready_to_use_(isolate == nullptr) {} ~FieldTable(); bool IsReadyToUse() const; void MarkReadyToUse(); intptr_t NumFieldIds() const { return top_; } intptr_t Capacity() const { return capacity_; } ObjectPtr* table() { return table_; } void FreeOldTables(); // Used by the generated code. static intptr_t FieldOffsetFor(intptr_t field_id); bool IsValidIndex(intptr_t index) const { return index >= 0 && index < top_; } // Returns whether registering this field caused a growth in the backing // store. bool Register(const Field& field, intptr_t expected_field_id = -1); void AllocateIndex(intptr_t index); // Static field elements are being freed only during isolate reload // when initially created static field have to get remapped to point // to an existing static field value. void Free(intptr_t index); ObjectPtr At(intptr_t index, bool concurrent_use = false) const { ASSERT(IsValidIndex(index)); if (concurrent_use) { ObjectPtr* table = reinterpret_cast<const AcqRelAtomic<ObjectPtr*>*>(&table_)->load(); return reinterpret_cast<AcqRelAtomic<ObjectPtr>*>(&table[index])->load(); } else { // There is no concurrent access expected for this field, so we avoid // using atomics. This will allow us to detect via TSAN if there are // racy uses. return table_[index]; } } void SetAt(intptr_t index, ObjectPtr raw_instance, bool concurrent_use = false) { ASSERT(index < capacity_); ObjectPtr* slot = &table_[index]; if (concurrent_use) { reinterpret_cast<AcqRelAtomic<ObjectPtr>*>(slot)->store(raw_instance); } else { // There is no concurrent access expected for this field, so we avoid // using atomics. This will allow us to detect via TSAN if there are // racy uses. *slot = raw_instance; } } FieldTable* Clone(Isolate* for_isolate); void VisitObjectPointers(ObjectPointerVisitor* visitor); static const int kInitialCapacity = 512; static const int kCapacityIncrement = 256; private: friend class GCMarker; friend class MarkingWeakVisitor; friend class Scavenger; friend class ScavengerWeakVisitor; void Grow(intptr_t new_capacity); intptr_t top_; intptr_t capacity_; // -1 if free list is empty, otherwise index of first empty element. Empty // elements are organized into linked list - they contain index of next // element, last element contains -1. intptr_t free_head_; ObjectPtr* table_; // When table_ grows and have to reallocated, keep the old one here // so it will get freed when its are no longer in use. MallocGrowableArray<ObjectPtr*>* old_tables_; // If non-NULL, it will specify the isolate this field table belongs to. // Growing the field table will keep the cached field table on the isolate's // mutator thread up-to-date. Isolate* isolate_; // Whether this field table is ready to use by e.g. registering new static // fields. bool is_ready_to_use_ = false; DISALLOW_COPY_AND_ASSIGN(FieldTable); }; } // namespace dart #endif // RUNTIME_VM_FIELD_TABLE_H_
dart-lang/sdk
runtime/vm/field_table.h
C
bsd-3-clause
3,947
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE36_Absolute_Path_Traversal__char_connect_socket_fopen_45.cpp Label Definition File: CWE36_Absolute_Path_Traversal.label.xml Template File: sources-sink-45.tmpl.cpp */ /* * @description * CWE: 36 Absolute Path Traversal * BadSource: connect_socket Read data using a connect socket (client side) * GoodSource: Full path and file name * Sinks: fopen * BadSink : Open the file named in data using fopen() * Flow Variant: 45 Data flow: data passed as a static global variable from one function to another in the same source file * * */ #include "std_testcase.h" #ifndef _WIN32 #include <wchar.h> #endif #ifdef _WIN32 #include <winsock2.h> #include <windows.h> #include <direct.h> #pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ #define CLOSE_SOCKET closesocket #else /* NOT _WIN32 */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define CLOSE_SOCKET close #define SOCKET int #endif #define TCP_PORT 27015 #define IP_ADDRESS "127.0.0.1" #ifdef _WIN32 #define FOPEN fopen #else #define FOPEN fopen #endif namespace CWE36_Absolute_Path_Traversal__char_connect_socket_fopen_45 { static char * badData; static char * goodG2BData; #ifndef OMITBAD static void badSink() { char * data = badData; { FILE *pFile = NULL; /* POTENTIAL FLAW: Possibly opening a file without validating the file name or path */ pFile = FOPEN(data, "wb+"); if (pFile != NULL) { fclose(pFile); } } } void bad() { char * data; char dataBuffer[FILENAME_MAX] = ""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; char *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = strlen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(char) * (FILENAME_MAX - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(char)] = '\0'; /* Eliminate CRLF */ replace = strchr(data, '\r'); if (replace) { *replace = '\0'; } replace = strchr(data, '\n'); if (replace) { *replace = '\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } badData = data; badSink(); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B() uses the GoodSource with the BadSink */ static void goodG2BSink() { char * data = goodG2BData; { FILE *pFile = NULL; /* POTENTIAL FLAW: Possibly opening a file without validating the file name or path */ pFile = FOPEN(data, "wb+"); if (pFile != NULL) { fclose(pFile); } } } static void goodG2B() { char * data; char dataBuffer[FILENAME_MAX] = ""; data = dataBuffer; #ifdef _WIN32 /* FIX: Use a fixed, full path and file name */ strcat(data, "c:\\temp\\file.txt"); #else /* FIX: Use a fixed, full path and file name */ strcat(data, "/tmp/file.txt"); #endif goodG2BData = data; goodG2BSink(); } void good() { goodG2B(); } #endif /* OMITGOOD */ } /* close namespace */ /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN using namespace CWE36_Absolute_Path_Traversal__char_connect_socket_fopen_45; /* so that we can use good and bad easily */ int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE36_Absolute_Path_Traversal/s01/CWE36_Absolute_Path_Traversal__char_connect_socket_fopen_45.cpp
C++
bsd-3-clause
5,736
"""Forest of trees-based ensemble methods Those methods include random forests and extremely randomized trees. The module structure is the following: - The ``BaseForest`` base class implements a common ``fit`` method for all the estimators in the module. The ``fit`` method of the base ``Forest`` class calls the ``fit`` method of each sub-estimator on random samples (with replacement, a.k.a. bootstrap) of the training set. The init of the sub-estimator is further delegated to the ``BaseEnsemble`` constructor. - The ``ForestClassifier`` and ``ForestRegressor`` base classes further implement the prediction logic by computing an average of the predicted outcomes of the sub-estimators. - The ``RandomForestClassifier`` and ``RandomForestRegressor`` derived classes provide the user with concrete implementations of the forest ensemble method using classical, deterministic ``DecisionTreeClassifier`` and ``DecisionTreeRegressor`` as sub-estimator implementations. - The ``ExtraTreesClassifier`` and ``ExtraTreesRegressor`` derived classes provide the user with concrete implementations of the forest ensemble method using the extremely randomized trees ``ExtraTreeClassifier`` and ``ExtraTreeRegressor`` as sub-estimator implementations. Single and multi-output problems are both handled. """ # Authors: Gilles Louppe <[email protected]> # Brian Holt <[email protected]> # Joly Arnaud <[email protected]> # Fares Hedayati <[email protected]> # # License: BSD 3 clause from __future__ import division from warnings import warn from abc import ABCMeta, abstractmethod import numpy as np from scipy.sparse import issparse from ..base import ClassifierMixin, RegressorMixin from ..externals.joblib import Parallel, delayed from ..externals import six from ..feature_selection.from_model import _LearntSelectorMixin from ..metrics import r2_score from ..preprocessing import OneHotEncoder from ..tree import (DecisionTreeClassifier, DecisionTreeRegressor, ExtraTreeClassifier, ExtraTreeRegressor) from ..tree._tree import DTYPE, DOUBLE from ..utils import check_random_state, check_array, compute_sample_weight from ..utils.validation import DataConversionWarning, NotFittedError from .base import BaseEnsemble, _partition_estimators from ..utils.fixes import bincount __all__ = ["RandomForestClassifier", "RandomForestRegressor", "ExtraTreesClassifier", "ExtraTreesRegressor", "RandomTreesEmbedding"] MAX_INT = np.iinfo(np.int32).max def _parallel_build_trees(tree, forest, X, y, sample_weight, tree_idx, n_trees, verbose=0, class_weight=None): """Private function used to fit a single tree in parallel.""" if verbose > 1: print("building tree %d of %d" % (tree_idx + 1, n_trees)) if forest.bootstrap: n_samples = X.shape[0] if sample_weight is None: curr_sample_weight = np.ones((n_samples,), dtype=np.float64) else: curr_sample_weight = sample_weight.copy() random_state = check_random_state(tree.random_state) indices = random_state.randint(0, n_samples, n_samples) sample_counts = bincount(indices, minlength=n_samples) curr_sample_weight *= sample_counts if class_weight == 'subsample': curr_sample_weight *= compute_sample_weight('auto', y, indices) tree.fit(X, y, sample_weight=curr_sample_weight, check_input=False) tree.indices_ = sample_counts > 0. else: tree.fit(X, y, sample_weight=sample_weight, check_input=False) return tree def _parallel_helper(obj, methodname, *args, **kwargs): """Private helper to workaround Python 2 pickle limitations""" return getattr(obj, methodname)(*args, **kwargs) class BaseForest(six.with_metaclass(ABCMeta, BaseEnsemble, _LearntSelectorMixin)): """Base class for forests of trees. Warning: This class should not be used directly. Use derived classes instead. """ @abstractmethod def __init__(self, base_estimator, n_estimators=10, estimator_params=tuple(), bootstrap=False, oob_score=False, n_jobs=1, random_state=None, verbose=0, warm_start=False, class_weight=None): super(BaseForest, self).__init__( base_estimator=base_estimator, n_estimators=n_estimators, estimator_params=estimator_params) self.bootstrap = bootstrap self.oob_score = oob_score self.n_jobs = n_jobs self.random_state = random_state self.verbose = verbose self.warm_start = warm_start self.class_weight = class_weight def apply(self, X): """Apply trees in the forest to X, return leaf indices. Parameters ---------- X : array-like or sparse matrix, shape = [n_samples, n_features] The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``. Returns ------- X_leaves : array_like, shape = [n_samples, n_estimators] For each datapoint x in X and for each tree in the forest, return the index of the leaf x ends up in. """ X = self._validate_X_predict(X) results = Parallel(n_jobs=self.n_jobs, verbose=self.verbose, backend="threading")( delayed(_parallel_helper)(tree, 'apply', X, check_input=False) for tree in self.estimators_) return np.array(results).T def fit(self, X, y, sample_weight=None): """Build a forest of trees from the training set (X, y). Parameters ---------- X : array-like or sparse matrix of shape = [n_samples, n_features] The training input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csc_matrix``. y : array-like, shape = [n_samples] or [n_samples, n_outputs] The target values (class labels in classification, real numbers in regression). sample_weight : array-like, shape = [n_samples] or None Sample weights. If None, then samples are equally weighted. Splits that would create child nodes with net zero or negative weight are ignored while searching for a split in each node. In the case of classification, splits are also ignored if they would result in any single class carrying a negative weight in either child node. Returns ------- self : object Returns self. """ # Validate or convert input data X = check_array(X, dtype=DTYPE, accept_sparse="csc") if issparse(X): # Pre-sort indices to avoid that each individual tree of the # ensemble sorts the indices. X.sort_indices() # Remap output n_samples, self.n_features_ = X.shape y = np.atleast_1d(y) if y.ndim == 2 and y.shape[1] == 1: warn("A column-vector y was passed when a 1d array was" " expected. Please change the shape of y to " "(n_samples,), for example using ravel().", DataConversionWarning, stacklevel=2) if y.ndim == 1: # reshape is necessary to preserve the data contiguity against vs # [:, np.newaxis] that does not. y = np.reshape(y, (-1, 1)) self.n_outputs_ = y.shape[1] y, expanded_class_weight = self._validate_y_class_weight(y) if getattr(y, "dtype", None) != DOUBLE or not y.flags.contiguous: y = np.ascontiguousarray(y, dtype=DOUBLE) if expanded_class_weight is not None: if sample_weight is not None: sample_weight = sample_weight * expanded_class_weight else: sample_weight = expanded_class_weight # Check parameters self._validate_estimator() if not self.bootstrap and self.oob_score: raise ValueError("Out of bag estimation only available" " if bootstrap=True") random_state = check_random_state(self.random_state) if not self.warm_start: # Free allocated memory, if any self.estimators_ = [] n_more_estimators = self.n_estimators - len(self.estimators_) if n_more_estimators < 0: raise ValueError('n_estimators=%d must be larger or equal to ' 'len(estimators_)=%d when warm_start==True' % (self.n_estimators, len(self.estimators_))) elif n_more_estimators == 0: warn("Warm-start fitting without increasing n_estimators does not " "fit new trees.") else: if self.warm_start and len(self.estimators_) > 0: # We draw from the random state to get the random state we # would have got if we hadn't used a warm_start. random_state.randint(MAX_INT, size=len(self.estimators_)) trees = [] for i in range(n_more_estimators): tree = self._make_estimator(append=False) tree.set_params(random_state=random_state.randint(MAX_INT)) trees.append(tree) # Parallel loop: we use the threading backend as the Cython code # for fitting the trees is internally releasing the Python GIL # making threading always more efficient than multiprocessing in # that case. trees = Parallel(n_jobs=self.n_jobs, verbose=self.verbose, backend="threading")( delayed(_parallel_build_trees)( t, self, X, y, sample_weight, i, len(trees), verbose=self.verbose, class_weight=self.class_weight) for i, t in enumerate(trees)) # Collect newly grown trees self.estimators_.extend(trees) if self.oob_score: self._set_oob_score(X, y) # Decapsulate classes_ attributes if hasattr(self, "classes_") and self.n_outputs_ == 1: self.n_classes_ = self.n_classes_[0] self.classes_ = self.classes_[0] return self @abstractmethod def _set_oob_score(self, X, y): """Calculate out of bag predictions and score.""" def _validate_y_class_weight(self, y): # Default implementation return y, None def _validate_X_predict(self, X): """Validate X whenever one tries to predict, apply, predict_proba""" if self.estimators_ is None or len(self.estimators_) == 0: raise NotFittedError("Estimator not fitted, " "call `fit` before exploiting the model.") return self.estimators_[0]._validate_X_predict(X, check_input=True) @property def feature_importances_(self): """Return the feature importances (the higher, the more important the feature). Returns ------- feature_importances_ : array, shape = [n_features] """ if self.estimators_ is None or len(self.estimators_) == 0: raise NotFittedError("Estimator not fitted, " "call `fit` before `feature_importances_`.") all_importances = Parallel(n_jobs=self.n_jobs, backend="threading")( delayed(getattr)(tree, 'feature_importances_') for tree in self.estimators_) return sum(all_importances) / len(self.estimators_) class ForestClassifier(six.with_metaclass(ABCMeta, BaseForest, ClassifierMixin)): """Base class for forest of trees-based classifiers. Warning: This class should not be used directly. Use derived classes instead. """ @abstractmethod def __init__(self, base_estimator, n_estimators=10, estimator_params=tuple(), bootstrap=False, oob_score=False, n_jobs=1, random_state=None, verbose=0, warm_start=False, class_weight=None): super(ForestClassifier, self).__init__( base_estimator, n_estimators=n_estimators, estimator_params=estimator_params, bootstrap=bootstrap, oob_score=oob_score, n_jobs=n_jobs, random_state=random_state, verbose=verbose, warm_start=warm_start, class_weight=class_weight) def _set_oob_score(self, X, y): """Compute out-of-bag score""" n_classes_ = self.n_classes_ n_samples = y.shape[0] oob_decision_function = [] oob_score = 0.0 predictions = [] for k in range(self.n_outputs_): predictions.append(np.zeros((n_samples, n_classes_[k]))) sample_indices = np.arange(n_samples) for estimator in self.estimators_: mask = np.ones(n_samples, dtype=np.bool) mask[estimator.indices_] = False mask_indices = sample_indices[mask] p_estimator = estimator.predict_proba(X[mask_indices, :], check_input=False) if self.n_outputs_ == 1: p_estimator = [p_estimator] for k in range(self.n_outputs_): predictions[k][mask_indices, :] += p_estimator[k] for k in range(self.n_outputs_): if (predictions[k].sum(axis=1) == 0).any(): warn("Some inputs do not have OOB scores. " "This probably means too few trees were used " "to compute any reliable oob estimates.") decision = (predictions[k] / predictions[k].sum(axis=1)[:, np.newaxis]) oob_decision_function.append(decision) oob_score += np.mean(y[:, k] == np.argmax(predictions[k], axis=1), axis=0) if self.n_outputs_ == 1: self.oob_decision_function_ = oob_decision_function[0] else: self.oob_decision_function_ = oob_decision_function self.oob_score_ = oob_score / self.n_outputs_ def _validate_y_class_weight(self, y): y = np.copy(y) expanded_class_weight = None if self.class_weight is not None: y_original = np.copy(y) self.classes_ = [] self.n_classes_ = [] for k in range(self.n_outputs_): classes_k, y[:, k] = np.unique(y[:, k], return_inverse=True) self.classes_.append(classes_k) self.n_classes_.append(classes_k.shape[0]) if self.class_weight is not None: valid_presets = ('auto', 'subsample') if isinstance(self.class_weight, six.string_types): if self.class_weight not in valid_presets: raise ValueError('Valid presets for class_weight include ' '"auto" and "subsample". Given "%s".' % self.class_weight) if self.warm_start: warn('class_weight presets "auto" or "subsample" are ' 'not recommended for warm_start if the fitted data ' 'differs from the full dataset. In order to use ' '"auto" weights, use compute_class_weight("auto", ' 'classes, y). In place of y you can use a large ' 'enough sample of the full training set target to ' 'properly estimate the class frequency ' 'distributions. Pass the resulting weights as the ' 'class_weight parameter.') if self.class_weight != 'subsample' or not self.bootstrap: if self.class_weight == 'subsample': class_weight = 'auto' else: class_weight = self.class_weight expanded_class_weight = compute_sample_weight(class_weight, y_original) return y, expanded_class_weight def predict(self, X): """Predict class for X. The predicted class of an input sample is a vote by the trees in the forest, weighted by their probability estimates. That is, the predicted class is the one with highest mean probability estimate across the trees. Parameters ---------- X : array-like or sparse matrix of shape = [n_samples, n_features] The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``. Returns ------- y : array of shape = [n_samples] or [n_samples, n_outputs] The predicted classes. """ proba = self.predict_proba(X) if self.n_outputs_ == 1: return self.classes_.take(np.argmax(proba, axis=1), axis=0) else: n_samples = proba[0].shape[0] predictions = np.zeros((n_samples, self.n_outputs_)) for k in range(self.n_outputs_): predictions[:, k] = self.classes_[k].take(np.argmax(proba[k], axis=1), axis=0) return predictions def predict_proba(self, X): """Predict class probabilities for X. The predicted class probabilities of an input sample is computed as the mean predicted class probabilities of the trees in the forest. The class probability of a single tree is the fraction of samples of the same class in a leaf. Parameters ---------- X : array-like or sparse matrix of shape = [n_samples, n_features] The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``. Returns ------- p : array of shape = [n_samples, n_classes], or a list of n_outputs such arrays if n_outputs > 1. The class probabilities of the input samples. The order of the classes corresponds to that in the attribute `classes_`. """ # Check data X = self._validate_X_predict(X) # Assign chunk of trees to jobs n_jobs, _, _ = _partition_estimators(self.n_estimators, self.n_jobs) # Parallel loop all_proba = Parallel(n_jobs=n_jobs, verbose=self.verbose, backend="threading")( delayed(_parallel_helper)(e, 'predict_proba', X, check_input=False) for e in self.estimators_) # Reduce proba = all_proba[0] if self.n_outputs_ == 1: for j in range(1, len(all_proba)): proba += all_proba[j] proba /= len(self.estimators_) else: for j in range(1, len(all_proba)): for k in range(self.n_outputs_): proba[k] += all_proba[j][k] for k in range(self.n_outputs_): proba[k] /= self.n_estimators return proba def predict_log_proba(self, X): """Predict class log-probabilities for X. The predicted class log-probabilities of an input sample is computed as the log of the mean predicted class probabilities of the trees in the forest. Parameters ---------- X : array-like or sparse matrix of shape = [n_samples, n_features] The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``. Returns ------- p : array of shape = [n_samples, n_classes], or a list of n_outputs such arrays if n_outputs > 1. The class probabilities of the input samples. The order of the classes corresponds to that in the attribute `classes_`. """ proba = self.predict_proba(X) if self.n_outputs_ == 1: return np.log(proba) else: for k in range(self.n_outputs_): proba[k] = np.log(proba[k]) return proba class ForestRegressor(six.with_metaclass(ABCMeta, BaseForest, RegressorMixin)): """Base class for forest of trees-based regressors. Warning: This class should not be used directly. Use derived classes instead. """ @abstractmethod def __init__(self, base_estimator, n_estimators=10, estimator_params=tuple(), bootstrap=False, oob_score=False, n_jobs=1, random_state=None, verbose=0, warm_start=False): super(ForestRegressor, self).__init__( base_estimator, n_estimators=n_estimators, estimator_params=estimator_params, bootstrap=bootstrap, oob_score=oob_score, n_jobs=n_jobs, random_state=random_state, verbose=verbose, warm_start=warm_start) def predict(self, X): """Predict regression target for X. The predicted regression target of an input sample is computed as the mean predicted regression targets of the trees in the forest. Parameters ---------- X : array-like or sparse matrix of shape = [n_samples, n_features] The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``. Returns ------- y : array of shape = [n_samples] or [n_samples, n_outputs] The predicted values. """ # Check data X = self._validate_X_predict(X) # Assign chunk of trees to jobs n_jobs, _, _ = _partition_estimators(self.n_estimators, self.n_jobs) # Parallel loop all_y_hat = Parallel(n_jobs=n_jobs, verbose=self.verbose, backend="threading")( delayed(_parallel_helper)(e, 'predict', X, check_input=False) for e in self.estimators_) # Reduce y_hat = sum(all_y_hat) / len(self.estimators_) return y_hat def _set_oob_score(self, X, y): """Compute out-of-bag scores""" n_samples = y.shape[0] predictions = np.zeros((n_samples, self.n_outputs_)) n_predictions = np.zeros((n_samples, self.n_outputs_)) sample_indices = np.arange(n_samples) for estimator in self.estimators_: mask = np.ones(n_samples, dtype=np.bool) mask[estimator.indices_] = False mask_indices = sample_indices[mask] p_estimator = estimator.predict(X[mask_indices, :], check_input=False) if self.n_outputs_ == 1: p_estimator = p_estimator[:, np.newaxis] predictions[mask_indices, :] += p_estimator n_predictions[mask_indices, :] += 1 if (n_predictions == 0).any(): warn("Some inputs do not have OOB scores. " "This probably means too few trees were used " "to compute any reliable oob estimates.") n_predictions[n_predictions == 0] = 1 predictions /= n_predictions self.oob_prediction_ = predictions if self.n_outputs_ == 1: self.oob_prediction_ = \ self.oob_prediction_.reshape((n_samples, )) self.oob_score_ = 0.0 for k in range(self.n_outputs_): self.oob_score_ += r2_score(y[:, k], predictions[:, k]) self.oob_score_ /= self.n_outputs_ class RandomForestClassifier(ForestClassifier): """A random forest classifier. A random forest is a meta estimator that fits a number of decision tree classifiers on various sub-samples of the dataset and use averaging to improve the predictive accuracy and control over-fitting. Parameters ---------- n_estimators : integer, optional (default=10) The number of trees in the forest. criterion : string, optional (default="gini") The function to measure the quality of a split. Supported criteria are "gini" for the Gini impurity and "entropy" for the information gain. Note: this parameter is tree-specific. max_features : int, float, string or None, optional (default="auto") The number of features to consider when looking for the best split: - If int, then consider `max_features` features at each split. - If float, then `max_features` is a percentage and `int(max_features * n_features)` features are considered at each split. - If "auto", then `max_features=sqrt(n_features)`. - If "sqrt", then `max_features=sqrt(n_features)`. - If "log2", then `max_features=log2(n_features)`. - If None, then `max_features=n_features`. Note: the search for a split does not stop until at least one valid partition of the node samples is found, even if it requires to effectively inspect more than ``max_features`` features. Note: this parameter is tree-specific. max_depth : integer or None, optional (default=None) The maximum depth of the tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples. Ignored if ``max_leaf_nodes`` is not None. Note: this parameter is tree-specific. min_samples_split : integer, optional (default=2) The minimum number of samples required to split an internal node. Note: this parameter is tree-specific. min_samples_leaf : integer, optional (default=1) The minimum number of samples in newly created leaves. A split is discarded if after the split, one of the leaves would contain less then ``min_samples_leaf`` samples. Note: this parameter is tree-specific. min_weight_fraction_leaf : float, optional (default=0.) The minimum weighted fraction of the input samples required to be at a leaf node. Note: this parameter is tree-specific. max_leaf_nodes : int or None, optional (default=None) Grow trees with ``max_leaf_nodes`` in best-first fashion. Best nodes are defined as relative reduction in impurity. If None then unlimited number of leaf nodes. If not None then ``max_depth`` will be ignored. Note: this parameter is tree-specific. bootstrap : boolean, optional (default=True) Whether bootstrap samples are used when building trees. oob_score : bool Whether to use out-of-bag samples to estimate the generalization error. n_jobs : integer, optional (default=1) The number of jobs to run in parallel for both `fit` and `predict`. If -1, then the number of jobs is set to the number of cores. random_state : int, RandomState instance or None, optional (default=None) If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`. verbose : int, optional (default=0) Controls the verbosity of the tree building process. warm_start : bool, optional (default=False) When set to ``True``, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new forest. class_weight : dict, list of dicts, "auto", "subsample" or None, optional Weights associated with classes in the form ``{class_label: weight}``. If not given, all classes are supposed to have weight one. For multi-output problems, a list of dicts can be provided in the same order as the columns of y. The "auto" mode uses the values of y to automatically adjust weights inversely proportional to class frequencies in the input data. The "subsample" mode is the same as "auto" except that weights are computed based on the bootstrap sample for every tree grown. For multi-output, the weights of each column of y will be multiplied. Note that these weights will be multiplied with sample_weight (passed through the fit method) if sample_weight is specified. Attributes ---------- estimators_ : list of DecisionTreeClassifier The collection of fitted sub-estimators. classes_ : array of shape = [n_classes] or a list of such arrays The classes labels (single output problem), or a list of arrays of class labels (multi-output problem). n_classes_ : int or list The number of classes (single output problem), or a list containing the number of classes for each output (multi-output problem). feature_importances_ : array of shape = [n_features] The feature importances (the higher, the more important the feature). oob_score_ : float Score of the training dataset obtained using an out-of-bag estimate. oob_decision_function_ : array of shape = [n_samples, n_classes] Decision function computed with out-of-bag estimate on the training set. If n_estimators is small it might be possible that a data point was never left out during the bootstrap. In this case, `oob_decision_function_` might contain NaN. References ---------- .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, 2001. See also -------- DecisionTreeClassifier, ExtraTreesClassifier """ def __init__(self, n_estimators=10, criterion="gini", max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0., max_features="auto", max_leaf_nodes=None, bootstrap=True, oob_score=False, n_jobs=1, random_state=None, verbose=0, warm_start=False, class_weight=None): super(RandomForestClassifier, self).__init__( base_estimator=DecisionTreeClassifier(), n_estimators=n_estimators, estimator_params=("criterion", "max_depth", "min_samples_split", "min_samples_leaf", "min_weight_fraction_leaf", "max_features", "max_leaf_nodes", "random_state"), bootstrap=bootstrap, oob_score=oob_score, n_jobs=n_jobs, random_state=random_state, verbose=verbose, warm_start=warm_start, class_weight=class_weight) self.criterion = criterion self.max_depth = max_depth self.min_samples_split = min_samples_split self.min_samples_leaf = min_samples_leaf self.min_weight_fraction_leaf = min_weight_fraction_leaf self.max_features = max_features self.max_leaf_nodes = max_leaf_nodes class RandomForestRegressor(ForestRegressor): """A random forest regressor. A random forest is a meta estimator that fits a number of classifying decision trees on various sub-samples of the dataset and use averaging to improve the predictive accuracy and control over-fitting. Parameters ---------- n_estimators : integer, optional (default=10) The number of trees in the forest. criterion : string, optional (default="mse") The function to measure the quality of a split. The only supported criterion is "mse" for the mean squared error. Note: this parameter is tree-specific. max_features : int, float, string or None, optional (default="auto") The number of features to consider when looking for the best split: - If int, then consider `max_features` features at each split. - If float, then `max_features` is a percentage and `int(max_features * n_features)` features are considered at each split. - If "auto", then `max_features=n_features`. - If "sqrt", then `max_features=sqrt(n_features)`. - If "log2", then `max_features=log2(n_features)`. - If None, then `max_features=n_features`. Note: the search for a split does not stop until at least one valid partition of the node samples is found, even if it requires to effectively inspect more than ``max_features`` features. Note: this parameter is tree-specific. max_depth : integer or None, optional (default=None) The maximum depth of the tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples. Ignored if ``max_leaf_nodes`` is not None. Note: this parameter is tree-specific. min_samples_split : integer, optional (default=2) The minimum number of samples required to split an internal node. Note: this parameter is tree-specific. min_samples_leaf : integer, optional (default=1) The minimum number of samples in newly created leaves. A split is discarded if after the split, one of the leaves would contain less then ``min_samples_leaf`` samples. Note: this parameter is tree-specific. min_weight_fraction_leaf : float, optional (default=0.) The minimum weighted fraction of the input samples required to be at a leaf node. Note: this parameter is tree-specific. max_leaf_nodes : int or None, optional (default=None) Grow trees with ``max_leaf_nodes`` in best-first fashion. Best nodes are defined as relative reduction in impurity. If None then unlimited number of leaf nodes. If not None then ``max_depth`` will be ignored. Note: this parameter is tree-specific. bootstrap : boolean, optional (default=True) Whether bootstrap samples are used when building trees. oob_score : bool whether to use out-of-bag samples to estimate the generalization error. n_jobs : integer, optional (default=1) The number of jobs to run in parallel for both `fit` and `predict`. If -1, then the number of jobs is set to the number of cores. random_state : int, RandomState instance or None, optional (default=None) If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`. verbose : int, optional (default=0) Controls the verbosity of the tree building process. warm_start : bool, optional (default=False) When set to ``True``, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new forest. Attributes ---------- estimators_ : list of DecisionTreeRegressor The collection of fitted sub-estimators. feature_importances_ : array of shape = [n_features] The feature importances (the higher, the more important the feature). oob_score_ : float Score of the training dataset obtained using an out-of-bag estimate. oob_prediction_ : array of shape = [n_samples] Prediction computed with out-of-bag estimate on the training set. References ---------- .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, 2001. See also -------- DecisionTreeRegressor, ExtraTreesRegressor """ def __init__(self, n_estimators=10, criterion="mse", max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0., max_features="auto", max_leaf_nodes=None, bootstrap=True, oob_score=False, n_jobs=1, random_state=None, verbose=0, warm_start=False): super(RandomForestRegressor, self).__init__( base_estimator=DecisionTreeRegressor(), n_estimators=n_estimators, estimator_params=("criterion", "max_depth", "min_samples_split", "min_samples_leaf", "min_weight_fraction_leaf", "max_features", "max_leaf_nodes", "random_state"), bootstrap=bootstrap, oob_score=oob_score, n_jobs=n_jobs, random_state=random_state, verbose=verbose, warm_start=warm_start) self.criterion = criterion self.max_depth = max_depth self.min_samples_split = min_samples_split self.min_samples_leaf = min_samples_leaf self.min_weight_fraction_leaf = min_weight_fraction_leaf self.max_features = max_features self.max_leaf_nodes = max_leaf_nodes class ExtraTreesClassifier(ForestClassifier): """An extra-trees classifier. This class implements a meta estimator that fits a number of randomized decision trees (a.k.a. extra-trees) on various sub-samples of the dataset and use averaging to improve the predictive accuracy and control over-fitting. Parameters ---------- n_estimators : integer, optional (default=10) The number of trees in the forest. criterion : string, optional (default="gini") The function to measure the quality of a split. Supported criteria are "gini" for the Gini impurity and "entropy" for the information gain. Note: this parameter is tree-specific. max_features : int, float, string or None, optional (default="auto") The number of features to consider when looking for the best split: - If int, then consider `max_features` features at each split. - If float, then `max_features` is a percentage and `int(max_features * n_features)` features are considered at each split. - If "auto", then `max_features=sqrt(n_features)`. - If "sqrt", then `max_features=sqrt(n_features)`. - If "log2", then `max_features=log2(n_features)`. - If None, then `max_features=n_features`. Note: the search for a split does not stop until at least one valid partition of the node samples is found, even if it requires to effectively inspect more than ``max_features`` features. Note: this parameter is tree-specific. max_depth : integer or None, optional (default=None) The maximum depth of the tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples. Ignored if ``max_leaf_nodes`` is not None. Note: this parameter is tree-specific. min_samples_split : integer, optional (default=2) The minimum number of samples required to split an internal node. Note: this parameter is tree-specific. min_samples_leaf : integer, optional (default=1) The minimum number of samples in newly created leaves. A split is discarded if after the split, one of the leaves would contain less then ``min_samples_leaf`` samples. Note: this parameter is tree-specific. min_weight_fraction_leaf : float, optional (default=0.) The minimum weighted fraction of the input samples required to be at a leaf node. Note: this parameter is tree-specific. max_leaf_nodes : int or None, optional (default=None) Grow trees with ``max_leaf_nodes`` in best-first fashion. Best nodes are defined as relative reduction in impurity. If None then unlimited number of leaf nodes. If not None then ``max_depth`` will be ignored. Note: this parameter is tree-specific. bootstrap : boolean, optional (default=False) Whether bootstrap samples are used when building trees. oob_score : bool Whether to use out-of-bag samples to estimate the generalization error. n_jobs : integer, optional (default=1) The number of jobs to run in parallel for both `fit` and `predict`. If -1, then the number of jobs is set to the number of cores. random_state : int, RandomState instance or None, optional (default=None) If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`. verbose : int, optional (default=0) Controls the verbosity of the tree building process. warm_start : bool, optional (default=False) When set to ``True``, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new forest. class_weight : dict, list of dicts, "auto", "subsample" or None, optional Weights associated with classes in the form ``{class_label: weight}``. If not given, all classes are supposed to have weight one. For multi-output problems, a list of dicts can be provided in the same order as the columns of y. The "auto" mode uses the values of y to automatically adjust weights inversely proportional to class frequencies in the input data. The "subsample" mode is the same as "auto" except that weights are computed based on the bootstrap sample for every tree grown. For multi-output, the weights of each column of y will be multiplied. Note that these weights will be multiplied with sample_weight (passed through the fit method) if sample_weight is specified. Attributes ---------- estimators_ : list of DecisionTreeClassifier The collection of fitted sub-estimators. classes_ : array of shape = [n_classes] or a list of such arrays The classes labels (single output problem), or a list of arrays of class labels (multi-output problem). n_classes_ : int or list The number of classes (single output problem), or a list containing the number of classes for each output (multi-output problem). feature_importances_ : array of shape = [n_features] The feature importances (the higher, the more important the feature). oob_score_ : float Score of the training dataset obtained using an out-of-bag estimate. oob_decision_function_ : array of shape = [n_samples, n_classes] Decision function computed with out-of-bag estimate on the training set. If n_estimators is small it might be possible that a data point was never left out during the bootstrap. In this case, `oob_decision_function_` might contain NaN. References ---------- .. [1] P. Geurts, D. Ernst., and L. Wehenkel, "Extremely randomized trees", Machine Learning, 63(1), 3-42, 2006. See also -------- sklearn.tree.ExtraTreeClassifier : Base classifier for this ensemble. RandomForestClassifier : Ensemble Classifier based on trees with optimal splits. """ def __init__(self, n_estimators=10, criterion="gini", max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0., max_features="auto", max_leaf_nodes=None, bootstrap=False, oob_score=False, n_jobs=1, random_state=None, verbose=0, warm_start=False, class_weight=None): super(ExtraTreesClassifier, self).__init__( base_estimator=ExtraTreeClassifier(), n_estimators=n_estimators, estimator_params=("criterion", "max_depth", "min_samples_split", "min_samples_leaf", "min_weight_fraction_leaf", "max_features", "max_leaf_nodes", "random_state"), bootstrap=bootstrap, oob_score=oob_score, n_jobs=n_jobs, random_state=random_state, verbose=verbose, warm_start=warm_start, class_weight=class_weight) self.criterion = criterion self.max_depth = max_depth self.min_samples_split = min_samples_split self.min_samples_leaf = min_samples_leaf self.min_weight_fraction_leaf = min_weight_fraction_leaf self.max_features = max_features self.max_leaf_nodes = max_leaf_nodes class ExtraTreesRegressor(ForestRegressor): """An extra-trees regressor. This class implements a meta estimator that fits a number of randomized decision trees (a.k.a. extra-trees) on various sub-samples of the dataset and use averaging to improve the predictive accuracy and control over-fitting. Parameters ---------- n_estimators : integer, optional (default=10) The number of trees in the forest. criterion : string, optional (default="mse") The function to measure the quality of a split. The only supported criterion is "mse" for the mean squared error. Note: this parameter is tree-specific. max_features : int, float, string or None, optional (default="auto") The number of features to consider when looking for the best split: - If int, then consider `max_features` features at each split. - If float, then `max_features` is a percentage and `int(max_features * n_features)` features are considered at each split. - If "auto", then `max_features=n_features`. - If "sqrt", then `max_features=sqrt(n_features)`. - If "log2", then `max_features=log2(n_features)`. - If None, then `max_features=n_features`. Note: the search for a split does not stop until at least one valid partition of the node samples is found, even if it requires to effectively inspect more than ``max_features`` features. Note: this parameter is tree-specific. max_depth : integer or None, optional (default=None) The maximum depth of the tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples. Ignored if ``max_leaf_nodes`` is not None. Note: this parameter is tree-specific. min_samples_split : integer, optional (default=2) The minimum number of samples required to split an internal node. Note: this parameter is tree-specific. min_samples_leaf : integer, optional (default=1) The minimum number of samples in newly created leaves. A split is discarded if after the split, one of the leaves would contain less then ``min_samples_leaf`` samples. Note: this parameter is tree-specific. min_weight_fraction_leaf : float, optional (default=0.) The minimum weighted fraction of the input samples required to be at a leaf node. Note: this parameter is tree-specific. max_leaf_nodes : int or None, optional (default=None) Grow trees with ``max_leaf_nodes`` in best-first fashion. Best nodes are defined as relative reduction in impurity. If None then unlimited number of leaf nodes. If not None then ``max_depth`` will be ignored. Note: this parameter is tree-specific. bootstrap : boolean, optional (default=False) Whether bootstrap samples are used when building trees. Note: this parameter is tree-specific. oob_score : bool Whether to use out-of-bag samples to estimate the generalization error. n_jobs : integer, optional (default=1) The number of jobs to run in parallel for both `fit` and `predict`. If -1, then the number of jobs is set to the number of cores. random_state : int, RandomState instance or None, optional (default=None) If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`. verbose : int, optional (default=0) Controls the verbosity of the tree building process. warm_start : bool, optional (default=False) When set to ``True``, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new forest. Attributes ---------- estimators_ : list of DecisionTreeRegressor The collection of fitted sub-estimators. feature_importances_ : array of shape = [n_features] The feature importances (the higher, the more important the feature). oob_score_ : float Score of the training dataset obtained using an out-of-bag estimate. oob_prediction_ : array of shape = [n_samples] Prediction computed with out-of-bag estimate on the training set. References ---------- .. [1] P. Geurts, D. Ernst., and L. Wehenkel, "Extremely randomized trees", Machine Learning, 63(1), 3-42, 2006. See also -------- sklearn.tree.ExtraTreeRegressor: Base estimator for this ensemble. RandomForestRegressor: Ensemble regressor using trees with optimal splits. """ def __init__(self, n_estimators=10, criterion="mse", max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0., max_features="auto", max_leaf_nodes=None, bootstrap=False, oob_score=False, n_jobs=1, random_state=None, verbose=0, warm_start=False): super(ExtraTreesRegressor, self).__init__( base_estimator=ExtraTreeRegressor(), n_estimators=n_estimators, estimator_params=("criterion", "max_depth", "min_samples_split", "min_samples_leaf", "min_weight_fraction_leaf", "max_features", "max_leaf_nodes", "random_state"), bootstrap=bootstrap, oob_score=oob_score, n_jobs=n_jobs, random_state=random_state, verbose=verbose, warm_start=warm_start) self.criterion = criterion self.max_depth = max_depth self.min_samples_split = min_samples_split self.min_samples_leaf = min_samples_leaf self.min_weight_fraction_leaf = min_weight_fraction_leaf self.max_features = max_features self.max_leaf_nodes = max_leaf_nodes class RandomTreesEmbedding(BaseForest): """An ensemble of totally random trees. An unsupervised transformation of a dataset to a high-dimensional sparse representation. A datapoint is coded according to which leaf of each tree it is sorted into. Using a one-hot encoding of the leaves, this leads to a binary coding with as many ones as there are trees in the forest. The dimensionality of the resulting representation is ``n_out <= n_estimators * max_leaf_nodes``. If ``max_leaf_nodes == None``, the number of leaf nodes is at most ``n_estimators * 2 ** max_depth``. Parameters ---------- n_estimators : int Number of trees in the forest. max_depth : int The maximum depth of each tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than min_samples_split samples. Ignored if ``max_leaf_nodes`` is not None. min_samples_split : integer, optional (default=2) The minimum number of samples required to split an internal node. min_samples_leaf : integer, optional (default=1) The minimum number of samples in newly created leaves. A split is discarded if after the split, one of the leaves would contain less then ``min_samples_leaf`` samples. min_weight_fraction_leaf : float, optional (default=0.) The minimum weighted fraction of the input samples required to be at a leaf node. max_leaf_nodes : int or None, optional (default=None) Grow trees with ``max_leaf_nodes`` in best-first fashion. Best nodes are defined as relative reduction in impurity. If None then unlimited number of leaf nodes. If not None then ``max_depth`` will be ignored. sparse_output : bool, optional (default=True) Whether or not to return a sparse CSR matrix, as default behavior, or to return a dense array compatible with dense pipeline operators. n_jobs : integer, optional (default=1) The number of jobs to run in parallel for both `fit` and `predict`. If -1, then the number of jobs is set to the number of cores. random_state : int, RandomState instance or None, optional (default=None) If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`. verbose : int, optional (default=0) Controls the verbosity of the tree building process. warm_start : bool, optional (default=False) When set to ``True``, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new forest. Attributes ---------- estimators_ : list of DecisionTreeClassifier The collection of fitted sub-estimators. References ---------- .. [1] P. Geurts, D. Ernst., and L. Wehenkel, "Extremely randomized trees", Machine Learning, 63(1), 3-42, 2006. .. [2] Moosmann, F. and Triggs, B. and Jurie, F. "Fast discriminative visual codebooks using randomized clustering forests" NIPS 2007 """ def __init__(self, n_estimators=10, max_depth=5, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0., max_leaf_nodes=None, sparse_output=True, n_jobs=1, random_state=None, verbose=0, warm_start=False): super(RandomTreesEmbedding, self).__init__( base_estimator=ExtraTreeRegressor(), n_estimators=n_estimators, estimator_params=("criterion", "max_depth", "min_samples_split", "min_samples_leaf", "min_weight_fraction_leaf", "max_features", "max_leaf_nodes", "random_state"), bootstrap=False, oob_score=False, n_jobs=n_jobs, random_state=random_state, verbose=verbose, warm_start=warm_start) self.criterion = 'mse' self.max_depth = max_depth self.min_samples_split = min_samples_split self.min_samples_leaf = min_samples_leaf self.min_weight_fraction_leaf = min_weight_fraction_leaf self.max_features = 1 self.max_leaf_nodes = max_leaf_nodes self.sparse_output = sparse_output def _set_oob_score(self, X, y): raise NotImplementedError("OOB score not supported by tree embedding") def fit(self, X, y=None, sample_weight=None): """Fit estimator. Parameters ---------- X : array-like or sparse matrix, shape=(n_samples, n_features) The input samples. Use ``dtype=np.float32`` for maximum efficiency. Sparse matrices are also supported, use sparse ``csc_matrix`` for maximum efficiency. Returns ------- self : object Returns self. """ self.fit_transform(X, y, sample_weight=sample_weight) return self def fit_transform(self, X, y=None, sample_weight=None): """Fit estimator and transform dataset. Parameters ---------- X : array-like or sparse matrix, shape=(n_samples, n_features) Input data used to build forests. Use ``dtype=np.float32`` for maximum efficiency. Returns ------- X_transformed : sparse matrix, shape=(n_samples, n_out) Transformed dataset. """ # ensure_2d=False because there are actually unit test checking we fail # for 1d. X = check_array(X, accept_sparse=['csc'], ensure_2d=False) if issparse(X): # Pre-sort indices to avoid that each individual tree of the # ensemble sorts the indices. X.sort_indices() rnd = check_random_state(self.random_state) y = rnd.uniform(size=X.shape[0]) super(RandomTreesEmbedding, self).fit(X, y, sample_weight=sample_weight) self.one_hot_encoder_ = OneHotEncoder(sparse=self.sparse_output) return self.one_hot_encoder_.fit_transform(self.apply(X)) def transform(self, X): """Transform dataset. Parameters ---------- X : array-like or sparse matrix, shape=(n_samples, n_features) Input data to be transformed. Use ``dtype=np.float32`` for maximum efficiency. Sparse matrices are also supported, use sparse ``csr_matrix`` for maximum efficiency. Returns ------- X_transformed : sparse matrix, shape=(n_samples, n_out) Transformed dataset. """ return self.one_hot_encoder_.transform(self.apply(X))
mattgiguere/scikit-learn
sklearn/ensemble/forest.py
Python
bsd-3-clause
59,479
#ifndef _ADMIN_MSG_H_ #define _ADMIN_MSG_H_ #include "SmallObject.h" #include <string> using std::string; using sdo::common::CSmallObject; typedef enum { ADMIN_LOGIN_MSG=1, ADMIN_CONNECT_RESULT_MSG=2, ADMIN_RECEIVE_MESSAGE_MSG=3, ADMIN_PEER_CLOSE_MSG=4, ADMIN_SEND_REQUEST_MSG=5, ADMIN_ALL_MSG }EAdminMsgType; typedef struct tagAdminMsg:public CSmallObject { EAdminMsgType m_enType; tagAdminMsg(EAdminMsgType enType):m_enType(enType){} ~tagAdminMsg(){} }SAdminMsg; typedef struct tagAdminLoginMsg:public SAdminMsg { string m_strIp; int m_nPort; string m_strName; string m_strPass; tagAdminLoginMsg():tagAdminMsg(ADMIN_LOGIN_MSG){} }SAdminLoginMsg; typedef struct tagAdminConnectResultMsg:public SAdminMsg { int m_nId; int m_nResult; tagAdminConnectResultMsg():tagAdminMsg(ADMIN_CONNECT_RESULT_MSG){} }SAdminConnectResultMsg; typedef struct tagAdminReceiveMsg:public SAdminMsg { int m_nId; void *m_pBuffer; int m_nLen; tagAdminReceiveMsg():SAdminMsg(ADMIN_RECEIVE_MESSAGE_MSG){} }SAdminReceiveMsg; typedef struct tagAdminPeerCloseMsg:public SAdminMsg { int m_nId; tagAdminPeerCloseMsg():SAdminMsg(ADMIN_PEER_CLOSE_MSG){} }SdminPeerCloseMsg; typedef struct tagAdminRequestMsg:public SAdminMsg { string m_strRequest; tagAdminRequestMsg():tagAdminMsg(ADMIN_SEND_REQUEST_MSG){} }SAdminRequestMsg; #endif
victorzjl/BPE
stack/test/sapadmin/src/AdminMsg.h
C
bsd-3-clause
1,340
/* test 3 - library routines rather than system calls */ #include <sys/types.h> #include <sys/utsname.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <signal.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <stdio.h> #define ITERATIONS 10 #define MAX_ERROR 4 #define SIZE 64 int errct, subtest; char el_weirdo[] = "\n\t\\\e@@!!##\e\e\n\n"; _PROTOTYPE(int main, (int argc, char *argv [])); _PROTOTYPE(void test3a, (void)); _PROTOTYPE(void test3b, (void)); _PROTOTYPE(void test3c, (void)); _PROTOTYPE(void test3d, (void)); _PROTOTYPE(void test3e, (void)); _PROTOTYPE(void quit, (void)); _PROTOTYPE(void e, (int n)); int main(argc, argv) int argc; char *argv[]; { int i, m = 0xFFFF; sync(); if (geteuid() == 0 || getuid() == 0) { printf("Test 3 cannot run as root; test aborted\n"); exit(1); } if (argc == 2) m = atoi(argv[1]); printf("Test 3 "); fflush(stdout); /* have to flush for child's benefit */ system("rm -rf DIR_03; mkdir DIR_03"); chdir("DIR_03"); for (i = 0; i < ITERATIONS; i++) { if (m & 0001) test3a(); if (m & 0002) test3b(); if (m & 0004) test3c(); if (m & 0010) test3d(); if (m & 0020) test3e(); } quit(); return(-1); /* impossible */ } void test3a() { /* Signal set manipulation. */ sigset_t s, s1; subtest = 1; errno = -1000; /* None of these calls set errno. */ if (sigemptyset(&s) != 0) e(1); if (sigemptyset(&s1) != 0) e(2); if (sigaddset(&s, SIGABRT) != 0) e(3); if (sigaddset(&s, SIGALRM) != 0) e(4); if (sigaddset(&s, SIGFPE ) != 0) e(5); if (sigaddset(&s, SIGHUP ) != 0) e(6); if (sigaddset(&s, SIGILL ) != 0) e(7); if (sigaddset(&s, SIGINT ) != 0) e(8); if (sigaddset(&s, SIGKILL) != 0) e(9); if (sigaddset(&s, SIGPIPE) != 0) e(10); if (sigaddset(&s, SIGQUIT) != 0) e(11); if (sigaddset(&s, SIGSEGV) != 0) e(12); if (sigaddset(&s, SIGTERM) != 0) e(13); if (sigaddset(&s, SIGUSR1) != 0) e(14); if (sigaddset(&s, SIGUSR2) != 0) e(15); if (sigismember(&s, SIGABRT) != 1) e(16); if (sigismember(&s, SIGALRM) != 1) e(17); if (sigismember(&s, SIGFPE ) != 1) e(18); if (sigismember(&s, SIGHUP ) != 1) e(19); if (sigismember(&s, SIGILL ) != 1) e(20); if (sigismember(&s, SIGINT ) != 1) e(21); if (sigismember(&s, SIGKILL) != 1) e(22); if (sigismember(&s, SIGPIPE) != 1) e(23); if (sigismember(&s, SIGQUIT) != 1) e(24); if (sigismember(&s, SIGSEGV) != 1) e(25); if (sigismember(&s, SIGTERM) != 1) e(26); if (sigismember(&s, SIGUSR1) != 1) e(27); if (sigismember(&s, SIGUSR2) != 1) e(28); if (sigdelset(&s, SIGABRT) != 0) e(29); if (sigdelset(&s, SIGALRM) != 0) e(30); if (sigdelset(&s, SIGFPE ) != 0) e(31); if (sigdelset(&s, SIGHUP ) != 0) e(32); if (sigdelset(&s, SIGILL ) != 0) e(33); if (sigdelset(&s, SIGINT ) != 0) e(34); if (sigdelset(&s, SIGKILL) != 0) e(35); if (sigdelset(&s, SIGPIPE) != 0) e(36); if (sigdelset(&s, SIGQUIT) != 0) e(37); if (sigdelset(&s, SIGSEGV) != 0) e(38); if (sigdelset(&s, SIGTERM) != 0) e(39); if (sigdelset(&s, SIGUSR1) != 0) e(40); if (sigdelset(&s, SIGUSR2) != 0) e(41); if (s != s1) e(42); if (sigaddset(&s, SIGILL) != 0) e(43); if (s == s1) e(44); if (sigfillset(&s) != 0) e(45); if (sigismember(&s, SIGABRT) != 1) e(46); if (sigismember(&s, SIGALRM) != 1) e(47); if (sigismember(&s, SIGFPE ) != 1) e(48); if (sigismember(&s, SIGHUP ) != 1) e(49); if (sigismember(&s, SIGILL ) != 1) e(50); if (sigismember(&s, SIGINT ) != 1) e(51); if (sigismember(&s, SIGKILL) != 1) e(52); if (sigismember(&s, SIGPIPE) != 1) e(53); if (sigismember(&s, SIGQUIT) != 1) e(54); if (sigismember(&s, SIGSEGV) != 1) e(55); if (sigismember(&s, SIGTERM) != 1) e(56); if (sigismember(&s, SIGUSR1) != 1) e(57); if (sigismember(&s, SIGUSR2) != 1) e(58); /* Test error returns. */ if (sigaddset(&s, -1) != -1) e(59); if (sigaddset(&s, -1) != -1) e(60); if (sigismember(&s, -1) != -1) e(61); if (sigaddset(&s, 10000) != -1) e(62); if (sigaddset(&s, 10000) != -1) e(63); if (sigismember(&s, 10000) != -1) e(64); } void test3b() { /* Test uname. */ struct utsname u; /* contains all kinds of system ids */ subtest = 2; #if 0 errno = -2000; /* None of these calls set errno. */ if (uname(&u) != 0) e(1); if (strcmp(u.sysname, "MINIX") != 0 && strcmp(u.sysname, "Minix") != 0) e(2); /* only one defined */ #endif } void test3c() { /* Test getenv. Asume HOME, PATH, and LOGNAME exist (not strictly required).*/ char *p, name[SIZE]; subtest = 3; errno = -3000; /* None of these calls set errno. */ if ( (p = getenv("HOME")) == NULL) e(1); if (*p != '/') e(2); /* path must be absolute */ if ( (p = getenv("PATH")) == NULL) e(3); if ( (p = getenv("LOGNAME")) == NULL) e(5); strcpy(name, p); /* save it, since getlogin might wipe it out */ p = getlogin(); if (strcmp(p, name) != 0) e(6); /* The following test could fail in a legal POSIX system. However, if it * does, you deserve it to fail. */ if (getenv(el_weirdo) != NULL) e(7); } void test3d() { /* Test ctermid, ttyname, and isatty. */ int fd; char *p, name[L_ctermid]; subtest = 4; errno = -4000; /* None of these calls set errno. */ /* Test ctermid first. */ if ( (p = ctermid(name)) == NULL) e(1); if (strcmp(p, name) != 0) e(2); if (strncmp(p, "/dev/tty", 8) != 0) e(3); /* MINIX convention */ if ( (p = ttyname(0)) == NULL) e(4); if (strncmp(p, "/dev/tty", 8) != 0 && strcmp(p, "/dev/console") != 0) e(5); if ( (p = ttyname(3)) != NULL) e(6); if (ttyname(5000) != NULL) e(7); if ( (fd = creat("T3a", 0777)) < 0) e(8); if (ttyname(fd) != NULL) e(9); if (isatty(0) != 1) e(10); if (isatty(3) != 0) e(11); if (isatty(fd) != 0) e(12); if (close(fd) != 0) e(13); if (ttyname(fd) != NULL) e(14); } void test3e() { /* Test ctermid, ttyname, and isatty. */ subtest = 5; errno = -5000; /* None of these calls set errno. */ if (sysconf(_SC_ARG_MAX) < _POSIX_ARG_MAX) e(1); if (sysconf(_SC_CHILD_MAX) < _POSIX_CHILD_MAX) e(2); if (sysconf(_SC_NGROUPS_MAX) < 0) e(3); if (sysconf(_SC_OPEN_MAX) < _POSIX_OPEN_MAX) e(4); /* The rest are MINIX specific */ if (sysconf(_SC_JOB_CONTROL) >= 0) e(5); /* no job control! */ } void quit() { chdir(".."); system("rm -rf DIR*"); if (errct == 0) { printf("ok\n"); exit(0); } else { printf("%d errors\n", errct); exit(4); } } void e(n) int n; { int err_num = errno; /* save errno in case printf clobbers it */ printf("Subtest %d, error %d errno=%d ", subtest, n, errno); errno = err_num; /* restore errno, just in case */ perror(""); if (errct++ > MAX_ERROR) { printf("Test aborted. Too many errors: "); chdir(".."); system("rm -rf DIR*"); exit(1); } }
aunali1/Minix2.0.4-RPi
test/test3.c
C
bsd-3-clause
6,773
<?php /** * Syntax highlighting using GeSHi, the generic syntax highlighter. * * PHP version 5.3+ * * @category PhD * @package PhD_GeSHi * @author Christian Weiske <[email protected]> * @license http://www.opensource.org/licenses/bsd-license.php BSD Style * @version SVN: $Id: GeSHi.php 293260 2010-01-08 10:41:19Z rquadling $ * @link http://doc.php.net/phd/ */ namespace phpdotnet\phd; /** * Yes, geshi needs to be in your include path * We use the mediawiki geshi extension package. */ require 'MediaWiki/geshi/geshi/geshi.php'; /** * Syntax highlighting using GeSHi, the generic syntax highlighter. * * Note that this highlighter is particularly slow, because * we need to instantiate a new GeSHi instance for each single code * snippet. * * This highlighter uses geshi 1.0.x, the stable version as of * 2009. It will not work with geshi 1.1.x or 1.2.x. * * @example * phd -g 'phpdotnet\phd\Highlighter_GeSHi' -L en -P PEAR -f xhtml -o build/en -d .manual.xml * * @category PhD * @package PhD_GeSHi * @author Christian Weiske <[email protected]> * @license http://www.opensource.org/licenses/bsd-license.php BSD Style * @link http://doc.php.net/phd/ */ class Highlighter_GeSHi extends Highlighter { /** * Create a new highlighter instance for the given format. * * We use a factory so you can return different objects/classes * per format. * * @param string $format Output format (pdf, xhtml, troff, ...) * * @return PhDHighlighter Highlighter object */ public static function factory($format) { if ($format != 'xhtml') { return parent::factory($format); } return new self(); }//public static function factory(..) /** * Highlight a given piece of source code. * Works for xhtml only. Falls back to original highlighter for * other formats. * * @param string $text Text to highlight * @param string $role Source code role to use (php, xml, html, ...) * @param string $format Output format (pdf, xhtml, troff, ...) * * @return string Highlighted code */ public function highlight($text, $role, $format) { $geshi = new \GeSHi($text, $role); $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); $geshi->set_header_type(GESHI_HEADER_DIV); return $geshi->parse_code(); }//public function highlight(..) } /* * vim600: sw=4 ts=4 syntax=php et * vim<600: sw=4 ts=4 */
mikaelkael/zfdocumentor
tools/phpdotnet/phd/Highlighter/GeSHi.php
PHP
bsd-3-clause
2,499
package org.basex.util.hash; import java.util.*; import org.basex.util.*; /** * This is an efficient and memory-saving hash map for storing tokens. * It extends the {@link TokenSet} class. * * @author BaseX Team 2005-15, BSD License * @author Christian Gruen */ public class TokenMap extends TokenSet { /** Hash values. */ private byte[][] values = new byte[Array.CAPACITY][]; /** * Stores the specified key and value. * If the key exists, the value is updated. * @param key key * @param value value */ public final void put(final byte[] key, final byte[] value) { // array bounds are checked before array is resized.. final int i = put(key); values[i] = value; } /** * Convenience function for adding strings, which will be converted to tokens. * @param key key * @param value value */ public final void put(final String key, final String value) { put(Token.token(key), Token.token(value)); } /** * Returns the value for the specified key. * @param key key to be looked up * @return value or {@code null} if nothing was found */ public final byte[] get(final byte[] key) { return key != null ? values[id(key)] : null; } @Override public int delete(final byte[] key) { final int i = super.delete(key); values[i] = null; return i; } /** * Returns a value iterator. * @return iterator */ public final Iterable<byte[]> values() { return new ArrayIterator<>(values, 1, size); } @Override public final void clear() { Arrays.fill(values, null); super.clear(); } @Override protected final void rehash(final int sz) { super.rehash(sz); values = Array.copyOf(values, sz); } @Override public final String toString() { final TokenBuilder tb = new TokenBuilder(); for(int i = 1; i < size; i++) { if(!tb.isEmpty()) tb.add(", "); if(keys[i] != null) tb.add(keys[i]).add(" = ").add(values[i]); } return new TokenBuilder(Util.className(getClass())).add('[').add(tb.finish()). add(']').toString(); } }
ksclarke/basex
basex-core/src/main/java/org/basex/util/hash/TokenMap.java
Java
bsd-3-clause
2,090
#ifndef NT2_CORE_INCLUDE_FUNCTIONS_SCALAR_REPHORZ_HPP_INCLUDED #define NT2_CORE_INCLUDE_FUNCTIONS_SCALAR_REPHORZ_HPP_INCLUDED #include <nt2/core/functions/rephorz.hpp> #endif
hainm/pythran
third_party/nt2/core/include/functions/scalar/rephorz.hpp
C++
bsd-3-clause
177
<link rel="import" href="../../bower_components/polymer/polymer.html"> <link rel="import" href="../../../bower_components/polymer/polymer.html"> <dom-module id="cgroup-edit-form" cgroup="{{cgroup}}"> <template> <style> :host { display: block; } </style> <p>Please describe this group of congregations</p> <paper-input id="name" label="Full name" value="{{cgroup.name}}"> </paper-input> <paper-input id="abbreviation" label="Abbreviation" value="{{cgroup.abbreviation}}"> </paper-input> <paper-button raised on-tap="handle_submit"> Submit </paper-button> </template> <script> (function() { 'use strict'; Polymer({ is: 'cgroup-edit-form', properties: { cgroup: { type: Object, value: {}, notify: true } }, handle_submit: function() { this.fire('submit'); } }); })(); </script> </dom-module>
timblack1/rcl
app/elements/cgroup-edit-form/cgroup-edit-form.html
HTML
bsd-3-clause
992
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>colour.models.dataset.srgb Module &mdash; Colour 0.3.5 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/bootswatch-3.1.0/colour/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> <link rel="stylesheet" href="_static/styles.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', VERSION: '0.3.5', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="_static/js/jquery-fix.js"></script> <script type="text/javascript" src="_static/bootstrap-3.1.0/js/bootstrap.min.js"></script> <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> <link rel="top" title="Colour 0.3.5 documentation" href="index.html" /> <link rel="up" title="colour.models.dataset Package" href="colour.models.dataset.html" /> <link rel="next" title="colour.models.dataset.v_gamut Module" href="colour.models.dataset.v_gamut.html" /> <link rel="prev" title="colour.models.dataset.sony Module" href="colour.models.dataset.sony.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> <meta name="apple-mobile-web-app-capable" content="yes"> </head> <body> <div id="navbar" class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <!-- .btn-navbar is used as the toggle for collapsed navbar content --> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="index.html"><img src="_static/Colour_Logo_Icon_001.png"> Colour&nbsp;0.3</a> <!--<span class="navbar-text navbar-version pull-left"><b>0.3</b></span>--> </div> <div class="collapse navbar-collapse nav-collapse"> <ul class="nav navbar-nav"> <li class="divider-vertical"></li> <li><a href="https://www.colour-science.org">colour-science.org</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-life-ring">&nbsp;Documentation</i><b class="caret"></b></a> <ul class="dropdown-menu"> <li> <a href="api.html" class="fa fa-life-ring">&nbsp;API Reference</a> </li> <li> <a href="http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/colour.ipynb', True)" class="fa fa-book">&nbsp;IPython Notebooks</a> </li> <li> <a href="https://www.colour-science.org/features.php" class="fa fa-lightbulb-o">&nbsp;Features</a> </li> <li> <a href="https://www.colour-science.org/contributing.php"><span class="fa fa-gears">&nbsp;Contributing</span></a> </li> </ul> </li> <li> <a href="colour.models.dataset.sony.html" title="Previous Chapter: colour.models.dataset.sony Module"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; colour.models.da...</span> </a> </li> <li> <a href="colour.models.dataset.v_gamut.html" title="Next Chapter: colour.models.dataset.v_gamut Module"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">colour.models.da... &raquo;</span> </a> </li> </ul> <form class="navbar-form navbar-right" action="search.html" method="get"> <div class="form-group"> <input type="text" name="q" class="form-control" placeholder="Search" /> </div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="section" id="module-colour.models.dataset.srgb"> <span id="colour-models-dataset-srgb-module"></span><h1>colour.models.dataset.srgb Module<a class="headerlink" href="#module-colour.models.dataset.srgb" title="Permalink to this headline">¶</a></h1> <div class="section" id="srgb-colourspace"> <h2>sRGB Colourspace<a class="headerlink" href="#srgb-colourspace" title="Permalink to this headline">¶</a></h2> <p>Defines the <em>sRGB</em> colourspace:</p> <ul class="simple"> <li><a class="reference internal" href="#colour.models.dataset.srgb.sRGB_COLOURSPACE" title="colour.models.dataset.srgb.sRGB_COLOURSPACE"><tt class="xref py py-attr docutils literal"><span class="pre">sRGB_COLOURSPACE</span></tt></a>.</li> </ul> <div class="admonition seealso"> <p class="first admonition-title">See also</p> <p class="last"><a class="reference external" href="http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/models/rgb.ipynb">RGB Colourspaces IPython Notebook</a></p> </div> <p class="rubric">References</p> <table class="docutils footnote" frame="void" id="id1" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label">[1]</td><td>International Telecommunication Union. (2002). Parameter values for the HDTV standards for production and international programme exchange BT Series Broadcasting service. In Recommendation ITU-R BT.709-5 (Vol. 5, pp. 1–32). Retrieved from <a class="reference external" href="http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-5-200204-I!!PDF-E.pdf">http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-5-200204-I!!PDF-E.pdf</a></td></tr> </tbody> </table> <dl class="data"> <dt id="colour.models.dataset.srgb.sRGB_PRIMARIES"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">sRGB_PRIMARIES</tt><em class="property"> = array([[ 0.64, 0.33], [ 0.3 , 0.6 ], [ 0.15, 0.06]])</em><a class="headerlink" href="#colour.models.dataset.srgb.sRGB_PRIMARIES" title="Permalink to this definition">¶</a></dt> <dd><p><em>sRGB</em> colourspace primaries.</p> <p>sRGB_PRIMARIES : ndarray, (3, 2)</p> </dd></dl> <dl class="data"> <dt id="colour.models.dataset.srgb.sRGB_ILLUMINANT"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">sRGB_ILLUMINANT</tt><em class="property"> = u'D65'</em><a class="headerlink" href="#colour.models.dataset.srgb.sRGB_ILLUMINANT" title="Permalink to this definition">¶</a></dt> <dd><p><em>sRGB</em> colourspace whitepoint name as illuminant.</p> <p>sRGB_WHITEPOINT : unicode</p> </dd></dl> <dl class="data"> <dt id="colour.models.dataset.srgb.sRGB_WHITEPOINT"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">sRGB_WHITEPOINT</tt><em class="property"> = (0.31271, 0.32902)</em><a class="headerlink" href="#colour.models.dataset.srgb.sRGB_WHITEPOINT" title="Permalink to this definition">¶</a></dt> <dd><p><em>sRGB</em> colourspace whitepoint.</p> <p>sRGB_WHITEPOINT : tuple</p> </dd></dl> <dl class="data"> <dt id="colour.models.dataset.srgb.sRGB_TO_XYZ_MATRIX"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">sRGB_TO_XYZ_MATRIX</tt><em class="property"> = array([[ 0.41238656, 0.35759149, 0.18045049], [ 0.21263682, 0.71518298, 0.0721802 ], [ 0.01933062, 0.11919716, 0.95037259]])</em><a class="headerlink" href="#colour.models.dataset.srgb.sRGB_TO_XYZ_MATRIX" title="Permalink to this definition">¶</a></dt> <dd><p><em>sRGB</em> colourspace to <em>CIE XYZ</em> tristimulus values matrix.</p> <p>sRGB_TO_XYZ_MATRIX : array_like, (3, 3)</p> </dd></dl> <dl class="data"> <dt id="colour.models.dataset.srgb.XYZ_TO_sRGB_MATRIX"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">XYZ_TO_sRGB_MATRIX</tt><em class="property"> = array([[ 3.24100326, -1.53739899, -0.49861587], [-0.96922426, 1.87592999, 0.04155422], [ 0.05563942, -0.2040112 , 1.05714897]])</em><a class="headerlink" href="#colour.models.dataset.srgb.XYZ_TO_sRGB_MATRIX" title="Permalink to this definition">¶</a></dt> <dd><p><em>CIE XYZ</em> tristimulus values to <em>sRGB</em> colourspace matrix.</p> <p>XYZ_TO_sRGB_MATRIX : array_like, (3, 3)</p> </dd></dl> <dl class="function"> <dt id="colour.models.dataset.srgb.sRGB_TRANSFER_FUNCTION"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">sRGB_TRANSFER_FUNCTION</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#colour.models.dataset.srgb.sRGB_TRANSFER_FUNCTION" title="Permalink to this definition">¶</a></dt> <dd><p>Transfer function from linear to <em>sRGB</em> colourspace.</p> <p>sRGB_TRANSFER_FUNCTION : object</p> </dd></dl> <dl class="function"> <dt id="colour.models.dataset.srgb.sRGB_INVERSE_TRANSFER_FUNCTION"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">sRGB_INVERSE_TRANSFER_FUNCTION</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#colour.models.dataset.srgb.sRGB_INVERSE_TRANSFER_FUNCTION" title="Permalink to this definition">¶</a></dt> <dd><p>Inverse transfer function from <em>sRGB</em> colourspace to linear.</p> <p>sRGB_INVERSE_TRANSFER_FUNCTION : object</p> </dd></dl> <dl class="data"> <dt id="colour.models.dataset.srgb.sRGB_COLOURSPACE"> <tt class="descclassname">colour.models.dataset.srgb.</tt><tt class="descname">sRGB_COLOURSPACE</tt><em class="property"> = &lt;colour.models.rgb.RGB_Colourspace object at 0x2adc37ba8f50&gt;</em><a class="headerlink" href="#colour.models.dataset.srgb.sRGB_COLOURSPACE" title="Permalink to this definition">¶</a></dt> <dd><p><em>sRGB</em> colourspace.</p> <p>sRGB_COLOURSPACE : RGB_Colourspace</p> </dd></dl> </div> </div> </div> </div> </div> <footer class="footer"> <div class="container"> <p class="pull-right"> <a href="#">Back to top</a> </p> <p> &copy; Copyright 2013 - 2015, Colour Developers.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.2.<br/> </p> </div> </footer> </body> </html>
colour-science/colour-science.org
output/api/0.3.5/html/colour.models.dataset.srgb.html
HTML
bsd-3-clause
11,412
C C 3.5.2.2.2 C SUBROUTINE SEQDS I (MSGFL,MESSU,MEMN,MEMSB,SYST,GAPST,VOLNO, I UKEYST,UKEYND,MXTSTB, O NUM,DELT,UNT,NTS,GAPCD, O TABL,TABLR) C C + + + PURPOSE + + + C Process a reference to a time series in a sequential file C C + + + DUMMY ARGUMENTS + + + INTEGER MSGFL,MESSU,MEMSB,MXTSTB, # VOLNO,UKEYST,UKEYND, # NUM,DELT,UNT,NTS,TABL(10,MXTSTB),GAPCD REAL TABLR(10,MXTSTB) CHARACTER*6 MEMN CHARACTER*4 GAPST,SYST C C + + + ARGUMENT DEFINITIONS + + + C MSGFL - fortran unit number of HSPF message file C MESSU - ftn unit no. to be used for printout of messages C MEMN - ??? C MEMSB - ??? C SYST - ??? C GAPST - ??? C VOLNO - ??? C UKEYST - ??? C UKEYND - ??? C MXTSTB - ??? C NUM - ??? C DELT - simulation time interval in minutes C UNT - ??? C NTS - ??? C GAPCD - ??? C TABL - ??? C TABLR - ??? C C + + + COMMON BLOCKS- INTERP3 + + + INCLUDE 'crin3.inc' INCLUDE 'crin3c.inc' C C + + + LOCAL VARIABLES + + + INTEGER CLASS,I0,I2,I4,I6,REC,FMTCOD,K,SFREC,SCLU,SGRP CHARACTER*4 BLNK CHARACTER*6 CHSTR CHARACTER*80 UCIBF C C + + + EQUIVALENCES + + + EQUIVALENCE (CHSTR,CHSTR1) CHARACTER*1 CHSTR1(6) C C + + + FUNCTIONS + + + INTEGER CHKSTR C C + + + EXTERNALS + + + EXTERNAL OMSTI,OMSG,OMSTC,HSCKFL,GETUCI,CHKSTR C C + + + INPUT FORMATS + + + 1000 FORMAT (I4) 1010 FORMAT (A4,A2) C C + + + OUTPUT FORMATS + + + 2010 FORMAT (' BEGIN CHECKING/EXPANDING A SEQUENTIAL FILE REFERENCE') 2020 FORMAT (' END CHECKING/EXPANDING A SEQUENTIAL FILE REFERENCE') C C + + + END SPECIFICATIONS + + + C SCLU= 214 C BLNK= ' ' I0 = 0 I2 = 2 I4 = 4 I6 = 6 IF (OUTLEV .GT. 6) THEN WRITE(MESSU,2010) END IF C NTS = 0 IF (VOLNO .GE. 14) THEN C unit number for the file is valid. C C check output file - if not open, C then open it with a standard name CALL HSCKFL I (VOLNO) C C look up format class. CHSTR= MEMN CLASS= CHKSTR(I6,I6,CHSTR1,FMTKW1) C IF (CLASS .EQ. 0) THEN C error-invalid format class. CALL OMSTI (VOLNO) CHSTR= MEMN CALL OMSTC (I6,CHSTR1) SGRP = 1 CALL OMSG (MESSU,MSGFL,SCLU,SGRP, M ECOUNT) ELSE C check for user supplied format IF (MEMSB .NE. 0) THEN C make sure format is really in the sformats block SFREC= 0 C see if block is present IF (UKEYST .GT. 0) THEN REC= UKEYST 20 CONTINUE CALL GETUCI (I0, M REC, O UCIBF) IF (REC .NE. UKEYND) THEN C check this format code READ(UCIBF,1000,ERR=30) FMTCOD GO TO 40 30 CONTINUE C error - invalid numeric input CHSTR(1:4)= UCIBF(1:4) CALL OMSTC (I4,CHSTR1) SGRP = 6 CALL OMSG (MESSU,MSGFL,SCLU,SGRP, M ECOUNT) FMTCOD= -999 40 CONTINUE IF (FMTCOD .EQ. MEMSB) THEN C a match SFREC= REC END IF END IF IF (SFREC.EQ.0 .AND. REC.NE.UKEYND) GO TO 20 END IF C IF (SFREC .EQ. 0) THEN C error-format not found in formats block or no formats block CALL OMSTI (VOLNO) SGRP = 2 CALL OMSG (MESSU,MSGFL,SCLU,SGRP, M ECOUNT) END IF ELSE C take the default for the format. SFREC= 0 END IF C check for gap value IF (GAPST .EQ. BLNK) THEN C default to gap value of zero GAPCD=0 ELSE CHSTR(1:4)= GAPST GAPCD = CHKSTR(I4,I2,CHSTR1,GAPKW1) IF (GAPCD .EQ. 0) THEN C error-invalid gap value requested. zero assumed. CALL OMSTI (VOLNO) SGRP = 3 CALL OMSG (MESSU,MSGFL,SCLU,SGRP, M ECOUNT) ELSE GAPCD=GAPCD-1 END IF END IF C C check for user supplied units. CHSTR(1:4)= SYST UNT= CHKSTR(I4,I2,CHSTR1,SYSKW1) C IF (SYST .EQ. BLNK) THEN C blank - default to english UNT= 1 END IF IF (UNT .EQ. 0) THEN C error-invalid source units given. CALL OMSTI (VOLNO) CALL OMSTC (I4,CHSTR1) SGRP= 4 CALL OMSG (MESSU,MSGFL,SCLU,SGRP, M ECOUNT) ELSE NTS= 1 NUM= -VOLNO DELT= FMTINF(1,CLASS) TABL(6,NTS)= FMTINF(2,CLASS) C READ(MEMN,1010) (TABL(K,NTS),K=1,2) TABL(3,NTS)= CLASS TABL(4,NTS)= SFREC TABL(5,NTS)= 0 TABLR(8,NTS)= 0.0 TABLR(9,NTS)= 1.0 END IF END IF ELSE C error-invalid unit number. unit number for sequential files C must be >= 14. CALL OMSTI (VOLNO) SGRP = 5 CALL OMSG (MESSU,MSGFL,SCLU,SGRP, M ECOUNT) END IF C IF (OUTLEV .GT. 6) THEN WRITE(MESSU,2020) END IF C RETURN END
kbrannan/PyHSPF
src/hspf13/hrinseq.f
FORTRAN
bsd-3-clause
5,784
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "xfa/fxfa/cxfa_ffexclgroup.h" #include "xfa/fxfa/cxfa_ffapp.h" #include "xfa/fxfa/cxfa_ffdoc.h" #include "xfa/fxfa/cxfa_ffpageview.h" #include "xfa/fxfa/cxfa_ffwidget.h" CXFA_FFExclGroup::CXFA_FFExclGroup(CXFA_Node* pNode) : CXFA_FFWidget(pNode) {} CXFA_FFExclGroup::~CXFA_FFExclGroup() {} void CXFA_FFExclGroup::RenderWidget(CXFA_Graphics* pGS, const CFX_Matrix& matrix, HighlightOption highlight) { if (!HasVisibleStatus()) return; CFX_Matrix mtRotate = GetRotateMatrix(); mtRotate.Concat(matrix); CXFA_FFWidget::RenderWidget(pGS, mtRotate, highlight); }
endlessm/chromium-browser
third_party/pdfium/xfa/fxfa/cxfa_ffexclgroup.cpp
C++
bsd-3-clause
898
/*===========================================================================* * mpeg.h * * * * no comment * * * *===========================================================================*/ /* * Copyright (c) 1993 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ /* * $Header: /home/daf/mpeg/mpgwrite/RCS/mpeg.h,v 1.1 1994/01/07 17:05:21 daf Exp $ * $Log: mpeg.h,v $ * Revision 1.1 1994/01/07 17:05:21 daf * Initial revision * * Revision 1.4 1993/07/22 22:24:23 keving * nothing * * Revision 1.3 1993/07/09 00:17:23 keving * nothing * * Revision 1.2 1993/06/03 21:08:53 keving * nothing * * Revision 1.1 1993/02/17 23:18:20 dwallach * Initial revision * */ /*==============* * HEADER FILES * *==============*/ #include "ansi.h" #include "mtypes.h" #include "frame.h" /*===============================* * EXTERNAL PROCEDURE prototypes * *===============================*/ void SetFramePattern _ANSI_ARGS_((char *pattern)); int32 GenMPEGStream _ANSI_ARGS_((int whichGOP, int frameStart, int frameEnd, int numFrames, FILE *ofp, char *outputFileName)); extern void PrintStartStats _ANSI_ARGS_((int firstFrame, int lastFrame)); extern void IncrementTCTime _ANSI_ARGS_((void)); void SetReferenceFrameType _ANSI_ARGS_((char *type)); boolean NonLocalRefFrame _ANSI_ARGS_((int id)); extern void ReadDecodedRefFrame _ANSI_ARGS_((MpegFrame *frame, int frameNumber)); extern void WriteDecodedFrame _ANSI_ARGS_((MpegFrame *frame)); /*==================* * GLOBAL VARIABLES * *==================*/ extern MpegFrame *frameMemory[3]; extern int32 tc_hrs, tc_min, tc_sec, tc_pict; extern int totalFramesSent; extern int gopSize; extern char *framePattern; extern int framePatternLen;
jaderberg/SailingSim-Matlab
src/mpeg.h
C
bsd-3-clause
2,804
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/dom_storage/dom_storage_context_wrapper.h" #include <string> #include <vector> #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_path.h" #include "base/location.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" #include "content/browser/dom_storage/dom_storage_area.h" #include "content/browser/dom_storage/dom_storage_context_impl.h" #include "content/browser/dom_storage/dom_storage_task_runner.h" #include "content/browser/dom_storage/session_storage_namespace_impl.h" #include "content/browser/level_db_wrapper_impl.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/local_storage_usage_info.h" #include "content/public/browser/session_storage_usage_info.h" namespace content { namespace { const char kLocalStorageDirectory[] = "Local Storage"; const char kSessionStorageDirectory[] = "Session Storage"; void InvokeLocalStorageUsageCallbackHelper( const DOMStorageContext::GetLocalStorageUsageCallback& callback, const std::vector<LocalStorageUsageInfo>* infos) { callback.Run(*infos); } void GetLocalStorageUsageHelper( base::SingleThreadTaskRunner* reply_task_runner, DOMStorageContextImpl* context, const DOMStorageContext::GetLocalStorageUsageCallback& callback) { std::vector<LocalStorageUsageInfo>* infos = new std::vector<LocalStorageUsageInfo>; context->GetLocalStorageUsage(infos, true); reply_task_runner->PostTask( FROM_HERE, base::Bind(&InvokeLocalStorageUsageCallbackHelper, callback, base::Owned(infos))); } void InvokeSessionStorageUsageCallbackHelper( const DOMStorageContext::GetSessionStorageUsageCallback& callback, const std::vector<SessionStorageUsageInfo>* infos) { callback.Run(*infos); } void GetSessionStorageUsageHelper( base::SingleThreadTaskRunner* reply_task_runner, DOMStorageContextImpl* context, const DOMStorageContext::GetSessionStorageUsageCallback& callback) { std::vector<SessionStorageUsageInfo>* infos = new std::vector<SessionStorageUsageInfo>; context->GetSessionStorageUsage(infos); reply_task_runner->PostTask( FROM_HERE, base::Bind(&InvokeSessionStorageUsageCallbackHelper, callback, base::Owned(infos))); } } // namespace DOMStorageContextWrapper::DOMStorageContextWrapper( const base::FilePath& data_path, storage::SpecialStoragePolicy* special_storage_policy) { base::SequencedWorkerPool* worker_pool = BrowserThread::GetBlockingPool(); context_ = new DOMStorageContextImpl( data_path.empty() ? data_path : data_path.AppendASCII(kLocalStorageDirectory), data_path.empty() ? data_path : data_path.AppendASCII(kSessionStorageDirectory), special_storage_policy, new DOMStorageWorkerPoolTaskRunner( worker_pool, worker_pool->GetNamedSequenceToken("dom_storage_primary"), worker_pool->GetNamedSequenceToken("dom_storage_commit"), BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO) .get())); } DOMStorageContextWrapper::~DOMStorageContextWrapper() { } void DOMStorageContextWrapper::GetLocalStorageUsage( const GetLocalStorageUsageCallback& callback) { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&GetLocalStorageUsageHelper, base::ThreadTaskRunnerHandle::Get(), context_, callback)); } void DOMStorageContextWrapper::GetSessionStorageUsage( const GetSessionStorageUsageCallback& callback) { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&GetSessionStorageUsageHelper, base::ThreadTaskRunnerHandle::Get(), context_, callback)); } void DOMStorageContextWrapper::DeleteLocalStorage(const GURL& origin) { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&DOMStorageContextImpl::DeleteLocalStorage, context_, origin)); } void DOMStorageContextWrapper::DeleteSessionStorage( const SessionStorageUsageInfo& usage_info) { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&DOMStorageContextImpl::DeleteSessionStorage, context_, usage_info)); } void DOMStorageContextWrapper::SetSaveSessionStorageOnDisk() { DCHECK(context_.get()); context_->SetSaveSessionStorageOnDisk(); } scoped_refptr<SessionStorageNamespace> DOMStorageContextWrapper::RecreateSessionStorage( const std::string& persistent_id) { return scoped_refptr<SessionStorageNamespace>( new SessionStorageNamespaceImpl(this, persistent_id)); } void DOMStorageContextWrapper::StartScavengingUnusedSessionStorage() { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&DOMStorageContextImpl::StartScavengingUnusedSessionStorage, context_)); } void DOMStorageContextWrapper::SetForceKeepSessionState() { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&DOMStorageContextImpl::SetForceKeepSessionState, context_)); } void DOMStorageContextWrapper::Shutdown() { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&DOMStorageContextImpl::Shutdown, context_)); } void DOMStorageContextWrapper::Flush() { DCHECK(context_.get()); context_->task_runner()->PostShutdownBlockingTask( FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, base::Bind(&DOMStorageContextImpl::Flush, context_)); } void DOMStorageContextWrapper::OpenLocalStorage( const mojo::String& origin, LevelDBObserverPtr observer, mojo::InterfaceRequest<LevelDBWrapper> request) { if (level_db_wrappers_.find(origin) == level_db_wrappers_.end()) { level_db_wrappers_[origin] = make_scoped_ptr(new LevelDBWrapperImpl( origin, base::Bind(&DOMStorageContextWrapper::LevelDBWrapperImplHasNoBindings, base::Unretained(this), origin.get()))); } // TODO(jam): call LevelDB service (once per this object) to open the database // for LocalStorage and keep a pointer to it in this class. Then keep a map // from origins to LevelDBWrapper object. Each call here for the same origin // should use the same LevelDBWrapper object. level_db_wrappers_[origin]->Bind(std::move(request), std::move(observer)); } void DOMStorageContextWrapper::LevelDBWrapperImplHasNoBindings( const std::string& origin) { DCHECK(level_db_wrappers_.find(origin) != level_db_wrappers_.end()); level_db_wrappers_.erase(origin); } } // namespace content
ds-hwang/chromium-crosswalk
content/browser/dom_storage/dom_storage_context_wrapper.cc
C++
bsd-3-clause
7,352
/** * @name $.ui.simplicityPagination * @namespace Pagination widget for simplicityDiscoverySearch. * <p> * Pagination widget bound to the <code>simplicitySearchResponse</code> event. * <p> * The current page can be bound either via an <code>input</code> element or * directly to the <code>simplicityState</code>. * * @example * // Bound directly to simplicityState * &lt;div id="pagination">&lt;/div> * &lt;script type="text/javascript"> * $('#pagination').simplicityPagination(); * &lt;/script> * * @example * // Bound to an input * &lt;input id="page" name="page" /> * &lt;div id="pagination">&lt;/div> * &lt;script type="text/javascript"> * $('#page').simplicityInputs(); * $('#pagination').simplicityPagination({ * input: '#page' * }); * &lt;/script> */ (function ($, window) { $.widget("ui.simplicityPagination", $.ui.simplicityWidget, { /** * Widget options. * * <dl> * <dt>stateElement</dt> * <dd> * The location of the simplicityState widget. Defaults to <code>'body'</code>. * </dd> * <dt>searchElement</dt> * <dd> * The location of the simplicityDiscoverySearch widget. Defaults to <code>'body'</code>. * </dd> * <dt>pageParam</dt> * <dd> * Used when binding directly to the <code>simplicityState</code> and determines which * field the state holds the current page number. Defaults to <code>'page'</code>. * </dd> * <dt>input</dt> * <dd> * When set binds the current page to an <code>input</code> element instead of directly * to the state via <code>pageParam</code>. Defaults to <code>''</code>. * </dd> * <dt>applyClass</dt> * <dd> * Classes to apply to the Next, Prev and Page elements. Defaults to <code>ui-corner-all</code>. * </dd> * <dt>scrollTopSelector</dt> * <dd> * Determines the jQuery selector to apply <code>$(window).scrollTop(0)</code> when * a page changes. Defaults to <code>window</code>. * </dd> * <dt>scrollTopPosition</dt> * <dd> * Determines the scroll top position to use for <code>$(window).scrollTop(0)</code>. Defaults to <code>0</code>. * </dd> * <dt>num_display_entries</dt> * <dd> * Maximum number of pagination links to display. * Setting to <code>0</code> will trim the navigation down to simply, "Previous" and "Next" links. * Use an odd number so the current page will be displayed in the center of the * page links when there are more than <code>num_display_entries</code> pages. Defaults to <code>11</code>. * </dd> * <dt>num_edge_entries</dt> * <dd> * Number of page links to show at the min and max range regardless of other constraints. * If this number is set to 1, then links to the first and the last page are shown regardless of the current page * and the visibility constraints set by num_display_entries. Setting to a larger number shows more links. * Defaults to <code>0</code>. * </dd> * <dt>link_to</dt> * <dd> * <code>href</code> template for the pagination links. The special value <code>__id__</code> will be replaced by the * page number. Defaults to <code>#</code>. * </dd> * <dt>prev_text</dt> * <dd> * Text for the "previous" link. Setting to an empty string will omit the link. Defaults to <code>Prev</code>. * </dd> * <dt>next_text</dt> * Text for the "next" link. Setting to an empty string will omit the link. Defaults to <code>Next</code>. * <dd> * </dd> * <dt>ellipse_text</dt> * <dd> * When there is a gap between the numbers created by num_edge_entries and the displayed number interval, * this text is inserted into the gap (in a span tag). Setting to an empty string omits the additional tag. * Defaults to <code>...</code>. * </dd> * <dt>prev_show_always</dt> * <dd> * When set to false, the "previous"-link is only shown if there is a previous page. Defaults to <code>true</code>. * </dd> * <dt>next_show_always</dt> * <dd> * When set to false, the "next"-link is only shown if there is a next page. Defaults to <code>true</code>. * </dd> * <dt>debug</dt> * <dd> * Enable logging of key events to <code>console.log</code>. Defaults to <code>false</code>. * </dd> * </dl> * @name $.ui.simplicityPagination.options */ options : { stateElement: 'body', searchElement: 'body', pageParam: 'page', input: '', applyClass: 'ui-corner-all', scrollTopSelector: window, scrollTopPosition: 0, // for compatibility with jquery.pagination num_display_entries: 11, num_edge_entries: 0, link_to: '#', prev_text: 'Prev', next_text: 'Next', ellipse_text: '...', prev_show_always: true, next_show_always: true, debug: false }, _create : function () { this ._addClass('ui-simplicity-pagination ui-helper-clearfix') ._bind(this.options.searchElement, 'simplicitySearchResponse', this._searchResponseHandler) ._bind(this.options.stateElement, 'simplicityStateReset', this._stateResetHandler) ._bind(this.element, 'setPage', this.setPage) ._bind(this.element, 'prevPage', this.prevPage) ._bind(this.element, 'nextPage', this.nextPage); this._currentPage = 0; }, /** * Get the current page - 1 based. * * @name $.ui.simplicityPagination.getPage * @function */ getPage: function () { return this._currentPage + 1; }, /** * Move to a specific page in the results. Causes a new search. * * @name $.ui.simplicityPagination.setPage * @function */ setPage: function (page1) { this._setPage(page1 - 1); }, /** * Move to the next page in the results. Causes a new search if the last search indicated that there will be a next page. * * @name $.ui.simplicityPagination.nextPage * @function */ nextPage: function () { this._setPage(this.getPage()); }, /** * Move to the previous page in the results. Causes a new search if the current page is not the first page. * * @name $.ui.simplicityPagination.prevPage * @function */ prevPage: function () { this._setPage(this.getPage() - 2); }, /** * Event handler for the <code>simplicitySearchResponse</code> event. Recreates * the pagination widget to reflect the current search response. * * @name $.ui.simplicityPagination._searchResponseHandler * @function * @private */ _searchResponseHandler: function (evt, searchResponse) { var target = $('<div/>'); if (searchResponse) { var discoveryResponse = searchResponse._discovery || {}; var resultSet = discoveryResponse.response || {startIndex: 0, pageSize: 0, totalSize: 0}; this._numPages = Math.ceil(resultSet.totalSize / resultSet.pageSize); this._currentPage = resultSet.startIndex / resultSet.pageSize; try { this._ignoreCallback = true; var startEnd = this._getStartEnd(); var start = startEnd[0]; var end = startEnd[1]; if (this.options.prev_text && (this.options.prev_show_always || this._currentPage > 0)) { target.append(this._makeLink(this._currentPage - 1, this.options.prev_text, 'ui-simplicity-pagination-prev')); } if (start > 0 && this.options.num_edge_entries > 0) { var lowEnd = Math.min(this.options.num_edge_entries, start); this._makeLinks(target, 0, lowEnd, 'ui-simplicity-pagination-sp'); if (this.options.ellipse_text && this.options.num_edge_entries < start) { $('<span/>').text(this.options.ellipse_text).appendTo(target); } } this._makeLinks(target, start, end); if (end < this._numPages && this.options.num_edge_entries > 0) { if (this.options.ellipse_text && this._numPages - this.options.num_edge_entries > end) { $('<span/>').text(this.options.ellipse_text).appendTo(target); } var startHigh = Math.max(this._numPages - this.options.num_edge_entries, end); this._makeLinks(target, startHigh, this._numPages, 'ui-simplicity-pagination-ep'); } if (this.options.next_text && (this.options.next_show_always || this._currentPage < this._numPages - 1)) { target.append(this._makeLink(this._currentPage + 1, this.options.next_text, 'ui-simplicity-pagination-next')); } this.element.html(target.contents()); } finally { this._ignoreCallback = false; } } }, /** * Helper that makes a range of pagination links, appending them to the parent. * * @name $.ui.simplicityPagination._makeLinks * @function * @private */ _makeLinks: function (parent, start, end, classes) { var i = start; for (; i < end; i += 1) { this._makeLink(i, i + 1, classes).appendTo(parent); } }, /** * Helper that makes a pagination link. All element event handlers and data are set in this method, so returned link is ready * to be used. * * @name $.ui.simplicityPagination._makeLink * @function * @private */ _makeLink: function (page, text, classes) { if (page < 0) { page = 0; } else if (page >= this._numPages) { page = this._numPages - 1; } var result = $('<a/>'); if (page === this._currentPage) { result = $('<span/>').addClass('ui-simplicity-pagination-current ui-priority-primary').text(text); } else { result = $('<a/>') .attr('href', this.options.link_to.replace(/__id__/, page)) .text(text) .addClass('ui-state-default') .click($.proxy(this._paginationCallback, this)); } if (classes) { result.addClass(classes); } result.addClass(this.options.applyClass); result.data('page', page); if (page === this._currentPage) { cssClass = (result.hasClass('ui-simplicity-pagination-prev') || result.hasClass('ui-simplicity-pagination-next')) ? 'ui-state-disabled' : 'ui-state-active'; result.addClass(cssClass); } return result; }, /** * Calculates the range of pagination links that might be displayed based on <code>num_display_entries</code>, * <code>currentPage</code>, and <code>numPages</code>. * * @name $.ui.simplicityPagination._getStartEnd * @function * @private */ _getStartEnd: function () { var halfNumEntries = Math.floor(this.options.num_display_entries / 2); var max = this._numPages - this.options.num_display_entries; var start = 0; if (this._currentPage > halfNumEntries) { start = Math.max(Math.min(this._currentPage - halfNumEntries, max), 0); } var end = 0; if (this._currentPage > halfNumEntries) { end = Math.min(this._currentPage + halfNumEntries + this.options.num_display_entries % 2, this._numPages); } else { end = Math.min(this.options.num_display_entries, this._numPages); } return [start, end]; }, /** * Callback for when a pagination link is clicked. * * @name $.ui.simplicityPagination._paginationCallback * @function * @private */ _paginationCallback: function (evt) { var page = $(evt.target).data('page'); this._setPage(page); return false; }, /** * Changes the underlying search to reflect the requested page if page is different from the current page. Page is zero based. * * @name $.ui.simplicityPagination._setPage * @function * @private */ _setPage: function (page0) { if (!this._ignoreCallback && page0 !== this._currentPage && page0 >= 0) { if (this.options.scrollTopSelector !== '') { $(this.options.scrollTopSelector).scrollTop(this.options.scrollTopPosition); } if (this.options.input !== '') { // Store the page in an input $(this.options.input).val(page0 + 1); $(this.options.input).change(); } else { // Store the page directly in the search state var state = $(this.options.stateElement).simplicityState('state'); state[this.options.pageParam] = String(page0 + 1); $(this.options.stateElement).simplicityState('state', state); } if (this.options.searchElement !== '') { if (false === $(this.options.searchElement).simplicityDiscoverySearch('option', 'searchOnStateChange')) { $(this.options.searchElement).simplicityDiscoverySearch('search'); } } } }, /** * Event handler for the <code>simplicityStateReset</code> event. Resets the current page * if the <code>pageParam</code> option is set. * * @name $.ui.simplicityPagination._stateResetHandler * @function * @private */ _stateResetHandler: function (evt, state) { if (this.options.input === '') { if (this.options.debug) { console.log('simplicityPagination: Resetting state parameter', name, 'for', this.element); } delete state[this.options.pageParam]; } } }); }(jQuery, window));
shebiki/simplicity
js/ui.simplicityPagination.js
JavaScript
bsd-3-clause
13,785
/********************************************************************* * Copyright 1993, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. * $Header: /upc/share/CVS/netcdf-3/libsrc4/nc4dispatch.c,v 1.5 2010/05/27 02:19:37 dmh Exp $ *********************************************************************/ #include <stdlib.h> #include "nc.h" #include "ncdispatch.h" #include "nc4dispatch.h" NC_Dispatch NC4_dispatcher = { NC_DISPATCH_NC4, NC4_new_nc, NC4_create, NC4_open, NC4_redef, NC4__enddef, NC4_sync, NC4_abort, NC4_close, NC4_set_fill, NC4_inq_base_pe, NC4_set_base_pe, NC4_inq_format, NC4_inq, NC4_inq_type, NC4_def_dim, NC4_inq_dimid, NC4_inq_dim, NC4_inq_unlimdim, NC4_rename_dim, NC4_inq_att, NC4_inq_attid, NC4_inq_attname, NC4_rename_att, NC4_del_att, NC4_get_att, NC4_put_att, NC4_def_var, NC4_inq_varid, NC4_rename_var, NC4_get_vara, NC4_put_vara, NCDEFAULT_get_vars, NCDEFAULT_put_vars, NCDEFAULT_get_varm, NCDEFAULT_put_varm, NC4_inq_var_all, NC4_show_metadata, NC4_inq_unlimdims, NC4_var_par_access, NC4_inq_ncid, NC4_inq_grps, NC4_inq_grpname, NC4_inq_grpname_full, NC4_inq_grp_parent, NC4_inq_grp_full_ncid, NC4_inq_varids, NC4_inq_dimids, NC4_inq_typeids, NC4_inq_type_equal, NC4_def_grp, NC4_inq_user_type, NC4_inq_typeid, NC4_def_compound, NC4_insert_compound, NC4_insert_array_compound, NC4_inq_compound_field, NC4_inq_compound_fieldindex, NC4_def_vlen, NC4_put_vlen_element, NC4_get_vlen_element, NC4_def_enum, NC4_insert_enum, NC4_inq_enum_member, NC4_inq_enum_ident, NC4_def_opaque, NC4_def_var_deflate, NC4_def_var_fletcher32, NC4_def_var_chunking, NC4_def_var_fill, NC4_def_var_endian, NC4_set_var_chunk_cache, NC4_get_var_chunk_cache, }; int NC4_initialize(void) { NC4_dispatch_table = &NC4_dispatcher; return NC_NOERR; }
hlzz/dotfiles
graphics/VTK-7.0.0/ThirdParty/netcdf/vtknetcdf/libsrc4/nc4dispatch.c
C
bsd-3-clause
1,925
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_strncpy_14.c Label Definition File: CWE195_Signed_to_Unsigned_Conversion_Error.label.xml Template File: sources-sink-14.tmpl.c */ /* * @description * CWE: 195 Signed to Unsigned Conversion Error * BadSource: fscanf Read data from the console using fscanf() * GoodSource: Positive integer * Sink: strncpy * BadSink : Copy strings using strncpy() with the length of data * Flow Variant: 14 Control flow: if(globalFive==5) and if(globalFive!=5) * * */ #include "std_testcase.h" #ifndef OMITBAD void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_strncpy_14_bad() { int data; /* Initialize data */ data = -1; if(globalFive==5) { /* POTENTIAL FLAW: Read data from the console using fscanf() */ fscanf(stdin, "%d", &data); } { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B1() - use goodsource and badsink by changing the globalFive==5 to globalFive!=5 */ static void goodG2B1() { int data; /* Initialize data */ data = -1; if(globalFive!=5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Use a positive integer less than &InitialDataSize&*/ data = 100-1; } { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the if statement */ static void goodG2B2() { int data; /* Initialize data */ data = -1; if(globalFive==5) { /* FIX: Use a positive integer less than &InitialDataSize&*/ data = 100-1; } { char source[100]; char dest[100] = ""; memset(source, 'A', 100-1); source[100-1] = '\0'; if (data < 100) { /* POTENTIAL FLAW: data is interpreted as an unsigned int - if its value is negative, * the sign conversion could result in a very large number */ strncpy(dest, source, data); dest[data] = '\0'; /* strncpy() does not always NULL terminate */ } printLine(dest); } } void CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_strncpy_14_good() { goodG2B1(); goodG2B2(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_strncpy_14_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_strncpy_14_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE195_Signed_to_Unsigned_Conversion_Error/s01/CWE195_Signed_to_Unsigned_Conversion_Error__fscanf_strncpy_14.c
C
bsd-3-clause
4,205
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>茶叶商城管理系统_首页</title> <link rel="stylesheet" href="css/reset.css" /> <link rel="stylesheet" href="css/admin.css" /> <script type="text/javascript" src="js/jquery.min.js" ></script> <!--[if IE]> <script src="js/html5.js"></script> <script src="js/selectivizr.js"></script> <![endif]--> </head> <body> <div class="container adminIndex"> <?php include('adminhead.php'); ?> <div class="adminIndex-con"> <div class="adminCon-left"> <?php $admin_cur="national"; include('adminLeftMenu.php'); ?> </div> <div class="adminCon-right"> <div class="seller"> <div class="seller-head"> </div> <div class="national"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td>序号</td> <td>区域名称</td> <td>父类ID</td> <td>状态</td> </tr> <tr> <td>1</td> <td>广东省</td> <td>12</td> <td>1</td> </tr> <tr> <td>1</td> <td>广东省</td> <td>12</td> <td>1</td> </tr> </table> </div> </div> <ul class="adminpage"> <li class="adminpage-first"><a href=""><img src="img/u107.png" /></a></li> <li class="adminpage-prev"><a href=""><img src="img/u105.png" /></a></li> <li><a href="">1</a></li> <li class="active"><a href="">2</a></li> <li class="adminpage-point"><a href="">...</a></li> <li><a href="">45</a></li> <li><a href="">46</a></li> <li class="adminpage-next"><a href=""><img src="img/u111.png" /></a></li> <li class="adminpage-last"><a href=""><img src="img/u109.png" /></a></li> <li class="adminpage-search"><input type="text" /><a href="">GO</a></li> </ul> </div> </div> </div> <!--<div class="discount-fixed seller-fixed" id="seller-fixed"> <div class="dis-close">×</div> <div class="dis-head">添加管理员</div> <div class="dis-con"> <form> <input type="text" placeholder="用户名" /> <input type="password" placeholder="密码" /> <input type="text" placeholder="手机号码" /> <input type="text" placeholder="角色" /> <input type="submit" value="确定" class="dis-btn" /> </form> </div> </div>--> <!--<div class="discount-fixed seller-fixed" id="sellered-fixed1"> <div class="dis-close">×</div> <div class="dis-head">编辑商家资料</div> <div class="dis-con"> <form> <input type="text" value="苏宁预购" /> <input type="text" value="http://www.baidu.com" /> <input type="text" value="黄哈哈" /> <input type="text" value="154414421" /> <input type="text" value="江苏南京" /> <textarea>苏宁易购,是苏宁电器旗下新一代B2C网上购物平台,现已覆盖传统家电、3C电器、日用百货等品类。2011年,苏宁易购将强化虚拟网络与实体店面的同步发展,不断提升网络市场份额。</textarea> <input type="submit" value="提交保存" class="dis-btn" /> </form> </div> </div>--> <script type="text/javascript" src="js/admin.js" ></script> </body> </html>
jaybril/www.mimgpotea.com
网站相关资料/tea/backstage/nationalarea.php
PHP
bsd-3-clause
3,424
"""Conversion tool from CTF to FIF.""" # Author: Eric Larson <larson.eric.d<gmail.com> # # License: BSD (3-clause) import os from os import path as op import numpy as np from ...utils import verbose, logger from ...externals.six import string_types from ..base import BaseRaw from ..utils import _mult_cal_one, _blk_read_lims from .res4 import _read_res4, _make_ctf_name from .hc import _read_hc from .eeg import _read_eeg, _read_pos from .trans import _make_ctf_coord_trans_set from .info import _compose_meas_info from .constants import CTF def read_raw_ctf(directory, system_clock='truncate', preload=False, verbose=None): """Raw object from CTF directory. Parameters ---------- directory : str Path to the KIT data (ending in ``'.ds'``). system_clock : str How to treat the system clock. Use "truncate" (default) to truncate the data file when the system clock drops to zero, and use "ignore" to ignore the system clock (e.g., if head positions are measured multiple times during a recording). preload : bool or str (default False) Preload data into memory for data manipulation and faster indexing. If True, the data will be preloaded into memory (fast, requires large amount of memory). If preload is a string, preload is the file name of a memory-mapped file which is used to store the data on the hard drive (slower, requires less memory). verbose : bool, str, int, or None If not None, override default verbose level (see :func:`mne.verbose` and :ref:`Logging documentation <tut_logging>` for more). Returns ------- raw : instance of RawCTF The raw data. See Also -------- mne.io.Raw : Documentation of attribute and methods. Notes ----- .. versionadded:: 0.11 """ return RawCTF(directory, system_clock, preload=preload, verbose=verbose) class RawCTF(BaseRaw): """Raw object from CTF directory. Parameters ---------- directory : str Path to the KIT data (ending in ``'.ds'``). system_clock : str How to treat the system clock. Use "truncate" (default) to truncate the data file when the system clock drops to zero, and use "ignore" to ignore the system clock (e.g., if head positions are measured multiple times during a recording). preload : bool or str (default False) Preload data into memory for data manipulation and faster indexing. If True, the data will be preloaded into memory (fast, requires large amount of memory). If preload is a string, preload is the file name of a memory-mapped file which is used to store the data on the hard drive (slower, requires less memory). verbose : bool, str, int, or None If not None, override default verbose level (see :func:`mne.verbose` and :ref:`Logging documentation <tut_logging>` for more). See Also -------- mne.io.Raw : Documentation of attribute and methods. """ @verbose def __init__(self, directory, system_clock='truncate', preload=False, verbose=None): # noqa: D102 # adapted from mne_ctf2fiff.c if not isinstance(directory, string_types) or \ not directory.endswith('.ds'): raise TypeError('directory must be a directory ending with ".ds"') if not op.isdir(directory): raise ValueError('directory does not exist: "%s"' % directory) known_types = ['ignore', 'truncate'] if not isinstance(system_clock, string_types) or \ system_clock not in known_types: raise ValueError('system_clock must be one of %s, not %s' % (known_types, system_clock)) logger.info('ds directory : %s' % directory) res4 = _read_res4(directory) # Read the magical res4 file coils = _read_hc(directory) # Read the coil locations eeg = _read_eeg(directory) # Read the EEG electrode loc info # Investigate the coil location data to get the coordinate trans coord_trans = _make_ctf_coord_trans_set(res4, coils) digs = _read_pos(directory, coord_trans) # Compose a structure which makes fiff writing a piece of cake info = _compose_meas_info(res4, coils, coord_trans, eeg) info['dig'] += digs # Determine how our data is distributed across files fnames = list() last_samps = list() raw_extras = list() while(True): suffix = 'meg4' if len(fnames) == 0 else ('%d_meg4' % len(fnames)) meg4_name = _make_ctf_name(directory, suffix, raise_error=False) if meg4_name is None: break # check how much data is in the file sample_info = _get_sample_info(meg4_name, res4, system_clock) if sample_info['n_samp'] == 0: break if len(fnames) == 0: info['buffer_size_sec'] = \ sample_info['block_size'] / info['sfreq'] fnames.append(meg4_name) last_samps.append(sample_info['n_samp'] - 1) raw_extras.append(sample_info) first_samps = [0] * len(last_samps) super(RawCTF, self).__init__( info, preload, first_samps=first_samps, last_samps=last_samps, filenames=fnames, raw_extras=raw_extras, orig_format='int', verbose=verbose) @verbose def _read_segment_file(self, data, idx, fi, start, stop, cals, mult): """Read a chunk of raw data.""" si = self._raw_extras[fi] offset = 0 trial_start_idx, r_lims, d_lims = _blk_read_lims(start, stop, int(si['block_size'])) with open(self._filenames[fi], 'rb') as fid: for bi in range(len(r_lims)): samp_offset = (bi + trial_start_idx) * si['res4_nsamp'] n_read = min(si['n_samp_tot'] - samp_offset, si['block_size']) # read the chunk of data pos = CTF.HEADER_SIZE pos += samp_offset * si['n_chan'] * 4 fid.seek(pos, 0) this_data = np.fromfile(fid, '>i4', count=si['n_chan'] * n_read) this_data.shape = (si['n_chan'], n_read) this_data = this_data[:, r_lims[bi, 0]:r_lims[bi, 1]] data_view = data[:, d_lims[bi, 0]:d_lims[bi, 1]] _mult_cal_one(data_view, this_data, idx, cals, mult) offset += n_read def _get_sample_info(fname, res4, system_clock): """Determine the number of valid samples.""" logger.info('Finding samples for %s: ' % (fname,)) if CTF.SYSTEM_CLOCK_CH in res4['ch_names']: clock_ch = res4['ch_names'].index(CTF.SYSTEM_CLOCK_CH) else: clock_ch = None for k, ch in enumerate(res4['chs']): if ch['ch_name'] == CTF.SYSTEM_CLOCK_CH: clock_ch = k break with open(fname, 'rb') as fid: fid.seek(0, os.SEEK_END) st_size = fid.tell() fid.seek(0, 0) if (st_size - CTF.HEADER_SIZE) % (4 * res4['nsamp'] * res4['nchan']) != 0: raise RuntimeError('The number of samples is not an even multiple ' 'of the trial size') n_samp_tot = (st_size - CTF.HEADER_SIZE) // (4 * res4['nchan']) n_trial = n_samp_tot // res4['nsamp'] n_samp = n_samp_tot if clock_ch is None: logger.info(' System clock channel is not available, assuming ' 'all samples to be valid.') elif system_clock == 'ignore': logger.info(' System clock channel is available, but ignored.') else: # use it logger.info(' System clock channel is available, checking ' 'which samples are valid.') for t in range(n_trial): # Skip to the correct trial samp_offset = t * res4['nsamp'] offset = CTF.HEADER_SIZE + (samp_offset * res4['nchan'] + (clock_ch * res4['nsamp'])) * 4 fid.seek(offset, 0) this_data = np.fromstring(fid.read(4 * res4['nsamp']), '>i4') if len(this_data) != res4['nsamp']: raise RuntimeError('Cannot read data for trial %d' % (t + 1)) end = np.where(this_data == 0)[0] if len(end) > 0: n_samp = samp_offset + end[0] break if n_samp < res4['nsamp']: n_trial = 1 logger.info(' %d x %d = %d samples from %d chs' % (n_trial, n_samp, n_samp, res4['nchan'])) else: n_trial = n_samp // res4['nsamp'] n_omit = n_samp_tot - n_samp n_samp = n_trial * res4['nsamp'] logger.info(' %d x %d = %d samples from %d chs' % (n_trial, res4['nsamp'], n_samp, res4['nchan'])) if n_omit != 0: logger.info(' %d samples omitted at the end' % n_omit) return dict(n_samp=n_samp, n_samp_tot=n_samp_tot, block_size=res4['nsamp'], n_trial=n_trial, res4_nsamp=res4['nsamp'], n_chan=res4['nchan'])
nicproulx/mne-python
mne/io/ctf/ctf.py
Python
bsd-3-clause
9,502
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__char_listen_socket_ifstream_64a.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-64a.tmpl.cpp */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: listen_socket Read data using a listen socket (server side) * GoodSource: Use a fixed file name * Sinks: ifstream * BadSink : Open the file named in data using ifstream::open() * Flow Variant: 64 Data flow: void pointer to data passed from one function to another in different source files * * */ #include "std_testcase.h" #ifdef _WIN32 #define BASEPATH "c:\\temp\\" #else #include <wchar.h> #define BASEPATH "/tmp/" #endif #ifdef _WIN32 #include <winsock2.h> #include <windows.h> #include <direct.h> #pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ #define CLOSE_SOCKET closesocket #else #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define CLOSE_SOCKET close #define SOCKET int #endif #define TCP_PORT 27015 #define LISTEN_BACKLOG 5 #include <fstream> using namespace std; namespace CWE23_Relative_Path_Traversal__char_listen_socket_ifstream_64 { #ifndef OMITBAD /* bad function declaration */ void badSink(void * dataVoidPtr); void bad() { char * data; char dataBuffer[FILENAME_MAX] = BASEPATH; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; char *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = strlen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(char) * (FILENAME_MAX - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(char)] = '\0'; /* Eliminate CRLF */ replace = strchr(data, '\r'); if (replace) { *replace = '\0'; } replace = strchr(data, '\n'); if (replace) { *replace = '\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } badSink(&data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(void * dataVoidPtr); static void goodG2B() { char * data; char dataBuffer[FILENAME_MAX] = BASEPATH; data = dataBuffer; /* FIX: Use a fixed file name */ strcat(data, "file.txt"); goodG2BSink(&data); } void good() { goodG2B(); } #endif /* OMITGOOD */ } /* close namespace */ /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN using namespace CWE23_Relative_Path_Traversal__char_listen_socket_ifstream_64; /* so that we can use good and bad easily */ int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE23_Relative_Path_Traversal/s02/CWE23_Relative_Path_Traversal__char_listen_socket_ifstream_64a.cpp
C++
bsd-3-clause
5,257
package org.hisp.dhis.resourcetable.table; /* * Copyright (c) 2004-2015, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import java.util.ArrayList; import java.util.List; import java.util.Optional; import org.hisp.dhis.dataelement.CategoryOptionGroup; import org.hisp.dhis.dataelement.CategoryOptionGroupSet; import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; import org.hisp.dhis.resourcetable.ResourceTable; /** * @author Lars Helge Overland */ public class CategoryOptionGroupSetResourceTable extends ResourceTable<CategoryOptionGroupSet> { private List<DataElementCategoryOptionCombo> categoryOptionCombos; public CategoryOptionGroupSetResourceTable( List<CategoryOptionGroupSet> objects, String columnQuote, List<DataElementCategoryOptionCombo> categoryOptionCombos ) { super( objects, columnQuote ); this.categoryOptionCombos = categoryOptionCombos; } @Override public String getTableName() { return "_categoryoptiongroupsetstructure"; } @Override public String getCreateTempTableStatement() { String statement = "create table " + getTempTableName() + " (" + "categoryoptioncomboid integer not null, "; for ( CategoryOptionGroupSet groupSet : objects ) { statement += columnQuote + groupSet.getName() + columnQuote + " varchar(160), "; statement += columnQuote + groupSet.getUid() + columnQuote + " character(11), "; } statement += "primary key (categoryoptioncomboid))"; return statement; } @Override public Optional<String> getPopulateTempTableStatement() { return Optional.empty(); } @Override public Optional<List<Object[]>> getPopulateTempTableContent() { List<Object[]> batchArgs = new ArrayList<>(); for ( DataElementCategoryOptionCombo categoryOptionCombo : categoryOptionCombos ) { List<Object> values = new ArrayList<>(); values.add( categoryOptionCombo.getId() ); for ( CategoryOptionGroupSet groupSet : objects ) { CategoryOptionGroup group = groupSet.getGroup( categoryOptionCombo ); values.add( group != null ? group.getName() : null ); values.add( group != null ? group.getUid() : null ); } batchArgs.add( values.toArray() ); } return Optional.of( batchArgs ); } @Override public Optional<String> getCreateIndexStatement() { return Optional.empty(); } }
steffeli/inf5750-tracker-capture
dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/table/CategoryOptionGroupSetResourceTable.java
Java
bsd-3-clause
4,115
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE127_Buffer_Underread__CWE839_fgets_83_goodG2B.cpp Label Definition File: CWE127_Buffer_Underread__CWE839.label.xml Template File: sources-sinks-83_goodG2B.tmpl.cpp */ /* * @description * CWE: 127 Buffer Underread * BadSource: fgets Read data from the console using fgets() * GoodSource: Non-negative but less than 10 * Sinks: * GoodSink: Ensure the array index is valid * BadSink : Improperly check the array index by not checking to see if the value is negative * Flow Variant: 83 Data flow: data passed to class constructor and destructor by declaring the class object on the stack * * */ #ifndef OMITGOOD #include "std_testcase.h" #include "CWE127_Buffer_Underread__CWE839_fgets_83.h" #define CHAR_ARRAY_SIZE (3 * sizeof(data) + 2) namespace CWE127_Buffer_Underread__CWE839_fgets_83 { CWE127_Buffer_Underread__CWE839_fgets_83_goodG2B::CWE127_Buffer_Underread__CWE839_fgets_83_goodG2B(int dataCopy) { data = dataCopy; /* FIX: Use a value greater than 0, but less than 10 to avoid attempting to * access an index of the array in the sink that is out-of-bounds */ data = 7; } CWE127_Buffer_Underread__CWE839_fgets_83_goodG2B::~CWE127_Buffer_Underread__CWE839_fgets_83_goodG2B() { { int buffer[10] = { 0 }; /* POTENTIAL FLAW: Attempt to access a negative index of the array * This check does not check to see if the array index is negative */ if (data < 10) { printIntLine(buffer[data]); } else { printLine("ERROR: Array index is too big."); } } } } #endif /* OMITGOOD */
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE127_Buffer_Underread/s01/CWE127_Buffer_Underread__CWE839_fgets_83_goodG2B.cpp
C++
bsd-3-clause
1,713
{% load i18n %} <table> <thead> <tr> <th rowspan="2" class="name"> {% trans 'Name' %} </th> <th rowspan="2" class="analog"> {% trans 'Analog' %} </th> <th colspan="2" class="diameter top-spanned-row"> {% trans 'Diameter' %} </th> <th rowspan="2" class="depth"> {% trans 'Depth' %} </th> <th rowspan="2" class="weight"> {% trans 'Weight' %} </th> <th rowspan="2" class="design"> {% trans 'Bearing design' %} </th> </tr> <tr> <th class="bottom-spanned-row">{% trans 'Inner' %}</th> <th class="bottom-spanned-row">{% trans 'Outer' %}</th> </tr> </thead> <tbody> {% for item in item_list %} {% if item.slug %} <tr> <td class="name"> <a href="{% url 'bearing:bearing' item.slug %}"> {{ item.name }} </a> </td> <td class="analog"> {{ item.analog }} </td> <td class="numeric"> {{ item.inner_diameter }} </td> <td class="numeric"> {{ item.outer_diameter }} </td> <td class="numeric depth"> {{ item.depth }} </td> <td class="numeric weight"> {{ item.weight }} </td> <td class="small design"> {% if item.is_swivel %} {{ item.swivel_type.name }} {% else %} {{ item.type.name }}<br> {{ item.design.name }} {% endif %} </td> </tr> {% endif %} {% endfor %} </tbody> </table>
manti-by/POD
app/templates/bearing/partial/table.html
HTML
bsd-3-clause
2,177
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/debug/stack_trace.h" #include <string.h> #include <algorithm> #include <sstream> #include "base/macros.h" #if HAVE_TRACE_STACK_FRAME_POINTERS && defined(OS_ANDROID) #include <pthread.h> #include "base/process/process_handle.h" #include "base/threading/platform_thread.h" #endif namespace base { namespace debug { StackTrace::StackTrace(const void* const* trace, size_t count) { count = std::min(count, arraysize(trace_)); if (count) memcpy(trace_, trace, count * sizeof(trace_[0])); count_ = count; } StackTrace::~StackTrace() { } const void *const *StackTrace::Addresses(size_t* count) const { *count = count_; if (count_) return trace_; return NULL; } std::string StackTrace::ToString() const { std::stringstream stream; #if !defined(__UCLIBC__) OutputToStream(&stream); #endif return stream.str(); } #if HAVE_TRACE_STACK_FRAME_POINTERS #if defined(OS_ANDROID) static uintptr_t GetStackEnd() { // Bionic reads proc/maps on every call to pthread_getattr_np() when called // from the main thread. So we need to cache end of stack in that case to get // acceptable performance. // For all other threads pthread_getattr_np() is fast enough as it just reads // values from its pthread_t argument. static uintptr_t main_stack_end = 0; bool is_main_thread = GetCurrentProcId() == PlatformThread::CurrentId(); if (is_main_thread && main_stack_end) { return main_stack_end; } uintptr_t stack_begin = 0; size_t stack_size = 0; pthread_attr_t attributes; int error = pthread_getattr_np(pthread_self(), &attributes); if (!error) { error = pthread_attr_getstack( &attributes, reinterpret_cast<void**>(&stack_begin), &stack_size); pthread_attr_destroy(&attributes); } DCHECK(!error); uintptr_t stack_end = stack_begin + stack_size; if (is_main_thread) { main_stack_end = stack_end; } return stack_end; } #endif // defined(OS_ANDROID) size_t TraceStackFramePointers(const void** out_trace, size_t max_depth, size_t skip_initial) { // Usage of __builtin_frame_address() enables frame pointers in this // function even if they are not enabled globally. So 'sp' will always // be valid. uintptr_t sp = reinterpret_cast<uintptr_t>(__builtin_frame_address(0)); #if defined(OS_ANDROID) uintptr_t stack_end = GetStackEnd(); #endif size_t depth = 0; while (depth < max_depth) { #if defined(__arm__) && defined(__GNUC__) && !defined(__clang__) // GCC and LLVM generate slightly different frames on ARM, see // https://llvm.org/bugs/show_bug.cgi?id=18505 - LLVM generates // x86-compatible frame, while GCC needs adjustment. sp -= sizeof(uintptr_t); #endif #if defined(OS_ANDROID) // Both sp[0] and s[1] must be valid. if (sp + 2 * sizeof(uintptr_t) > stack_end) { break; } #endif if (skip_initial != 0) { skip_initial--; } else { out_trace[depth++] = reinterpret_cast<const void**>(sp)[1]; } // Find out next frame pointer // (heuristics are from TCMalloc's stacktrace functions) { uintptr_t next_sp = reinterpret_cast<const uintptr_t*>(sp)[0]; // With the stack growing downwards, older stack frame must be // at a greater address that the current one. if (next_sp <= sp) break; // Assume stack frames larger than 100,000 bytes are bogus. if (next_sp - sp > 100000) break; // Check alignment. if (sp & (sizeof(void*) - 1)) break; sp = next_sp; } } return depth; } #endif // HAVE_TRACE_STACK_FRAME_POINTERS } // namespace debug } // namespace base
danakj/chromium
base/debug/stack_trace.cc
C++
bsd-3-clause
3,859
include ../mk/make.linux.app SEC_OBJECTS = SecMain.o cp0.o all: SecMain SecMain: $(SEC_OBJECTS) $(LINUX_APP_LINK) SecMain.o: SecMain.c $(CC) -c -o SecMain.o SecMain.c cp0.o: cp0.s ArchDefs.h $(CC) -I. -P -xassembler-with-cpp -c -o cp0.o cp0.s clean: rm -rf SecMain.o SecMain cp0.o
kontais/EFI-MIPS
test/EFI001/Makefile
Makefile
bsd-3-clause
290
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef IOS_CHROME_TEST_ROOT_VIEW_CONTROLLER_TEST_H_ #define IOS_CHROME_TEST_ROOT_VIEW_CONTROLLER_TEST_H_ #import <UIKit/UIKit.h> #include "base/macros.h" #include "testing/platform_test.h" // Base test fixture that restores the key window's original root view // controller at tear down. class RootViewControllerTest : public PlatformTest { public: RootViewControllerTest() = default; RootViewControllerTest(const RootViewControllerTest&) = delete; RootViewControllerTest& operator=(const RootViewControllerTest&) = delete; ~RootViewControllerTest() override = default; protected: // Sets the current key window's rootViewController and saves a pointer to // the original VC to allow restoring it at the end of the test. void SetRootViewController(UIViewController* new_root_view_controller); // PlatformTest implementation. void TearDown() override; private: // The key window's original root view controller, which must be restored at // the end of the test. UIViewController* original_root_view_controller_; }; #endif // IOS_CHROME_TEST_ROOT_VIEW_CONTROLLER_TEST_H_
scheib/chromium
ios/chrome/test/root_view_controller_test.h
C
bsd-3-clause
1,273
<?php namespace Page\Controller; use CmsIr\Page\Model\Page; use CmsIr\Post\Model\Post; use Page\Mail; use Zend\Db\Sql\Predicate\IsNotNull; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; use Zend\Json\Json; use Zend\Mail\Message; use Zend\Mime\Message as MimeMessage; use Zend\Mime\Part as MimePart; use CmsIr\Newsletter\Model\Subscriber; use Zend\Authentication\AuthenticationService; use Zend\Authentication\Result; use Zend\Authentication\Storage\Session as SessionStorage; use Zend\Db\Adapter\Adapter as DbAdapter; use Zend\Authentication\Adapter\DbTable as AuthAdapter; class PageController extends AbstractActionController { public function homeAction() { $viewParams = array(); $viewModel = new ViewModel(); $viewModel->setVariables($viewParams); return $viewModel; } public function viewPageAction() { $this->layout('layout/home'); $slug = $this->params('slug'); $page = $this->getPageService()->findOneBySlug($slug); if(empty($page)) { $this->getResponse()->setStatusCode(404); } $viewParams = array(); $viewModel = new ViewModel(); $viewModel->setVariables($viewParams); return $viewModel; } public function newsListAction() { $this->layout('layout/home'); $viewParams = array(); $viewModel = new ViewModel(); $viewModel->setVariables($viewParams); return $viewModel; } public function viewNewsAction() { $this->layout('layout/home'); $slug = $this->params('slug'); $viewParams = array(); $viewModel = new ViewModel(); $viewModel->setVariables($viewParams); return $viewModel; } public function saveSubscriberAjaxAction () { $request = $this->getRequest(); if ($request->isPost()) { $uncofimerdStatus = $this->getStatusTable()->getOneBy(array('slug' => 'unconfirmed')); $uncofimerdStatusId = $uncofimerdStatus->getId(); $email = $request->getPost('email'); $confirmationCode = uniqid(); $subscriber = new Subscriber(); $subscriber->setEmail($email); $subscriber->setGroups(array()); $subscriber->setConfirmationCode($confirmationCode); $subscriber->setStatusId($uncofimerdStatusId); $this->getSubscriberTable()->save($subscriber); $this->sendConfirmationEmail($email, $confirmationCode); $jsonObject = Json::encode($params['status'] = 'success', true); echo $jsonObject; return $this->response; } return array(); } public function sendConfirmationEmail($email, $confirmationCode) { $transport = $this->getServiceLocator()->get('mail.transport')->findMailConfig(); $from = $this->getServiceLocator()->get('mail.transport')->findFromMail(); $message = new Message(); $this->getRequest()->getServer(); $message->addTo($email) ->addFrom($from) ->setEncoding('UTF-8') ->setSubject('Prosimy o potwierdzenie subskrypcji!') ->setBody("W celu potwierdzenia subskrypcji kliknij w link => " . $this->getRequest()->getServer('HTTP_ORIGIN') . $this->url()->fromRoute('newsletter-confirmation', array('code' => $confirmationCode))); $transport->send($message); } public function confirmationNewsletterAction() { $this->layout('layout/home'); $request = $this->getRequest(); $code = $this->params()->fromRoute('code'); if (!$code) { return $this->redirect()->toRoute('home'); } $viewParams = array(); $activeStatus = $this->getStatusTable()->getOneBy(array('slug' => 'active')); $activeStatusId = $activeStatus->getId(); $events = $this->getPostTable()->getBy(array('status_id' => $activeStatusId, 'category' => 'event')); foreach($events as $event) { $eventFiles = $this->getPostFileTable()->getOneBy(array('post_id' => $event->getId())); $event->setFiles($eventFiles); } $viewParams['banners'] = $events; $viewModel = new ViewModel(); $subscriber = $this->getSubscriberTable()->getOneBy(array('confirmation_code' => $code)); $confirmedStatus = $this->getStatusTable()->getOneBy(array('slug' => 'confirmed')); $confirmedStatusId = $confirmedStatus->getId(); if($subscriber == false) { $viewParams['message'] = 'Nie istnieje taki użytkownik'; $viewModel->setVariables($viewParams); return $viewModel; } $subscriberStatus = $subscriber->getStatusId(); if($subscriberStatus == $confirmedStatusId) { $viewParams['message'] = 'Użytkownik już potwierdził subskrypcję'; } else { $viewParams['message'] = 'Subskrypcja została potwierdzona'; $subscriberGroups = $subscriber->getGroups(); $groups = unserialize($subscriberGroups); $subscriber->setStatusId($confirmedStatusId); $subscriber->setGroups($groups); $this->getSubscriberTable()->save($subscriber); } $viewModel->setVariables($viewParams); return $viewModel; } public function contactFormAction() { $request = $this->getRequest(); if ($request->isPost()) { $name = $request->getPost('name'); $surname = $request->getPost('surname'); $email = $request->getPost('email'); $text = $request->getPost('text'); $phone = $request->getPost('phone'); $htmlMarkup = "Imię i Nazwisko: " . $name . ' ' . $surname . "<br>" . "Telefon: " . $phone . "<br>" . "Email: " . $email . "<br>" . "Treść: " . $text; $html = new MimePart($htmlMarkup); $html->type = "text/html"; $html->charset = 'utf-8'; $body = new MimeMessage(); $body->setParts(array($html)); $transport = $this->getServiceLocator()->get('mail.transport')->findMailConfig(); $from = $this->getServiceLocator()->get('mail.transport')->findFromMail(); $message = new Message(); $this->getRequest()->getServer(); $message->addTo('[email protected]') ->addFrom($from) ->setEncoding('UTF-8') ->setSubject('Wiadomość z formularza kontaktowego') ->setBody($body); $transport->send($message); $jsonObject = Json::encode($params['status'] = 'success', true); echo $jsonObject; return $this->response; } return array(); } /** * @return \CmsIr\Menu\Service\MenuService */ public function getMenuService() { return $this->getServiceLocator()->get('CmsIr\Menu\Service\MenuService'); } /** * @return \CmsIr\Slider\Service\SliderService */ public function getSliderService() { return $this->getServiceLocator()->get('CmsIr\Slider\Service\SliderService'); } /** * @return \CmsIr\Page\Service\PageService */ public function getPageService() { return $this->getServiceLocator()->get('CmsIr\Page\Service\PageService'); } /** * @return \CmsIr\Newsletter\Model\SubscriberTable */ public function getSubscriberTable() { return $this->getServiceLocator()->get('CmsIr\Newsletter\Model\SubscriberTable'); } /** * @return \CmsIr\System\Model\StatusTable */ public function getStatusTable() { return $this->getServiceLocator()->get('CmsIr\System\Model\StatusTable'); } /** * @return \CmsIr\Post\Model\PostTable */ public function getPostTable() { return $this->getServiceLocator()->get('CmsIr\Post\Model\PostTable'); } /** * @return \CmsIr\File\Model\FileTable */ public function getFileTable() { return $this->getServiceLocator()->get('CmsIr\File\Model\FileTable'); } /** * @return \CmsIr\Place\Model\PlaceTable */ public function getPlaceTable() { return $this->getServiceLocator()->get('CmsIr\Place\Model\PlaceTable'); } }
web-ir/front
module/Page/src/Page/Controller/PageController.php
PHP
bsd-3-clause
8,804
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/public/test/render_view_test.h" #include "content/common/view_messages.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/common/renderer_preferences.h" #include "content/renderer/render_thread_impl.h" #include "content/renderer/render_view_impl.h" #include "content/renderer/renderer_main_platform_delegate.h" #include "content/renderer/renderer_webkitplatformsupport_impl.h" #include "content/test/mock_render_process.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/dom_storage/dom_storage_types.h" #include "webkit/glue/glue_serialize.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebFrame; using WebKit::WebInputEvent; using WebKit::WebMouseEvent; using WebKit::WebScriptController; using WebKit::WebScriptSource; using WebKit::WebString; using WebKit::WebURLRequest; using content::NativeWebKeyboardEvent; namespace { const int32 kOpenerId = -2; const int32 kRouteId = 5; const int32 kNewWindowRouteId = 6; const int32 kSurfaceId = 42; } // namespace namespace content { class RendererWebKitPlatformSupportImplNoSandboxImpl : public RendererWebKitPlatformSupportImpl { public: virtual WebKit::WebSandboxSupport* sandboxSupport() { return NULL; } }; RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox:: RendererWebKitPlatformSupportImplNoSandbox() { webkit_platform_support_.reset( new RendererWebKitPlatformSupportImplNoSandboxImpl()); } RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox:: ~RendererWebKitPlatformSupportImplNoSandbox() { } WebKit::WebKitPlatformSupport* RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox::Get() { return webkit_platform_support_.get(); } RenderViewTest::RenderViewTest() : view_(NULL) { } RenderViewTest::~RenderViewTest() { } void RenderViewTest::ProcessPendingMessages() { msg_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure()); msg_loop_.Run(); } WebFrame* RenderViewTest::GetMainFrame() { return view_->GetWebView()->mainFrame(); } void RenderViewTest::ExecuteJavaScript(const char* js) { GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js))); } bool RenderViewTest::ExecuteJavaScriptAndReturnIntValue( const string16& script, int* int_result) { v8::Handle<v8::Value> result = GetMainFrame()->executeScriptAndReturnValue(WebScriptSource(script)); if (result.IsEmpty() || !result->IsInt32()) return false; if (int_result) *int_result = result->Int32Value(); return true; } void RenderViewTest::LoadHTML(const char* html) { std::string url_str = "data:text/html;charset=utf-8,"; url_str.append(html); GURL url(url_str); GetMainFrame()->loadRequest(WebURLRequest(url)); // The load actually happens asynchronously, so we pump messages to process // the pending continuation. ProcessPendingMessages(); } void RenderViewTest::GoBack(const WebKit::WebHistoryItem& item) { GoToOffset(-1, item); } void RenderViewTest::GoForward(const WebKit::WebHistoryItem& item) { GoToOffset(1, item); } void RenderViewTest::SetUp() { // Subclasses can set the ContentClient's renderer before calling // RenderViewTest::SetUp(). if (!GetContentClient()->renderer()) GetContentClient()->set_renderer_for_testing(&content_renderer_client_); // Subclasses can set render_thread_ with their own implementation before // calling RenderViewTest::SetUp(). if (!render_thread_.get()) render_thread_.reset(new MockRenderThread()); render_thread_->set_routing_id(kRouteId); render_thread_->set_surface_id(kSurfaceId); render_thread_->set_new_window_routing_id(kNewWindowRouteId); command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); params_.reset(new content::MainFunctionParams(*command_line_)); platform_.reset(new RendererMainPlatformDelegate(*params_)); platform_->PlatformInitialize(); // Setting flags and really doing anything with WebKit is fairly fragile and // hacky, but this is the world we live in... webkit_glue::SetJavaScriptFlags(" --expose-gc"); WebKit::initialize(webkit_platform_support_.Get()); // Ensure that we register any necessary schemes when initializing WebKit, // since we are using a MockRenderThread. RenderThreadImpl::RegisterSchemes(); mock_process_.reset(new MockRenderProcess); // This needs to pass the mock render thread to the view. RenderViewImpl* view = RenderViewImpl::Create( 0, kOpenerId, content::RendererPreferences(), webkit_glue::WebPreferences(), new SharedRenderViewCounter(0), kRouteId, kSurfaceId, dom_storage::kInvalidSessionStorageNamespaceId, string16(), false, false, 1, WebKit::WebScreenInfo(), NULL, AccessibilityModeOff); view->AddRef(); view_ = view; } void RenderViewTest::TearDown() { // Try very hard to collect garbage before shutting down. GetMainFrame()->collectGarbage(); GetMainFrame()->collectGarbage(); // Run the loop so the release task from the renderwidget executes. ProcessPendingMessages(); render_thread_->SendCloseMessage(); view_ = NULL; mock_process_.reset(); // After telling the view to close and resetting mock_process_ we may get // some new tasks which need to be processed before shutting down WebKit // (http://crbug.com/21508). msg_loop_.RunAllPending(); WebKit::shutdown(); platform_->PlatformUninitialize(); platform_.reset(); params_.reset(); command_line_.reset(); } void RenderViewTest::SendNativeKeyEvent( const NativeWebKeyboardEvent& key_event) { SendWebKeyboardEvent(key_event); } void RenderViewTest::SendWebKeyboardEvent( const WebKit::WebKeyboardEvent& key_event) { scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); input_message->WriteData(reinterpret_cast<const char*>(&key_event), sizeof(WebKit::WebKeyboardEvent)); RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->OnMessageReceived(*input_message); } void RenderViewTest::SendWebMouseEvent( const WebKit::WebMouseEvent& mouse_event) { scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); input_message->WriteData(reinterpret_cast<const char*>(&mouse_event), sizeof(WebKit::WebMouseEvent)); RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->OnMessageReceived(*input_message); } const char* const kGetCoordinatesScript = "(function() {" " function GetCoordinates(elem) {" " if (!elem)" " return [ 0, 0];" " var coordinates = [ elem.offsetLeft, elem.offsetTop];" " var parent_coordinates = GetCoordinates(elem.offsetParent);" " coordinates[0] += parent_coordinates[0];" " coordinates[1] += parent_coordinates[1];" " return coordinates;" " };" " var elem = document.getElementById('$1');" " if (!elem)" " return null;" " var bounds = GetCoordinates(elem);" " bounds[2] = elem.offsetWidth;" " bounds[3] = elem.offsetHeight;" " return bounds;" "})();"; gfx::Rect RenderViewTest::GetElementBounds(const std::string& element_id) { std::vector<std::string> params; params.push_back(element_id); std::string script = ReplaceStringPlaceholders(kGetCoordinatesScript, params, NULL); v8::HandleScope handle_scope; v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue( WebScriptSource(WebString::fromUTF8(script))); if (value.IsEmpty() || !value->IsArray()) return gfx::Rect(); v8::Handle<v8::Array> array = value.As<v8::Array>(); if (array->Length() != 4) return gfx::Rect(); std::vector<int> coords; for (int i = 0; i < 4; ++i) { v8::Handle<v8::Number> index = v8::Number::New(i); v8::Local<v8::Value> value = array->Get(index); if (value.IsEmpty() || !value->IsInt32()) return gfx::Rect(); coords.push_back(value->Int32Value()); } return gfx::Rect(coords[0], coords[1], coords[2], coords[3]); } bool RenderViewTest::SimulateElementClick(const std::string& element_id) { gfx::Rect bounds = GetElementBounds(element_id); if (bounds.IsEmpty()) return false; WebMouseEvent mouse_event; mouse_event.type = WebInputEvent::MouseDown; mouse_event.button = WebMouseEvent::ButtonLeft; mouse_event.x = bounds.CenterPoint().x(); mouse_event.y = bounds.CenterPoint().y(); mouse_event.clickCount = 1; ViewMsg_HandleInputEvent input_event(0); scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); input_message->WriteData(reinterpret_cast<const char*>(&mouse_event), sizeof(WebMouseEvent)); RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->OnMessageReceived(*input_message); return true; } void RenderViewTest::SetFocused(const WebKit::WebNode& node) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->focusedNodeChanged(node); } void RenderViewTest::ClearHistory() { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->page_id_ = -1; impl->history_list_offset_ = -1; impl->history_list_length_ = 0; impl->history_page_ids_.clear(); } void RenderViewTest::Reload(const GURL& url) { ViewMsg_Navigate_Params params; params.url = url; params.navigation_type = ViewMsg_Navigate_Type::RELOAD; RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->OnNavigate(params); } uint32 RenderViewTest::GetNavigationIPCType() { return ViewHostMsg_FrameNavigate::ID; } bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); return impl->OnMessageReceived(msg); } void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame, bool is_new_navigation) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->didNavigateWithinPage(frame, is_new_navigation); } void RenderViewTest::SendContentStateImmediately() { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->set_send_content_state_immediately(true); } WebKit::WebWidget* RenderViewTest::GetWebWidget() { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); return impl->webwidget(); } void RenderViewTest::GoToOffset(int offset, const WebKit::WebHistoryItem& history_item) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); int history_list_length = impl->historyBackListCount() + impl->historyForwardListCount() + 1; int pending_offset = offset + impl->history_list_offset(); ViewMsg_Navigate_Params navigate_params; navigate_params.navigation_type = ViewMsg_Navigate_Type::NORMAL; navigate_params.transition = content::PAGE_TRANSITION_FORWARD_BACK; navigate_params.current_history_list_length = history_list_length; navigate_params.current_history_list_offset = impl->history_list_offset(); navigate_params.pending_history_list_offset = pending_offset; navigate_params.page_id = impl->GetPageId() + offset; navigate_params.state = webkit_glue::HistoryItemToString(history_item); navigate_params.request_time = base::Time::Now(); ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); OnMessageReceived(navigate_message); // The load actually happens asynchronously, so we pump messages to process // the pending continuation. ProcessPendingMessages(); } } // namespace content
keishi/chromium
content/test/render_view_test.cc
C++
bsd-3-clause
12,346
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE590_Free_Memory_Not_on_Heap__free_struct_alloca_64b.c Label Definition File: CWE590_Free_Memory_Not_on_Heap__free.label.xml Template File: sources-sink-64b.tmpl.c */ /* * @description * CWE: 590 Free Memory Not on Heap * BadSource: alloca Data buffer is allocated on the stack with alloca() * GoodSource: Allocate memory on the heap * Sinks: * BadSink : Print then free data * Flow Variant: 64 Data flow: void pointer to data passed from one function to another in different source files * * */ #include "std_testcase.h" #include <wchar.h> #ifndef OMITBAD void CWE590_Free_Memory_Not_on_Heap__free_struct_alloca_64b_badSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ twoIntsStruct * * dataPtr = (twoIntsStruct * *)dataVoidPtr; /* dereference dataPtr into data */ twoIntsStruct * data = (*dataPtr); printStructLine(&data[0]); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void CWE590_Free_Memory_Not_on_Heap__free_struct_alloca_64b_goodG2BSink(void * dataVoidPtr) { /* cast void pointer to a pointer of the appropriate type */ twoIntsStruct * * dataPtr = (twoIntsStruct * *)dataVoidPtr; /* dereference dataPtr into data */ twoIntsStruct * data = (*dataPtr); printStructLine(&data[0]); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } #endif /* OMITGOOD */
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE590_Free_Memory_Not_on_Heap/s05/CWE590_Free_Memory_Not_on_Heap__free_struct_alloca_64b.c
C
bsd-3-clause
1,640
/**************************************************************************** * * Copyright (c) 2013-2019 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name PX4 nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /** * @file LSM303D.cpp * Driver for the ST LSM303D MEMS accelerometer / magnetometer connected via SPI. */ #include "LSM303D.hpp" /* list of registers that will be checked in check_registers(). Note that ADDR_WHO_AM_I must be first in the list. */ static constexpr uint8_t _checked_registers[] = { ADDR_WHO_AM_I, ADDR_CTRL_REG1, ADDR_CTRL_REG2, ADDR_CTRL_REG3, ADDR_CTRL_REG4, ADDR_CTRL_REG5, ADDR_CTRL_REG6, ADDR_CTRL_REG7 }; LSM303D::LSM303D(I2CSPIBusOption bus_option, int bus, uint32_t device, enum Rotation rotation, int bus_frequency, spi_mode_e spi_mode) : SPI(DRV_IMU_DEVTYPE_LSM303D, MODULE_NAME, bus, device, spi_mode, bus_frequency), I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus), _px4_accel(get_device_id(), rotation), _px4_mag(get_device_id(), rotation), _accel_sample_perf(perf_alloc(PC_ELAPSED, "lsm303d: acc_read")), _mag_sample_perf(perf_alloc(PC_ELAPSED, "lsm303d: mag_read")), _bad_registers(perf_alloc(PC_COUNT, "lsm303d: bad_reg")), _bad_values(perf_alloc(PC_COUNT, "lsm303d: bad_val")), _accel_duplicates(perf_alloc(PC_COUNT, "lsm303d: acc_dupe")) { _px4_mag.set_external(external()); } LSM303D::~LSM303D() { // delete the perf counter perf_free(_accel_sample_perf); perf_free(_mag_sample_perf); perf_free(_bad_registers); perf_free(_bad_values); perf_free(_accel_duplicates); } int LSM303D::init() { /* do SPI init (and probe) first */ int ret = SPI::init(); if (ret != OK) { DEVICE_DEBUG("SPI init failed (%i)", ret); return ret; } reset(); start(); return ret; } void LSM303D::disable_i2c(void) { uint8_t a = read_reg(0x02); write_reg(0x02, (0x10 | a)); a = read_reg(0x02); write_reg(0x02, (0xF7 & a)); a = read_reg(0x15); write_reg(0x15, (0x80 | a)); a = read_reg(0x02); write_reg(0x02, (0xE7 & a)); } void LSM303D::reset() { // ensure the chip doesn't interpret any other bus traffic as I2C disable_i2c(); // enable accel write_checked_reg(ADDR_CTRL_REG1, REG1_X_ENABLE_A | REG1_Y_ENABLE_A | REG1_Z_ENABLE_A | REG1_BDU_UPDATE | REG1_RATE_800HZ_A); // enable mag write_checked_reg(ADDR_CTRL_REG7, REG7_CONT_MODE_M); write_checked_reg(ADDR_CTRL_REG5, REG5_RES_HIGH_M | REG5_ENABLE_T); write_checked_reg(ADDR_CTRL_REG3, 0x04); // DRDY on ACCEL on INT1 write_checked_reg(ADDR_CTRL_REG4, 0x04); // DRDY on MAG on INT2 accel_set_range(LSM303D_ACCEL_DEFAULT_RANGE_G); accel_set_samplerate(LSM303D_ACCEL_DEFAULT_RATE); // we setup the anti-alias on-chip filter as 50Hz. We believe // this operates in the analog domain, and is critical for // anti-aliasing. The 2 pole software filter is designed to // operate in conjunction with this on-chip filter accel_set_onchip_lowpass_filter_bandwidth(LSM303D_ACCEL_DEFAULT_ONCHIP_FILTER_FREQ); mag_set_range(LSM303D_MAG_DEFAULT_RANGE_GA); mag_set_samplerate(LSM303D_MAG_DEFAULT_RATE); } int LSM303D::probe() { // read dummy value to void to clear SPI statemachine on sensor read_reg(ADDR_WHO_AM_I); // verify that the device is attached and functioning if (read_reg(ADDR_WHO_AM_I) == WHO_I_AM) { _checked_values[0] = WHO_I_AM; return OK; } return -EIO; } uint8_t LSM303D::read_reg(unsigned reg) { uint8_t cmd[2] {}; cmd[0] = reg | DIR_READ; transfer(cmd, cmd, sizeof(cmd)); return cmd[1]; } int LSM303D::write_reg(unsigned reg, uint8_t value) { uint8_t cmd[2] {}; cmd[0] = reg | DIR_WRITE; cmd[1] = value; return transfer(cmd, nullptr, sizeof(cmd)); } void LSM303D::write_checked_reg(unsigned reg, uint8_t value) { write_reg(reg, value); for (uint8_t i = 0; i < LSM303D_NUM_CHECKED_REGISTERS; i++) { if (reg == _checked_registers[i]) { _checked_values[i] = value; } } } void LSM303D::modify_reg(unsigned reg, uint8_t clearbits, uint8_t setbits) { uint8_t val = read_reg(reg); val &= ~clearbits; val |= setbits; write_checked_reg(reg, val); } int LSM303D::accel_set_range(unsigned max_g) { uint8_t setbits = 0; uint8_t clearbits = REG2_FULL_SCALE_BITS_A; float new_scale_g_digit = 0.0f; if (max_g == 0) { max_g = 16; } if (max_g <= 2) { // accel_range_m_s2 = 2.0f * CONSTANTS_ONE_G; setbits |= REG2_FULL_SCALE_2G_A; new_scale_g_digit = 0.061e-3f; } else if (max_g <= 4) { // accel_range_m_s2 = 4.0f * CONSTANTS_ONE_G; setbits |= REG2_FULL_SCALE_4G_A; new_scale_g_digit = 0.122e-3f; } else if (max_g <= 6) { // accel_range_m_s2 = 6.0f * CONSTANTS_ONE_G; setbits |= REG2_FULL_SCALE_6G_A; new_scale_g_digit = 0.183e-3f; } else if (max_g <= 8) { // accel_range_m_s2 = 8.0f * CONSTANTS_ONE_G; setbits |= REG2_FULL_SCALE_8G_A; new_scale_g_digit = 0.244e-3f; } else if (max_g <= 16) { // accel_range_m_s2 = 16.0f * CONSTANTS_ONE_G; setbits |= REG2_FULL_SCALE_16G_A; new_scale_g_digit = 0.732e-3f; } else { return -EINVAL; } float accel_range_scale = new_scale_g_digit * CONSTANTS_ONE_G; _px4_accel.set_scale(accel_range_scale); modify_reg(ADDR_CTRL_REG2, clearbits, setbits); return OK; } int LSM303D::mag_set_range(unsigned max_ga) { uint8_t setbits = 0; uint8_t clearbits = REG6_FULL_SCALE_BITS_M; float new_scale_ga_digit = 0.0f; if (max_ga == 0) { max_ga = 12; } if (max_ga <= 2) { // mag_range_ga = 2; setbits |= REG6_FULL_SCALE_2GA_M; new_scale_ga_digit = 0.080e-3f; } else if (max_ga <= 4) { // mag_range_ga = 4; setbits |= REG6_FULL_SCALE_4GA_M; new_scale_ga_digit = 0.160e-3f; } else if (max_ga <= 8) { // mag_range_ga = 8; setbits |= REG6_FULL_SCALE_8GA_M; new_scale_ga_digit = 0.320e-3f; } else if (max_ga <= 12) { // mag_range_ga = 12; setbits |= REG6_FULL_SCALE_12GA_M; new_scale_ga_digit = 0.479e-3f; } else { return -EINVAL; } _px4_mag.set_scale(new_scale_ga_digit); modify_reg(ADDR_CTRL_REG6, clearbits, setbits); return OK; } int LSM303D::accel_set_onchip_lowpass_filter_bandwidth(unsigned bandwidth) { uint8_t setbits = 0; uint8_t clearbits = REG2_ANTIALIAS_FILTER_BW_BITS_A; if (bandwidth == 0) { bandwidth = 773; } if (bandwidth <= 50) { // accel_onchip_filter_bandwith = 50; setbits |= REG2_AA_FILTER_BW_50HZ_A; } else if (bandwidth <= 194) { // accel_onchip_filter_bandwith = 194; setbits |= REG2_AA_FILTER_BW_194HZ_A; } else if (bandwidth <= 362) { // accel_onchip_filter_bandwith = 362; setbits |= REG2_AA_FILTER_BW_362HZ_A; } else if (bandwidth <= 773) { // accel_onchip_filter_bandwith = 773; setbits |= REG2_AA_FILTER_BW_773HZ_A; } else { return -EINVAL; } modify_reg(ADDR_CTRL_REG2, clearbits, setbits); return OK; } int LSM303D::accel_set_samplerate(unsigned frequency) { uint8_t setbits = 0; uint8_t clearbits = REG1_RATE_BITS_A; if (frequency == 0) { frequency = 1600; } int accel_samplerate = 100; if (frequency <= 100) { setbits |= REG1_RATE_100HZ_A; accel_samplerate = 100; } else if (frequency <= 200) { setbits |= REG1_RATE_200HZ_A; accel_samplerate = 200; } else if (frequency <= 400) { setbits |= REG1_RATE_400HZ_A; accel_samplerate = 400; } else if (frequency <= 800) { setbits |= REG1_RATE_800HZ_A; accel_samplerate = 800; } else if (frequency <= 1600) { setbits |= REG1_RATE_1600HZ_A; accel_samplerate = 1600; } else { return -EINVAL; } _call_accel_interval = 1000000 / accel_samplerate; modify_reg(ADDR_CTRL_REG1, clearbits, setbits); return OK; } int LSM303D::mag_set_samplerate(unsigned frequency) { uint8_t setbits = 0; uint8_t clearbits = REG5_RATE_BITS_M; if (frequency == 0) { frequency = 100; } int mag_samplerate = 100; if (frequency <= 25) { setbits |= REG5_RATE_25HZ_M; mag_samplerate = 25; } else if (frequency <= 50) { setbits |= REG5_RATE_50HZ_M; mag_samplerate = 50; } else if (frequency <= 100) { setbits |= REG5_RATE_100HZ_M; mag_samplerate = 100; } else { return -EINVAL; } _call_mag_interval = 1000000 / mag_samplerate; modify_reg(ADDR_CTRL_REG5, clearbits, setbits); return OK; } void LSM303D::start() { // start polling at the specified rate ScheduleOnInterval(_call_accel_interval - LSM303D_TIMER_REDUCTION); } void LSM303D::RunImpl() { // make another accel measurement measureAccelerometer(); if (hrt_elapsed_time(&_mag_last_measure) >= _call_mag_interval) { measureMagnetometer(); } } void LSM303D::check_registers(void) { uint8_t v = 0; if ((v = read_reg(_checked_registers[_checked_next])) != _checked_values[_checked_next]) { /* if we get the wrong value then we know the SPI bus or sensor is very sick. We set _register_wait to 20 and wait until we have seen 20 good values in a row before we consider the sensor to be OK again. */ perf_count(_bad_registers); /* try to fix the bad register value. We only try to fix one per loop to prevent a bad sensor hogging the bus. We skip zero as that is the WHO_AM_I, which is not writeable */ if (_checked_next != 0) { write_reg(_checked_registers[_checked_next], _checked_values[_checked_next]); } _register_wait = 20; } _checked_next = (_checked_next + 1) % LSM303D_NUM_CHECKED_REGISTERS; } void LSM303D::measureAccelerometer() { perf_begin(_accel_sample_perf); // status register and data as read back from the device #pragma pack(push, 1) struct { uint8_t cmd; uint8_t status; int16_t x; int16_t y; int16_t z; } raw_accel_report{}; #pragma pack(pop) check_registers(); if (_register_wait != 0) { // we are waiting for some good transfers before using // the sensor again. _register_wait--; perf_end(_accel_sample_perf); return; } /* fetch data from the sensor */ const hrt_abstime timestamp_sample = hrt_absolute_time(); raw_accel_report.cmd = ADDR_STATUS_A | DIR_READ | ADDR_INCREMENT; transfer((uint8_t *)&raw_accel_report, (uint8_t *)&raw_accel_report, sizeof(raw_accel_report)); if (!(raw_accel_report.status & REG_STATUS_A_NEW_ZYXADA)) { perf_end(_accel_sample_perf); perf_count(_accel_duplicates); return; } /* we have logs where the accelerometers get stuck at a fixed large value. We want to detect this and mark the sensor as being faulty */ if (((_last_accel[0] - raw_accel_report.x) == 0) && ((_last_accel[1] - raw_accel_report.y) == 0) && ((_last_accel[2] - raw_accel_report.z) == 0)) { _constant_accel_count++; } else { _constant_accel_count = 0; } if (_constant_accel_count > 100) { // we've had 100 constant accel readings with large // values. The sensor is almost certainly dead. We // will raise the error_count so that the top level // flight code will know to avoid this sensor, but // we'll still give the data so that it can be logged // and viewed perf_count(_bad_values); _constant_accel_count = 0; perf_end(_accel_sample_perf); return; } // report the error count as the sum of the number of bad // register reads and bad values. This allows the higher level // code to decide if it should use this sensor based on // whether it has had failures _px4_accel.set_error_count(perf_event_count(_bad_registers) + perf_event_count(_bad_values)); _px4_accel.update(timestamp_sample, raw_accel_report.x, raw_accel_report.y, raw_accel_report.z); _last_accel[0] = raw_accel_report.x; _last_accel[1] = raw_accel_report.y; _last_accel[2] = raw_accel_report.z; perf_end(_accel_sample_perf); } void LSM303D::measureMagnetometer() { perf_begin(_mag_sample_perf); // status register and data as read back from the device #pragma pack(push, 1) struct { uint8_t cmd; int16_t temperature; uint8_t status; int16_t x; int16_t y; int16_t z; } raw_mag_report{}; #pragma pack(pop) // fetch data from the sensor const hrt_abstime timestamp_sample = hrt_absolute_time(); raw_mag_report.cmd = ADDR_OUT_TEMP_L | DIR_READ | ADDR_INCREMENT; transfer((uint8_t *)&raw_mag_report, (uint8_t *)&raw_mag_report, sizeof(raw_mag_report)); /* remember the temperature. The datasheet isn't clear, but it * seems to be a signed offset from 25 degrees C in units of 0.125C */ _last_temperature = 25.0f + (raw_mag_report.temperature * 0.125f); _px4_accel.set_temperature(_last_temperature); _px4_mag.set_temperature(_last_temperature); _px4_mag.set_error_count(perf_event_count(_bad_registers) + perf_event_count(_bad_values)); _px4_mag.set_external(external()); _px4_mag.update(timestamp_sample, raw_mag_report.x, raw_mag_report.y, raw_mag_report.z); _mag_last_measure = timestamp_sample; perf_end(_mag_sample_perf); } void LSM303D::print_status() { I2CSPIDriverBase::print_status(); perf_print_counter(_accel_sample_perf); perf_print_counter(_mag_sample_perf); perf_print_counter(_bad_registers); perf_print_counter(_bad_values); perf_print_counter(_accel_duplicates); ::printf("checked_next: %u\n", _checked_next); for (uint8_t i = 0; i < LSM303D_NUM_CHECKED_REGISTERS; i++) { uint8_t v = read_reg(_checked_registers[i]); if (v != _checked_values[i]) { ::printf("reg %02x:%02x should be %02x\n", (unsigned)_checked_registers[i], (unsigned)v, (unsigned)_checked_values[i]); } } }
PX4/Firmware
src/drivers/imu/lsm303d/LSM303D.cpp
C++
bsd-3-clause
14,767
package org.basex.query.func.hof; /** * Function implementation. * * @author BaseX Team 2005-15, BSD License * @author Leo Woerteler */ public final class HofConst extends HofId { }
ksclarke/basex
basex-core/src/main/java/org/basex/query/func/hof/HofConst.java
Java
bsd-3-clause
188
/* * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #include "core/platform/graphics/DrawLooper.h" #include "core/platform/graphics/Color.h" #include "core/platform/graphics/FloatSize.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkColorFilter.h" #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkXfermode.h" #include "third_party/skia/include/effects/SkBlurMaskFilter.h" namespace WebCore { DrawLooper::DrawLooper() : m_skDrawLooper(new SkLayerDrawLooper) { } void DrawLooper::addUnmodifiedContent() { SkLayerDrawLooper::LayerInfo info; m_skDrawLooper->addLayerOnTop(info); } void DrawLooper::addShadow(const FloatSize& offset, float blur, const Color& color, ShadowTransformMode shadowTransformMode, ShadowAlphaMode shadowAlphaMode) { // Detect when there's no effective shadow. if (!color.isValid() || !color.alpha()) return; SkColor skColor; if (color.isValid()) skColor = color.rgb(); else skColor = SkColorSetARGB(0xFF / 3, 0, 0, 0); // "std" apple shadow color. SkLayerDrawLooper::LayerInfo info; switch (shadowAlphaMode) { case ShadowRespectsAlpha: info.fColorMode = SkXfermode::kDst_Mode; break; case ShadowIgnoresAlpha: info.fColorMode = SkXfermode::kSrc_Mode; break; default: ASSERT_NOT_REACHED(); } if (blur) info.fPaintBits |= SkLayerDrawLooper::kMaskFilter_Bit; // our blur info.fPaintBits |= SkLayerDrawLooper::kColorFilter_Bit; info.fOffset.set(offset.width(), offset.height()); info.fPostTranslate = (shadowTransformMode == ShadowIgnoresTransforms); SkPaint* paint = m_skDrawLooper->addLayerOnTop(info); if (blur) { uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag; if (shadowTransformMode == ShadowIgnoresTransforms) mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag; SkMaskFilter* mf = SkBlurMaskFilter::Create((double)blur / 2.0, SkBlurMaskFilter::kNormal_BlurStyle, mfFlags); SkSafeUnref(paint->setMaskFilter(mf)); } SkColorFilter* cf = SkColorFilter::CreateModeFilter(skColor, SkXfermode::kSrcIn_Mode); SkSafeUnref(paint->setColorFilter(cf)); } } // namespace WebCore
espadrine/opera
chromium/src/third_party/WebKit/Source/core/platform/graphics/DrawLooper.cpp
C++
bsd-3-clause
3,861
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.autofill_assistant; import android.os.Bundle; import androidx.annotation.Nullable; import org.chromium.base.Callback; import org.chromium.base.ThreadUtils; import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.autofill_assistant.onboarding.AssistantOnboardingResult; import org.chromium.chrome.browser.autofill_assistant.onboarding.BaseOnboardingCoordinator; import org.chromium.chrome.browser.autofill_assistant.onboarding.OnboardingCoordinatorFactory; import org.chromium.chrome.browser.autofill_assistant.overlay.AssistantOverlayCoordinator; import org.chromium.chrome.browser.tab.Tab; import org.chromium.content_public.browser.WebContents; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * A handler that provides Autofill Assistant actions for a specific activity. */ class AutofillAssistantActionHandlerImpl implements AutofillAssistantActionHandler { private final ActivityTabProvider mActivityTabProvider; private final OnboardingCoordinatorFactory mOnboardingCoordinatorFactory; AutofillAssistantActionHandlerImpl(OnboardingCoordinatorFactory onboardingCoordinatorFactory, ActivityTabProvider activityTabProvider) { mActivityTabProvider = activityTabProvider; mOnboardingCoordinatorFactory = onboardingCoordinatorFactory; } @Override public void fetchWebsiteActions( String userName, String experimentIds, Bundle arguments, Callback<Boolean> callback) { if (!AutofillAssistantPreferencesUtil.isAutofillOnboardingAccepted()) { callback.onResult(false); return; } AutofillAssistantClient client = getOrCreateClient(); if (client == null) { callback.onResult(false); return; } client.fetchWebsiteActions(userName, experimentIds, toArgumentMap(arguments), callback); } @Override public boolean hasRunFirstCheck() { if (!AutofillAssistantPreferencesUtil.isAutofillOnboardingAccepted()) return false; AutofillAssistantClient client = getOrCreateClient(); if (client == null) return false; return client.hasRunFirstCheck(); } @Override public List<AutofillAssistantDirectAction> getActions() { AutofillAssistantClient client = getOrCreateClient(); if (client == null) { return Collections.emptyList(); } return client.getDirectActions(); } @Override public void performOnboarding( String experimentIds, Bundle arguments, Callback<Boolean> callback) { Map<String, String> parameters = toArgumentMap(arguments); BaseOnboardingCoordinator coordinator = mOnboardingCoordinatorFactory.createBottomSheetOnboardingCoordinator( experimentIds, parameters); coordinator.show(result -> { coordinator.hide(); callback.onResult(result == AssistantOnboardingResult.ACCEPTED); }); } @Override public void performAction( String name, String experimentIds, Bundle arguments, Callback<Boolean> callback) { AutofillAssistantClient client = getOrCreateClient(); if (client == null) { callback.onResult(false); return; } Map<String, String> argumentMap = toArgumentMap(arguments); Callback<AssistantOverlayCoordinator> afterOnboarding = (overlayCoordinator) -> { callback.onResult(client.performDirectAction( name, experimentIds, argumentMap, overlayCoordinator)); }; if (!AutofillAssistantPreferencesUtil.isAutofillOnboardingAccepted()) { BaseOnboardingCoordinator coordinator = mOnboardingCoordinatorFactory.createBottomSheetOnboardingCoordinator( experimentIds, argumentMap); coordinator.show(result -> { if (result != AssistantOnboardingResult.ACCEPTED) { coordinator.hide(); callback.onResult(false); return; } afterOnboarding.onResult(coordinator.transferControls()); }); return; } afterOnboarding.onResult(null); } @Override public void showFatalError() { AutofillAssistantClient client = getOrCreateClient(); if (client == null) { return; } client.showFatalError(); } private WebContents getWebContents() { Tab tab = mActivityTabProvider.get(); if (tab == null) { return null; } return tab.getWebContents(); } /** * Returns a client for the current tab or {@code null} if there's no current tab or the current * tab doesn't have an associated browser content. */ @Nullable private AutofillAssistantClient getOrCreateClient() { ThreadUtils.assertOnUiThread(); WebContents webContents = getWebContents(); if (webContents == null) { return null; } return AutofillAssistantClient.fromWebContents(webContents); } /** Extracts string arguments from a bundle. */ private Map<String, String> toArgumentMap(Bundle bundle) { Map<String, String> map = new HashMap<>(); for (String key : bundle.keySet()) { String value = bundle.getString(key); if (value != null) { map.put(key, value); } } return map; } }
scheib/chromium
chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantActionHandlerImpl.java
Java
bsd-3-clause
5,828
#ifndef ALIANALYSISTASKHFJETTAGHFE_H #define ALIANALYSISTASKHFJETTAGHFE_H // $Id$ class TH1; class TH2; class TH3; class THnSparse; class TClonesArray; class TArrayF; class AliAODEvent; // sample class AliJetContainer; class AliParticleContainer; class AliClusterContainer; class AliPIDResponse; class AliAODMCHeader; class AliAODMCParticle; // sample class AliMultSelection; #include "TObject.h" #include "TObjArray.h" #include "TClonesArray.h" //#include "AliAODMCParticle" #include "AliAnalysisTaskEmcalJet.h" class AliAnalysisHFjetTagHFE : public AliAnalysisTaskEmcalJet { public: AliAnalysisHFjetTagHFE(); AliAnalysisHFjetTagHFE(const char *name); virtual ~AliAnalysisHFjetTagHFE(); void UserCreateOutputObjects(); void Terminate(Option_t *option); void SetCentralityMimHFEjet(Int_t centMim) {fcentMim = centMim;}; void SetCentralityMaxHFEjet(Int_t centMax) {fcentMax = centMax;}; void SetDebugHFEjet(Bool_t dbHFEj) {idbHFEj = dbHFEj;}; void SetHybridTrack(Bool_t Hybrid){iHybrid = Hybrid;}; void SetMinSig(Double_t mimSig){fmimSig = mimSig;}; void SetMCdata(Bool_t mcData) {fmcData = mcData;}; protected: void ExecOnce(); Bool_t FillHistograms() ; Bool_t Run() ; void CheckClusTrackMatching(); AliVEvent *fVevent; //!event object AliMultSelection *fMultSelection; TClonesArray *ftrack; TClonesArray *fCaloClusters; AliPIDResponse *fpidResponse; //!pid response Float_t fcentMim; // mim. centrality Float_t fcentMax; // max. centrality Bool_t idbHFEj; Bool_t iHybrid; Double_t fmimSig; // max. centrality Bool_t fmcData; // General histograms TH1 **fHistTracksPt; //!Track pt spectrum TH1 **fHistClustersPt; //!Cluster pt spectrum TH1 **fHistLeadingJetPt; //!Leading jet pt spectrum TH2 **fHistJetsPhiEta; //!Phi-Eta distribution of jets TH2 **fHistJetsPtArea; //!Jet pt vs. area TH2 **fHistJetsPtLeadHad; //!Jet pt vs. leading hadron TH2 **fHistJetsCorrPtArea; //!Jet pt - bkg vs. area TH3 *fHistPtDEtaDPhiTrackClus; //!track pt, delta eta, delta phi to matched cluster TH3 *fHistPtDEtaDPhiClusTrack; //!cluster pt, delta eta, delta phi to matched track TH1F *fHistClustDx; //! TH1F *fHistClustDz; //! TH1F *fHistMultCent; //! TH2F *fHistZcorr; //! TH1F *fHistCent; //! TH2F *fHistTPCnSigma; TH2F *fHistEopNsig; TH2F *fHistEop; TH2F *fHistEopHad; TH1F *fHistJetOrg; TH2F *fHistJetOrgArea; TH1F *fHistJetBG; TH1F *fHistJetSub; TH1F *fHisteJetOrg; TH1F *fHisteJetBG; TH1F *fHisteJetSub; TH1F *fHistIncEle; TH1F *fHistIncEleInJet0; TH1F *fHistIncEleInJet1; TH1F *fHistHfEleMC; TH1F *fHistHfEleMCreco; TH1F *fHistPhoEleMC; TH1F *fHistPhoEleMCreco; TH2F *fHistIncjet; TH2F *fHistIncjetFrac; TH2F *fHistIncjetOrg; TH2F *fHistIncjetBG; TH2F *fHistHFjet; TH2F *fHistULSjet; TH2F *fHistLSjet; TH2F *fInvmassULS; TH2F *fInvmassLS; THnSparse *HFjetCorr0; THnSparse *HFjetCorr1; THnSparse *HFjetParticle; TH1F *fQAHistJetPhi; TH1F *fQAHistTrPhiJet; TH1F *fQAHistTrPhi; TH1F *fQAHistNits; TH1F *fHistClustE; TH1F *fHistClustEtime; TH2F *fEMCClsEtaPhi; AliJetContainer *fJetsCont; //!Jets AliJetContainer *fJetsContPart; //!Jets particle AliParticleContainer *fTracksCont; //!Tracks AliClusterContainer *fCaloClustersCont; //!Clusters Bool_t tagHFjet(AliEmcalJet* jet, double *epT, int MCpid, double &maxpT_e); //void SelectPhotonicElectron(Int_t itrack, AliVTrack *track, Bool_t &fFlagPhotonicElec); void SelectPhotonicElectron(Int_t itrack, AliVTrack *track, Bool_t &fFlagPhotonicElec, Bool_t &fFlagConvinatElec); Bool_t isHeavyFlavour(int Mompdg); Bool_t isPhotonic(int Mompdg); //void MakeParticleLevelJet(THnSparse *pJet); void MakeParticleLevelJet(); //void SetCentralityMim(Int_t centMim) {fcentMim = centMim;}; //void SetCentralityMax(Int_t centMax) {fcentMax = centMax;}; private: //TClonesArray *ftrack; AliAODEvent *fAOD; TClonesArray *fMCarray; AliAODMCParticle *fMCparticle; AliAODMCParticle *fMCparticleMother; //Bool_t fmcData; AliAnalysisHFjetTagHFE(const AliAnalysisHFjetTagHFE&); // not implemented AliAnalysisHFjetTagHFE &operator=(const AliAnalysisHFjetTagHFE&); // not implemented ClassDef(AliAnalysisHFjetTagHFE, 6) // jet sample analysis task }; #endif
dlodato/AliPhysics
PWGHF/jetsHF/AliAnalysisHFjetTagHFE.h
C
bsd-3-clause
5,788
/** * @file mean_split_impl.hpp * @author Yash Vadalia * @author Ryan Curtin * * Implementation of class(MeanSplit) to split a binary space partition tree. * * This file is part of mlpack 2.0.1. * * mlpack is free software; you may redstribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpack. If not, see * http://www.opensource.org/licenses/BSD-3-Clause for more information. */ #ifndef __MLPACK_CORE_TREE_BINARY_SPACE_TREE_MEAN_SPLIT_IMPL_HPP #define __MLPACK_CORE_TREE_BINARY_SPACE_TREE_MEAN_SPLIT_IMPL_HPP #include "mean_split.hpp" namespace mlpack { namespace tree { template<typename BoundType, typename MatType> bool MeanSplit<BoundType, MatType>::SplitNode(const BoundType& bound, MatType& data, const size_t begin, const size_t count, size_t& splitCol) { size_t splitDimension = data.n_rows; // Indicate invalid. double maxWidth = -1; // Find the split dimension. If the bound is tight, we only need to consult // the bound's width. if (bound::BoundTraits<BoundType>::HasTightBounds) { for (size_t d = 0; d < data.n_rows; d++) { const double width = bound[d].Width(); if (width > maxWidth) { maxWidth = width; splitDimension = d; } } } else { // We must individually calculate bounding boxes. math::Range* ranges = new math::Range[data.n_rows]; for (size_t i = begin; i < begin + count; ++i) { // Expand each dimension as necessary. for (size_t d = 0; d < data.n_rows; ++d) { const double val = data(d, i); if (val < ranges[d].Lo()) ranges[d].Lo() = val; if (val > ranges[d].Hi()) ranges[d].Hi() = val; } } // Now, which is the widest? for (size_t d = 0; d < data.n_rows; d++) { const double width = ranges[d].Width(); if (width > maxWidth) { maxWidth = width; splitDimension = d; } } delete[] ranges; } if (maxWidth == 0) // All these points are the same. We can't split. return false; // Split in the mean of that dimension. double splitVal = 0.0; for (size_t i = begin; i < begin + count; ++i) splitVal += data(splitDimension, i); splitVal /= count; Log::Assert(splitVal >= bound[splitDimension].Lo()); Log::Assert(splitVal <= bound[splitDimension].Hi()); // Perform the actual splitting. This will order the dataset such that points // with value in dimension splitDimension less than or equal to splitVal are // on the left of splitCol, and points with value in dimension splitDimension // greater than splitVal are on the right side of splitCol. splitCol = PerformSplit(data, begin, count, splitDimension, splitVal); return true; } template<typename BoundType, typename MatType> bool MeanSplit<BoundType, MatType>::SplitNode(const BoundType& bound, MatType& data, const size_t begin, const size_t count, size_t& splitCol, std::vector<size_t>& oldFromNew) { size_t splitDimension = data.n_rows; // Indicate invalid. double maxWidth = -1; // Find the split dimension. If the bound is tight, we only need to consult // the bound's width. if (bound::BoundTraits<BoundType>::HasTightBounds) { for (size_t d = 0; d < data.n_rows; d++) { const double width = bound[d].Width(); if (width > maxWidth) { maxWidth = width; splitDimension = d; } } } else { // We must individually calculate bounding boxes. math::Range* ranges = new math::Range[data.n_rows]; for (size_t i = begin; i < begin + count; ++i) { // Expand each dimension as necessary. for (size_t d = 0; d < data.n_rows; ++d) { const double val = data(d, i); if (val < ranges[d].Lo()) ranges[d].Lo() = val; if (val > ranges[d].Hi()) ranges[d].Hi() = val; } } // Now, which is the widest? for (size_t d = 0; d < data.n_rows; d++) { const double width = ranges[d].Width(); if (width > maxWidth) { maxWidth = width; splitDimension = d; } } delete[] ranges; } if (maxWidth == 0) // All these points are the same. We can't split. return false; // Split in the mean of that dimension. double splitVal = 0.0; for (size_t i = begin; i < begin + count; ++i) splitVal += data(splitDimension, i); splitVal /= count; Log::Assert(splitVal >= bound[splitDimension].Lo()); Log::Assert(splitVal <= bound[splitDimension].Hi()); // Perform the actual splitting. This will order the dataset such that points // with value in dimension splitDimension less than or equal to splitVal are // on the left of splitCol, and points with value in dimension splitDimension // greater than splitVal are on the right side of splitCol. splitCol = PerformSplit(data, begin, count, splitDimension, splitVal, oldFromNew); return true; } template<typename BoundType, typename MatType> size_t MeanSplit<BoundType, MatType>:: PerformSplit(MatType& data, const size_t begin, const size_t count, const size_t splitDimension, const double splitVal) { // This method modifies the input dataset. We loop both from the left and // right sides of the points contained in this node. The points less than // splitVal should be on the left side of the matrix, and the points greater // than splitVal should be on the right side of the matrix. size_t left = begin; size_t right = begin + count - 1; // First half-iteration of the loop is out here because the termination // condition is in the middle. while ((data(splitDimension, left) < splitVal) && (left <= right)) left++; while ((data(splitDimension, right) >= splitVal) && (left <= right) && (right > 0)) right--; while (left <= right) { // Swap columns. data.swap_cols(left, right); // See how many points on the left are correct. When they are correct, // increase the left counter accordingly. When we encounter one that isn't // correct, stop. We will switch it later. while ((data(splitDimension, left) < splitVal) && (left <= right)) left++; // Now see how many points on the right are correct. When they are correct, // decrease the right counter accordingly. When we encounter one that isn't // correct, stop. We will switch it with the wrong point we found in the // previous loop. while ((data(splitDimension, right) >= splitVal) && (left <= right)) right--; } Log::Assert(left == right + 1); return left; } template<typename BoundType, typename MatType> size_t MeanSplit<BoundType, MatType>:: PerformSplit(MatType& data, const size_t begin, const size_t count, const size_t splitDimension, const double splitVal, std::vector<size_t>& oldFromNew) { // This method modifies the input dataset. We loop both from the left and // right sides of the points contained in this node. The points less than // splitVal should be on the left side of the matrix, and the points greater // than splitVal should be on the right side of the matrix. size_t left = begin; size_t right = begin + count - 1; // First half-iteration of the loop is out here because the termination // condition is in the middle. while ((data(splitDimension, left) < splitVal) && (left <= right)) left++; while ((data(splitDimension, right) >= splitVal) && (left <= right) && (right > 0)) right--; while (left <= right) { // Swap columns. data.swap_cols(left, right); // Update the indices for what we changed. size_t t = oldFromNew[left]; oldFromNew[left] = oldFromNew[right]; oldFromNew[right] = t; // See how many points on the left are correct. When they are correct, // increase the left counter accordingly. When we encounter one that isn't // correct, stop. We will switch it later. while ((data(splitDimension, left) < splitVal) && (left <= right)) left++; // Now see how many points on the right are correct. When they are correct, // decrease the right counter accordingly. When we encounter one that isn't // correct, stop. We will switch it with the wrong point we found in the // previous loop. while ((data(splitDimension, right) >= splitVal) && (left <= right)) right--; } Log::Assert(left == right + 1); return left; } } // namespace tree } // namespace mlpack #endif
KaimingOuyang/HPC-K-Means
src/mlpack/core/tree/binary_space_tree/mean_split_impl.hpp
C++
bsd-3-clause
9,097
#ifndef BOOST_SERIALIZATION_TRACKING_ENUM_HPP #define BOOST_SERIALIZATION_TRACKING_ENUM_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // tracking_enum.hpp: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for updates, documentation, and revision history. namespace boost { namespace serialization { // addresses of serialized objects may be tracked to avoid saving/loading // redundant copies. This header defines a class trait that can be used // to specify when objects should be tracked // names for each tracking level enum tracking_type { // never track this type track_never = 0, // track objects of this type if the object is serialized through a // pointer. track_selectivly = 1, // always track this type track_always = 2 }; } // namespace serialization } // namespace boost #endif // BOOST_SERIALIZATION_TRACKING_ENUM_HPP
darwin/upgradr
ieaddon/Upgradr/boost/serialization/tracking_enum.hpp
C++
bsd-3-clause
1,291
/* Copyright (C) 1995-1998 Eric Young ([email protected]) * All rights reserved. * * This package is an SSL implementation written * by Eric Young ([email protected]). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson ([email protected]). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young ([email protected])" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson ([email protected])" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ #include <openssl/bio.h> #include <assert.h> #include <errno.h> #include <stdio.h> #if !defined(OPENSSL_WINDOWS) #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #endif #include <openssl/buf.h> #include <openssl/err.h> #include <openssl/mem.h> #include "internal.h" enum { BIO_CONN_S_BEFORE, BIO_CONN_S_BLOCKED_CONNECT, BIO_CONN_S_OK, }; typedef struct bio_connect_st { int state; char *param_hostname; char *param_port; int nbio; uint8_t ip[4]; unsigned short port; struct sockaddr_storage them; socklen_t them_length; /* the file descriptor is kept in bio->num in order to match the socket * BIO. */ /* info_callback is called when the connection is initially made * callback(BIO,state,ret); The callback should return 'ret', state is for * compatibility with the SSL info_callback. */ int (*info_callback)(const BIO *bio, int state, int ret); } BIO_CONNECT; #if !defined(OPENSSL_WINDOWS) static int closesocket(int sock) { return close(sock); } #endif /* maybe_copy_ipv4_address sets |*ipv4| to the IPv4 address from |ss| (in * big-endian order), if |ss| contains an IPv4 socket address. */ static void maybe_copy_ipv4_address(uint8_t *ipv4, const struct sockaddr_storage *ss) { const struct sockaddr_in *sin; if (ss->ss_family != AF_INET) { return; } sin = (const struct sockaddr_in*) ss; memcpy(ipv4, &sin->sin_addr, 4); } static int conn_state(BIO *bio, BIO_CONNECT *c) { int ret = -1, i; char *p, *q; int (*cb)(const BIO *, int, int) = NULL; if (c->info_callback != NULL) { cb = c->info_callback; } for (;;) { switch (c->state) { case BIO_CONN_S_BEFORE: p = c->param_hostname; if (p == NULL) { OPENSSL_PUT_ERROR(BIO, conn_state, BIO_R_NO_HOSTNAME_SPECIFIED); goto exit_loop; } for (; *p != 0; p++) { if (*p == ':' || *p == '/') { break; } } i = *p; if (i == ':' || i == '/') { *(p++) = 0; if (i == ':') { for (q = p; *q; q++) { if (*q == '/') { *q = 0; break; } } if (c->param_port != NULL) { OPENSSL_free(c->param_port); } c->param_port = BUF_strdup(p); } } if (c->param_port == NULL) { OPENSSL_PUT_ERROR(BIO, conn_state, BIO_R_NO_PORT_SPECIFIED); ERR_add_error_data(2, "host=", c->param_hostname); goto exit_loop; } if (!bio_ip_and_port_to_socket_and_addr( &bio->num, &c->them, &c->them_length, c->param_hostname, c->param_port)) { OPENSSL_PUT_ERROR(BIO, conn_state, BIO_R_UNABLE_TO_CREATE_SOCKET); ERR_add_error_data(4, "host=", c->param_hostname, ":", c->param_port); goto exit_loop; } memset(c->ip, 0, 4); maybe_copy_ipv4_address(c->ip, &c->them); if (c->nbio) { if (!bio_socket_nbio(bio->num, 1)) { OPENSSL_PUT_ERROR(BIO, conn_state, BIO_R_ERROR_SETTING_NBIO); ERR_add_error_data(4, "host=", c->param_hostname, ":", c->param_port); goto exit_loop; } } i = 1; ret = setsockopt(bio->num, SOL_SOCKET, SO_KEEPALIVE, (char *)&i, sizeof(i)); if (ret < 0) { OPENSSL_PUT_SYSTEM_ERROR(setsockopt); OPENSSL_PUT_ERROR(BIO, conn_state, BIO_R_KEEPALIVE); ERR_add_error_data(4, "host=", c->param_hostname, ":", c->param_port); goto exit_loop; } BIO_clear_retry_flags(bio); ret = connect(bio->num, (struct sockaddr*) &c->them, c->them_length); if (ret < 0) { if (bio_fd_should_retry(ret)) { BIO_set_flags(bio, (BIO_FLAGS_IO_SPECIAL | BIO_FLAGS_SHOULD_RETRY)); c->state = BIO_CONN_S_BLOCKED_CONNECT; bio->retry_reason = BIO_RR_CONNECT; } else { OPENSSL_PUT_SYSTEM_ERROR(connect); OPENSSL_PUT_ERROR(BIO, conn_state, BIO_R_CONNECT_ERROR); ERR_add_error_data(4, "host=", c->param_hostname, ":", c->param_port); } goto exit_loop; } else { c->state = BIO_CONN_S_OK; } break; case BIO_CONN_S_BLOCKED_CONNECT: i = bio_sock_error(bio->num); if (i) { if (bio_fd_should_retry(ret)) { BIO_set_flags(bio, (BIO_FLAGS_IO_SPECIAL | BIO_FLAGS_SHOULD_RETRY)); c->state = BIO_CONN_S_BLOCKED_CONNECT; bio->retry_reason = BIO_RR_CONNECT; ret = -1; } else { BIO_clear_retry_flags(bio); OPENSSL_PUT_SYSTEM_ERROR(connect); OPENSSL_PUT_ERROR(BIO, conn_state, BIO_R_NBIO_CONNECT_ERROR); ERR_add_error_data(4, "host=", c->param_hostname, ":", c->param_port); ret = 0; } goto exit_loop; } else { c->state = BIO_CONN_S_OK; } break; case BIO_CONN_S_OK: ret = 1; goto exit_loop; default: assert(0); goto exit_loop; } if (cb != NULL) { ret = cb((BIO *)bio, c->state, ret); if (ret == 0) { goto end; } } } exit_loop: if (cb != NULL) { ret = cb((BIO *)bio, c->state, ret); } end: return ret; } static BIO_CONNECT *BIO_CONNECT_new(void) { BIO_CONNECT *ret = OPENSSL_malloc(sizeof(BIO_CONNECT)); if (ret == NULL) { return NULL; } memset(ret, 0, sizeof(BIO_CONNECT)); ret->state = BIO_CONN_S_BEFORE; return ret; } static void BIO_CONNECT_free(BIO_CONNECT *c) { if (c == NULL) { return; } if (c->param_hostname != NULL) { OPENSSL_free(c->param_hostname); } if (c->param_port != NULL) { OPENSSL_free(c->param_port); } OPENSSL_free(c); } static int conn_new(BIO *bio) { bio->init = 0; bio->num = -1; bio->flags = 0; bio->ptr = (char *)BIO_CONNECT_new(); return bio->ptr != NULL; } static void conn_close_socket(BIO *bio) { BIO_CONNECT *c = (BIO_CONNECT *) bio->ptr; if (bio->num == -1) { return; } /* Only do a shutdown if things were established */ if (c->state == BIO_CONN_S_OK) { shutdown(bio->num, 2); } closesocket(bio->num); bio->num = -1; } static int conn_free(BIO *bio) { if (bio == NULL) { return 0; } if (bio->shutdown) { conn_close_socket(bio); } BIO_CONNECT_free((BIO_CONNECT*) bio->ptr); return 1; } static int conn_read(BIO *bio, char *out, int out_len) { int ret = 0; BIO_CONNECT *data; data = (BIO_CONNECT *)bio->ptr; if (data->state != BIO_CONN_S_OK) { ret = conn_state(bio, data); if (ret <= 0) { return ret; } } bio_clear_socket_error(); ret = recv(bio->num, out, out_len, 0); BIO_clear_retry_flags(bio); if (ret <= 0) { if (bio_fd_should_retry(ret)) { BIO_set_retry_read(bio); } } return ret; } static int conn_write(BIO *bio, const char *in, int in_len) { int ret; BIO_CONNECT *data; data = (BIO_CONNECT *)bio->ptr; if (data->state != BIO_CONN_S_OK) { ret = conn_state(bio, data); if (ret <= 0) { return ret; } } bio_clear_socket_error(); ret = send(bio->num, in, in_len, 0); BIO_clear_retry_flags(bio); if (ret <= 0) { if (bio_fd_should_retry(ret)) { BIO_set_retry_write(bio); } } return ret; } static long conn_ctrl(BIO *bio, int cmd, long num, void *ptr) { int *ip; const char **pptr; long ret = 1; BIO_CONNECT *data; data = (BIO_CONNECT *)bio->ptr; switch (cmd) { case BIO_CTRL_RESET: ret = 0; data->state = BIO_CONN_S_BEFORE; conn_close_socket(bio); bio->flags = 0; break; case BIO_C_DO_STATE_MACHINE: /* use this one to start the connection */ if (data->state != BIO_CONN_S_OK) ret = (long)conn_state(bio, data); else ret = 1; break; case BIO_C_GET_CONNECT: /* TODO(fork): can this be removed? (Or maybe this whole file). */ if (ptr != NULL) { pptr = (const char **)ptr; if (num == 0) { *pptr = data->param_hostname; } else if (num == 1) { *pptr = data->param_port; } else if (num == 2) { *pptr = (char *) &data->ip[0]; } else if (num == 3) { *((int *)ptr) = data->port; } if (!bio->init) { *pptr = "not initialized"; } ret = 1; } break; case BIO_C_SET_CONNECT: if (ptr != NULL) { bio->init = 1; if (num == 0) { if (data->param_hostname != NULL) { OPENSSL_free(data->param_hostname); } data->param_hostname = BUF_strdup(ptr); } else if (num == 1) { if (data->param_port != NULL) { OPENSSL_free(data->param_port); } data->param_port = BUF_strdup(ptr); } else { ret = 0; } } break; case BIO_C_SET_NBIO: data->nbio = (int)num; break; case BIO_C_GET_FD: if (bio->init) { ip = (int *)ptr; if (ip != NULL) { *ip = bio->num; } ret = 1; } else { ret = 0; } break; case BIO_CTRL_GET_CLOSE: ret = bio->shutdown; break; case BIO_CTRL_SET_CLOSE: bio->shutdown = (int)num; break; case BIO_CTRL_PENDING: case BIO_CTRL_WPENDING: ret = 0; break; case BIO_CTRL_FLUSH: break; case BIO_CTRL_SET_CALLBACK: { #if 0 /* FIXME: Should this be used? -- Richard Levitte */ OPENSSL_PUT_ERROR(BIO, XXX, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); ret = -1; #else ret = 0; #endif } break; case BIO_CTRL_GET_CALLBACK: { int (**fptr)(const BIO *bio, int state, int xret); fptr = (int (**)(const BIO *bio, int state, int xret))ptr; *fptr = data->info_callback; } break; default: ret = 0; break; } return (ret); } static long conn_callback_ctrl(BIO *bio, int cmd, bio_info_cb fp) { long ret = 1; BIO_CONNECT *data; data = (BIO_CONNECT *)bio->ptr; switch (cmd) { case BIO_CTRL_SET_CALLBACK: { data->info_callback = (int (*)(const struct bio_st *, int, int))fp; } break; default: ret = 0; break; } return ret; } static int conn_puts(BIO *bp, const char *str) { return conn_write(bp, str, strlen(str)); } BIO *BIO_new_connect(const char *hostname) { BIO *ret; ret = BIO_new(BIO_s_connect()); if (ret == NULL) { return NULL; } if (!BIO_set_conn_hostname(ret, hostname)) { BIO_free(ret); return NULL; } return ret; } static const BIO_METHOD methods_connectp = { BIO_TYPE_CONNECT, "socket connect", conn_write, conn_read, conn_puts, NULL /* connect_gets, */, conn_ctrl, conn_new, conn_free, conn_callback_ctrl, }; const BIO_METHOD *BIO_s_connect(void) { return &methods_connectp; } int BIO_set_conn_hostname(BIO *bio, const char *name) { return BIO_ctrl(bio, BIO_C_SET_CONNECT, 0, (void*) name); } int BIO_set_conn_port(BIO *bio, const char *port_str) { return BIO_ctrl(bio, BIO_C_SET_CONNECT, 1, (void*) port_str); } int BIO_set_nbio(BIO *bio, int on) { return BIO_ctrl(bio, BIO_C_SET_NBIO, on, NULL); }
mxOBS/deb-pkg_trusty_chromium-browser
third_party/boringssl/src/crypto/bio/connect.c
C
bsd-3-clause
14,683
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * @category Zend * @package Zend_Service_Technorati * @subpackage UnitTests * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * Test helper */ /** * @see Zend_Service_Technorati_Utils */ /** * @category Zend * @package Zend_Service_Technorati * @subpackage UnitTests * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Service * @group Zend_Service_Technorati */ class Zend_Service_Technorati_UtilsTest extends Zend_Service_Technorati_TestCase { /** * @return void */ public function testSetUriHttpInputNullReturnsNull() { $this->assertNull(Zend_Service_Technorati_Utils::normalizeUriHttp(null)); } /** * @return void */ public function testSetUriHttpInputInvalidSchemeFtpThrowsException() { $scheme = 'ftp'; $inputInvalidScheme = "$scheme://example.com"; try { Zend_Service_Technorati_Utils::normalizeUriHttp($inputInvalidScheme); $this->fail('Expected Zend_Service_Technorati_Exception not thrown'); } catch (Zend_Service_Technorati_Exception $e) { $this->assertContains($scheme, $e->getMessage()); } } /** * @return void */ public function testSetDateInputNullReturnsNull() { $this->assertNull(Zend_Service_Technorati_Utils::normalizeDate(null)); } /** * @return void */ public function testSetDateInputDateInstanceReturnsInstance() { $date = new Zend_Date('2007-11-11 08:47:26 GMT'); $result = Zend_Service_Technorati_Utils::normalizeDate($date); $this->assertType('Zend_Date', $result); $this->assertEquals($date, $result); } /** * @return void */ public function testSetDateInputInvalidThrowsException() { $inputInvalid = "2007foo"; try { Zend_Service_Technorati_Utils::normalizeDate($inputInvalid); $this->fail('Expected Zend_Service_Technorati_Exception not thrown'); } catch (Zend_Service_Technorati_Exception $e) { $this->assertContains($inputInvalid, $e->getMessage()); } } }
TrafeX/zf2
tests/Zend/Service/Technorati/UtilsTest.php
PHP
bsd-3-clause
2,879
#ifndef NT2_ELLIPTIC_INCLUDE_FUNCTIONS_ELLIPJ_HPP_INCLUDED #define NT2_ELLIPTIC_INCLUDE_FUNCTIONS_ELLIPJ_HPP_INCLUDED #include <nt2/elliptic/functions/ellipj.hpp> #include <nt2/elliptic/functions/generic/ellipj.hpp> #include <nt2/elliptic/functions/complex/generic/ellipj.hpp> #endif
hainm/pythran
third_party/nt2/elliptic/include/functions/ellipj.hpp
C++
bsd-3-clause
286
// Copyright 2020 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_COMMON_EXTERNAL_POINTER_H_ #define V8_COMMON_EXTERNAL_POINTER_H_ #include "src/common/globals.h" namespace v8 { namespace internal { // Convert external pointer from on-V8-heap representation to an actual external // pointer value. V8_INLINE Address DecodeExternalPointer(IsolateRoot isolate, ExternalPointer_t encoded_pointer, ExternalPointerTag tag); constexpr ExternalPointer_t kNullExternalPointer = 0; // Creates uninitialized entry in external pointer table and writes the entry id // to the field. // When sandbox is not enabled, it's a no-op. V8_INLINE void InitExternalPointerField(Address field_address, Isolate* isolate); // Creates and initializes entry in external pointer table and writes the entry // id to the field. // Basically, it's InitExternalPointerField() followed by // WriteExternalPointerField(). V8_INLINE void InitExternalPointerField(Address field_address, Isolate* isolate, Address value, ExternalPointerTag tag); // Reads external pointer for the field, and decodes it if the sandbox is // enabled. V8_INLINE Address ReadExternalPointerField(Address field_address, IsolateRoot isolate, ExternalPointerTag tag); // Encodes value if the sandbox is enabled and writes it into the field. V8_INLINE void WriteExternalPointerField(Address field_address, Isolate* isolate, Address value, ExternalPointerTag tag); } // namespace internal } // namespace v8 #endif // V8_COMMON_EXTERNAL_POINTER_H_
youtube/cobalt
third_party/v8/src/common/external-pointer.h
C
bsd-3-clause
1,939
// // Copyright (c) 2004-2020 Jaroslaw Kowalski <[email protected]>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // * Neither the name of Jaroslaw Kowalski nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF // THE POSSIBILITY OF SUCH DAMAGE. // using NLog.Config; namespace NLog.UnitTests.Targets.Wrappers { using System; using System.Threading; using NLog.Common; using NLog.Targets; using NLog.Targets.Wrappers; using Xunit; public class AutoFlushTargetWrapperTests : NLogTestBase { [Fact] public void AutoFlushTargetWrapperSyncTest1() { var myTarget = new MyTarget(); var wrapper = new AutoFlushTargetWrapper { WrappedTarget = myTarget, }; myTarget.Initialize(null); wrapper.Initialize(null); var logEvent = new LogEventInfo(); Exception lastException = null; bool continuationHit = false; AsyncContinuation continuation = ex => { lastException = ex; continuationHit = true; }; wrapper.WriteAsyncLogEvent(logEvent.WithContinuation(continuation)); Assert.True(continuationHit); Assert.Null(lastException); Assert.Equal(1, myTarget.FlushCount); Assert.Equal(1, myTarget.WriteCount); continuationHit = false; wrapper.WriteAsyncLogEvent(logEvent.WithContinuation(continuation)); Assert.True(continuationHit); Assert.Null(lastException); Assert.Equal(2, myTarget.WriteCount); Assert.Equal(2, myTarget.FlushCount); } [Fact] public void AutoFlushTargetWrapperAsyncTest1() { var myTarget = new MyAsyncTarget(); var wrapper = new AutoFlushTargetWrapper(myTarget); myTarget.Initialize(null); wrapper.Initialize(null); var logEvent = new LogEventInfo(); Exception lastException = null; var continuationHit = new ManualResetEvent(false); AsyncContinuation continuation = ex => { lastException = ex; continuationHit.Set(); }; wrapper.WriteAsyncLogEvent(logEvent.WithContinuation(continuation)); continuationHit.WaitOne(); Assert.Null(lastException); Assert.Equal(1, myTarget.FlushCount); Assert.Equal(1, myTarget.WriteCount); continuationHit.Reset(); wrapper.WriteAsyncLogEvent(logEvent.WithContinuation(continuation)); continuationHit.WaitOne(); Assert.Null(lastException); Assert.Equal(2, myTarget.WriteCount); Assert.Equal(2, myTarget.FlushCount); } [Fact] public void AutoFlushTargetWrapperAsyncTest2() { var myTarget = new MyAsyncTarget(); var wrapper = new AutoFlushTargetWrapper(myTarget); myTarget.Initialize(null); wrapper.Initialize(null); var logEvent = new LogEventInfo(); Exception lastException = null; for (int i = 0; i < 100; ++i) { wrapper.WriteAsyncLogEvent(logEvent.WithContinuation(ex => lastException = ex)); } var continuationHit = new ManualResetEvent(false); AsyncContinuation continuation = ex => { continuationHit.Set(); }; wrapper.Flush(ex => { }); Assert.Null(lastException); wrapper.Flush(continuation); Assert.Null(lastException); continuationHit.WaitOne(); Assert.Null(lastException); wrapper.Flush(ex => { }); // Executed right away Assert.Null(lastException); Assert.Equal(100, myTarget.WriteCount); Assert.Equal(103, myTarget.FlushCount); } [Fact] public void AutoFlushTargetWrapperAsyncWithExceptionTest1() { var myTarget = new MyAsyncTarget { ThrowExceptions = true, }; var wrapper = new AutoFlushTargetWrapper(myTarget); myTarget.Initialize(null); wrapper.Initialize(null); var logEvent = new LogEventInfo(); Exception lastException = null; var continuationHit = new ManualResetEvent(false); AsyncContinuation continuation = ex => { lastException = ex; continuationHit.Set(); }; wrapper.WriteAsyncLogEvent(logEvent.WithContinuation(continuation)); continuationHit.WaitOne(); Assert.NotNull(lastException); Assert.IsType<InvalidOperationException>(lastException); // no flush on exception Assert.Equal(0, myTarget.FlushCount); Assert.Equal(1, myTarget.WriteCount); continuationHit.Reset(); lastException = null; wrapper.WriteAsyncLogEvent(logEvent.WithContinuation(continuation)); continuationHit.WaitOne(); Assert.NotNull(lastException); Assert.IsType<InvalidOperationException>(lastException); Assert.Equal(0, myTarget.FlushCount); Assert.Equal(2, myTarget.WriteCount); } [Fact] public void AutoFlushConditionConfigurationTest() { LogManager.Configuration = XmlLoggingConfiguration.CreateFromXmlString(@"<nlog> <targets> <target type='AutoFlushWrapper' condition='level >= LogLevel.Debug' name='FlushOnError'> <target name='d2' type='Debug' /> </target> </targets> <rules> <logger name='*' level='Warn' writeTo='FlushOnError'> </logger> </rules> </nlog>"); var target = LogManager.Configuration.FindTargetByName("FlushOnError") as AutoFlushTargetWrapper; Assert.NotNull(target); Assert.NotNull(target.Condition); Assert.Equal("(level >= Debug)", target.Condition.ToString()); Assert.Equal("d2", target.WrappedTarget.Name); } [Fact] public void AutoFlushOnConditionTest() { var testTarget = new MyTarget(); var autoFlushWrapper = new AutoFlushTargetWrapper(testTarget); autoFlushWrapper.Condition = "level > LogLevel.Info"; testTarget.Initialize(null); autoFlushWrapper.Initialize(null); AsyncContinuation continuation = ex => { }; autoFlushWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Info, "*", "test").WithContinuation(continuation)); autoFlushWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Trace, "*", "test").WithContinuation(continuation)); Assert.Equal(2, testTarget.WriteCount); Assert.Equal(0, testTarget.FlushCount); autoFlushWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Warn, "*", "test").WithContinuation(continuation)); autoFlushWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Error, "*", "test").WithContinuation(continuation)); Assert.Equal(4, testTarget.WriteCount); Assert.Equal(2, testTarget.FlushCount); } [Fact] public void MultipleConditionalAutoFlushWrappersTest() { var testTarget = new MyTarget(); var autoFlushOnLevelWrapper = new AutoFlushTargetWrapper(testTarget); autoFlushOnLevelWrapper.Condition = "level > LogLevel.Info"; var autoFlushOnMessageWrapper = new AutoFlushTargetWrapper(autoFlushOnLevelWrapper); autoFlushOnMessageWrapper.Condition = "contains('${message}','FlushThis')"; testTarget.Initialize(null); autoFlushOnLevelWrapper.Initialize(null); autoFlushOnMessageWrapper.Initialize(null); AsyncContinuation continuation = ex => { }; autoFlushOnMessageWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Trace, "*", "test").WithContinuation(continuation)); Assert.Equal(1, testTarget.WriteCount); Assert.Equal(0, testTarget.FlushCount); autoFlushOnMessageWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Fatal, "*", "test").WithContinuation(continuation)); Assert.Equal(2, testTarget.WriteCount); Assert.Equal(1, testTarget.FlushCount); autoFlushOnMessageWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Trace, "*", "Please FlushThis").WithContinuation(continuation)); Assert.Equal(3, testTarget.WriteCount); Assert.Equal(2, testTarget.FlushCount); } [Fact] public void BufferingAutoFlushWrapperTest() { var testTarget = new MyTarget(); var bufferingTargetWrapper = new BufferingTargetWrapper(testTarget, 100); var autoFlushOnLevelWrapper = new AutoFlushTargetWrapper(bufferingTargetWrapper); autoFlushOnLevelWrapper.Condition = "level > LogLevel.Info"; testTarget.Initialize(null); bufferingTargetWrapper.Initialize(null); autoFlushOnLevelWrapper.Initialize(null); AsyncContinuation continuation = ex => { }; autoFlushOnLevelWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Trace, "*", "test").WithContinuation(continuation)); Assert.Equal(0, testTarget.WriteCount); Assert.Equal(0, testTarget.FlushCount); autoFlushOnLevelWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Fatal, "*", "test").WithContinuation(continuation)); Assert.Equal(2, testTarget.WriteCount); Assert.Equal(1, testTarget.FlushCount); autoFlushOnLevelWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Trace, "*", "Please do not FlushThis").WithContinuation(continuation)); Assert.Equal(2, testTarget.WriteCount); Assert.Equal(1, testTarget.FlushCount); autoFlushOnLevelWrapper.Flush(continuation); Assert.Equal(3, testTarget.WriteCount); Assert.Equal(2, testTarget.FlushCount); } [Fact] public void IgnoreExplicitAutoFlushWrapperTest() { var testTarget = new MyTarget(); var bufferingTargetWrapper = new BufferingTargetWrapper(testTarget, 100); var autoFlushOnLevelWrapper = new AutoFlushTargetWrapper(bufferingTargetWrapper); autoFlushOnLevelWrapper.Condition = "level > LogLevel.Info"; autoFlushOnLevelWrapper.FlushOnConditionOnly = true; testTarget.Initialize(null); bufferingTargetWrapper.Initialize(null); autoFlushOnLevelWrapper.Initialize(null); AsyncContinuation continuation = ex => { }; autoFlushOnLevelWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Trace, "*", "test").WithContinuation(continuation)); Assert.Equal(0, testTarget.WriteCount); Assert.Equal(0, testTarget.FlushCount); autoFlushOnLevelWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Fatal, "*", "test").WithContinuation(continuation)); Assert.Equal(2, testTarget.WriteCount); Assert.Equal(1, testTarget.FlushCount); autoFlushOnLevelWrapper.WriteAsyncLogEvent(LogEventInfo.Create(LogLevel.Trace, "*", "Please do not FlushThis").WithContinuation(continuation)); Assert.Equal(2, testTarget.WriteCount); Assert.Equal(1, testTarget.FlushCount); autoFlushOnLevelWrapper.Flush(continuation); Assert.Equal(2, testTarget.WriteCount); Assert.Equal(1, testTarget.FlushCount); } class MyAsyncTarget : Target { public int FlushCount { get; private set; } public int WriteCount { get; private set; } protected override void Write(LogEventInfo logEvent) { throw new NotSupportedException(); } protected override void Write(AsyncLogEventInfo logEvent) { Assert.True(FlushCount <= WriteCount); WriteCount++; ThreadPool.QueueUserWorkItem( s => { if (ThrowExceptions) { logEvent.Continuation(new InvalidOperationException("Some problem!")); logEvent.Continuation(new InvalidOperationException("Some problem!")); } else { logEvent.Continuation(null); logEvent.Continuation(null); } }); } protected override void FlushAsync(AsyncContinuation asyncContinuation) { FlushCount++; ThreadPool.QueueUserWorkItem( s => asyncContinuation(null)); } public bool ThrowExceptions { get; set; } } class MyTarget : Target { public int FlushCount { get; set; } public int WriteCount { get; set; } protected override void Write(LogEventInfo logEvent) { Assert.True(FlushCount <= WriteCount); WriteCount++; } protected override void FlushAsync(AsyncContinuation asyncContinuation) { FlushCount++; asyncContinuation(null); } } } }
BrutalCode/NLog
tests/NLog.UnitTests/Targets/Wrappers/AutoFlushTargetWrapperTests.cs
C#
bsd-3-clause
15,602
/* Copyright ESIEE (2009) [email protected] This software is an image processing library whose purpose is to be used primarily for research and teaching. This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info". As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability. In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. */ #ifdef __cplusplus extern "C" { #endif #ifndef _MCIMAGE_H #include <mcimage.h> #endif #define CARRE(i,j) ((i%2)+(j%2)==2) #define INTER(i,j) ((i%2)+(j%2)==1) #define INTERH(i,j) ((i%2)&&(!(j%2))) #define INTERV(i,j) ((!(i%2))&&(j%2)) #define SINGL(i,j) ((i%2)+(j%2)==0) #define DIM2D(i,j) ((i%2)+(j%2)) #define NDG_CARRE 255 #define NDG_INTER 200 #define NDG_SINGL 128 #define GRS2D 3 #define GCS2D 3 #define VAL_NULLE 0 #define VAL_OBJET 255 #define VAL_MARQUE 1 extern void InitPileGrilles2d(); extern void TerminePileGrilles2d(); extern struct xvimage * Khalimskize2d(struct xvimage *o); extern struct xvimage * KhalimskizeNDG2d(struct xvimage *o); extern struct xvimage * DeKhalimskize2d(struct xvimage *o); extern void Khalimskize2d_noalloc(struct xvimage *o, struct xvimage *k); extern void KhalimskizeNDG2d_noalloc(struct xvimage *o, struct xvimage *k); extern void DeKhalimskize2d_noalloc(struct xvimage *o, struct xvimage *r); extern void ndgmin2d(struct xvimage *k); extern void ndgminbeta2d(struct xvimage *k); extern void ndgmax2d(struct xvimage *k); extern void ndgmaxbeta2d(struct xvimage *k); extern void ndgmoy2d(struct xvimage *k); extern void ndg2grad2d(struct xvimage *k); extern void ndg4grad2d(struct xvimage *k); extern void Connex8Obj2d(struct xvimage *o); extern void Connex4Obj2d(struct xvimage *o); extern void Betapoint2d(index_t rs, index_t cs, index_t i, index_t j, index_t *tab, int32_t *n); extern void Alphapoint2d(index_t rs, index_t cs, index_t i, index_t j, index_t *tab, int32_t *n); extern void Betacarre2d(index_t rs, index_t cs, index_t i, index_t j, index_t *tab, int32_t *n); extern void Alphacarre2d(index_t rs, index_t cs, index_t i, index_t j, index_t *tab, int32_t *n); extern void Thetacarre2d(index_t rs, index_t cs, index_t i, index_t j, index_t *tab, int32_t *n); extern int32_t CardBetapoint2d(uint8_t *K, index_t rs, index_t cs, index_t i, index_t j); extern int32_t CardThetaCarre2d(struct xvimage *k, index_t i, index_t j, uint8_t val); extern int32_t BetaTerminal2d(uint8_t *K, index_t rs, index_t cs, index_t i, index_t j); extern int32_t ExactementUnBetaTerminal2d(uint8_t *K, index_t rs, index_t cs); extern void SatureAlphacarre2d(struct xvimage *k); extern void AjouteAlphacarre2d(struct xvimage *k); extern void AjouteBetacarre2d(struct xvimage *k); extern void MaxAlpha2d(struct xvimage *k); extern void MaxBeta2d(struct xvimage *k); extern void ColorieKh2d(struct xvimage *k); extern void EffaceLiensLibres2d(struct xvimage *k); extern void CopieAlphacarre2d(uint8_t *G,uint8_t *K,index_t rs,index_t cs,index_t i,index_t j); extern index_t EffaceBetaTerminauxSimples2d(struct xvimage *k); extern int32_t EnsembleSimple2d(struct xvimage *k); extern int32_t Ensemble2Contractile2d(struct xvimage *b); extern void Htkern2d(struct xvimage *b, int32_t n); extern int32_t AlphaSimple2d(struct xvimage *b, index_t i, index_t j); extern int32_t BetaSimple2d(struct xvimage *b, index_t i, index_t j); extern int32_t Alpha2Simple2d(struct xvimage *b, index_t i, index_t j); extern int32_t Beta2Simple2d(struct xvimage *b, index_t i, index_t j); extern index_t EulerKh2d(struct xvimage *b); extern int32_t FaceLibre2d(struct xvimage *b, index_t i, index_t j); extern int32_t PaireLibre2d(struct xvimage *b, index_t i, index_t j); extern int32_t Collapse2d(struct xvimage *b, index_t i, index_t j); #ifdef __cplusplus } #endif
quanhua92/torch-android
src/3rdparty/imgraph/pink/mckhalimsky2d.h
C
bsd-3-clause
4,958
package com.oracle.xmlns.apps.marketing.leadmgmt.leads.leadservice.types; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import com.oracle.xmlns.apps.marketing.leadmgmt.leads.leadservice.MklProdAssoc; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="result" type="{http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/}MklProdAssoc"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "result" }) @XmlRootElement(name = "createSalesLeadProductAsyncResponse") public class CreateSalesLeadProductAsyncResponse { @XmlElement(required = true) protected MklProdAssoc result; /** * Gets the value of the result property. * * @return * possible object is * {@link MklProdAssoc } * */ public MklProdAssoc getResult() { return result; } /** * Sets the value of the result property. * * @param value * allowed object is * {@link MklProdAssoc } * */ public void setResult(MklProdAssoc value) { this.result = value; } }
dushmis/Oracle-Cloud
PaaS_SaaS_Accelerator_RESTFulFacade/FusionProxy_SalesLeadsService/src/com/oracle/xmlns/apps/marketing/leadmgmt/leads/leadservice/types/CreateSalesLeadProductAsyncResponse.java
Java
bsd-3-clause
1,754
#ifndef __BP_REGISTER_SHARED_PTR_CONVERTER_HPP__ #define __BP_REGISTER_SHARED_PTR_CONVERTER_HPP__ #include <boost/python/register_ptr_to_python.hpp> namespace bp = boost::python; /* Fix to avoid registration warnings in pycaffe (#3960) */ #define BP_REGISTER_SHARED_PTR_TO_PYTHON(PTR) do { \ const boost::python::type_info info = \ boost::python::type_id<boost::shared_ptr<PTR > >(); \ const boost::python::converter::registration* reg = \ boost::python::converter::registry::query(info); \ if (reg == NULL) { \ bp::register_ptr_to_python<boost::shared_ptr<PTR > >(); \ } else if ((*reg).m_to_python == NULL) { \ bp::register_ptr_to_python<boost::shared_ptr<PTR > >(); \ } \ } while (0) #endif
drmateo/ecto
src/pybindings/converter.hpp
C++
bsd-3-clause
724
/*** * ASM tests * Copyright (c) 2000-2011 INRIA, France Telecom * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ package org.objectweb.asm.commons; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.objectweb.asm.AbstractTest; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; /** * Simple example of using AdviceAdapter to implement tracing callback * * @author Eugene Kuleshov */ public class AdviceAdapterUnitTest extends AbstractTest { @Override public void test() throws Exception { Class<?> c = getClass(); String name = c.getName(); AdvisingClassLoader cl = new AdvisingClassLoader(name + "$"); Class<?> cc = cl.loadClass(name + "$B"); Method m = cc.getMethod("run", new Class<?>[] { Integer.TYPE }); try { m.invoke(null, new Object[] { new Integer(0) }); } catch (InvocationTargetException e) { throw (Exception) e.getTargetException(); } } private static class AdvisingClassLoader extends ClassLoader { private String prefix; public AdvisingClassLoader(final String prefix) throws IOException { this.prefix = prefix; } @Override public Class<?> loadClass(final String name) throws ClassNotFoundException { if (name.startsWith(prefix)) { try { ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); ClassReader cr = new ClassReader(getClass() .getResourceAsStream( "/" + name.replace('.', '/') + ".class")); cr.accept(new AdviceClassAdapter(cw), ClassReader.EXPAND_FRAMES); byte[] bytecode = cw.toByteArray(); return super .defineClass(name, bytecode, 0, bytecode.length); } catch (IOException ex) { throw new ClassNotFoundException("Load error: " + ex.toString(), ex); } } return super.loadClass(name); } } // test callback private static int n = 0; public static void enter(final String msg) { System.err.println(off().append("enter ").append(msg).toString()); n++; } public static void exit(final String msg) { n--; System.err.println(off().append("<").toString()); } private static StringBuffer off() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < n; i++) { sb.append(" "); } return sb; } static class AdviceClassAdapter extends ClassVisitor implements Opcodes { String cname; public AdviceClassAdapter(final ClassVisitor cv) { super(Opcodes.ASM5, cv); } @Override public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { this.cname = name; super.visit(version, access, name, signature, superName, interfaces); } @Override public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions); if (mv == null || (access & (Opcodes.ACC_ABSTRACT | Opcodes.ACC_NATIVE)) > 0) { return mv; } return new AdviceAdapter(Opcodes.ASM5, mv, access, name, desc) { @Override protected void onMethodEnter() { mv.visitLdcInsn(cname + "." + name + desc); mv.visitMethodInsn(INVOKESTATIC, "org/objectweb/asm/commons/AdviceAdapterUnitTest", "enter", "(Ljava/lang/String;)V"); } @Override protected void onMethodExit(final int opcode) { mv.visitLdcInsn(cname + "." + name + desc); mv.visitMethodInsn(INVOKESTATIC, "org/objectweb/asm/commons/AdviceAdapterUnitTest", "exit", "(Ljava/lang/String;)V"); } }; } } // TEST CLASSES public static class A { final String s; public A(final String s) { this.s = s; } public A(final A a) { this.s = a.s; } } public static class B extends A { public B() { super(new B("")); test(this); } public B(final A a) { super(a); test(this); } public B(final String s) { super(s == null ? new A("") : new A(s)); test(this); } private static A aa; public B(final String s, final A a) { this(s == null ? aa = new A(s) : a); A aa = new A(""); test(aa); } public B(final String s, final String s1) { super(s != null ? new A(getA(s1).s) : new A(s)); test(this); } private void test(final Object b) { } private static A getA(final String s) { return new A(s); } // execute all public static void run(final int n) { new B(); new B(new A("")); new B(new B()); new B("", new A("")); new B("", ""); } } }
llbit/ow2-asm
test/conform/org/objectweb/asm/commons/AdviceAdapterUnitTest.java
Java
bsd-3-clause
7,481
import diskcache import requests import tempfile import os from bisect import bisect_left url = 'https://data.kitware.com/api/v1/file' def angle_to_page(angle): if angle < -72 or angle > 73: return (None, None) angles = range(-73, 74, 2) index = bisect_left(angles, angle) return (index, angles[index] if index else None) # Get the test data def test_image(): _id = '5893921d8d777f07219fca7e' download_url = '%s/%s/download' % (url, _id) cache_path = os.path.join(tempfile.gettempdir(), 'tomviz_test_cache') cache = diskcache.Cache(cache_path) if download_url not in cache: response = requests.get(download_url, stream=True) response.raise_for_status() cache.set(download_url, response.raw, read=True) return cache.get(download_url, read=True) # Get the test black image def test_black_image(): _id = '58dd39b28d777f0aef5d8ce5' download_url = '%s/%s/download' % (url, _id) cache_path = os.path.join(tempfile.gettempdir(), 'tomviz_test_cache') cache = diskcache.Cache(cache_path) if download_url not in cache: response = requests.get(download_url, stream=True) response.raise_for_status() cache.set(download_url, response.raw, read=True) return cache.get(download_url, read=True) def test_dm3_tilt_series(): """ A generator yielding the dm3 files forming a tilt series. The files are downloaded from data.kitware.com. """ _ids = [ '5a69e8408d777f0649e0350f', '5a69e8408d777f0649e03515', '5a69e8408d777f0649e0351b', '5a69e8418d777f0649e03521', '5a69e8418d777f0649e03527' ] cache_path = os.path.join(tempfile.gettempdir(), 'tomviz_test_cache') cache = diskcache.Cache(cache_path) def gen(): for _id in _ids: file_url = '%s/%s' % (url, _id) response = requests.get(file_url) response.raise_for_status() name = response.json()['name'] download_url = '%s/download' % file_url if name not in cache: response = requests.get(download_url, stream=True) response.raise_for_status() cache.set(name, response.raw, read=True) yield (name, cache.get(name, read=True)) return gen()
mathturtle/tomviz
acquisition/tests/mock/__init__.py
Python
bsd-3-clause
2,327
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/renderer_host/render_widget_host_view_win.h" #include <algorithm> #include <map> #include <stack> #include "base/bind.h" #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/i18n/rtl.h" #include "base/metrics/histogram.h" #include "base/process_util.h" #include "base/threading/thread.h" #include "base/win/metro.h" #include "base/win/scoped_comptr.h" #include "base/win/scoped_gdi_object.h" #include "base/win/win_util.h" #include "base/win/windows_version.h" #include "base/win/wrapped_window_proc.h" #include "content/browser/accessibility/browser_accessibility_state_impl.h" #include "content/browser/accessibility/browser_accessibility_win.h" #include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/browser/gpu/gpu_process_host.h" #include "content/browser/gpu/gpu_process_host_ui_shim.h" #include "content/browser/renderer_host/backing_store.h" #include "content/browser/renderer_host/backing_store_win.h" #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/ui_events_helper.h" #include "content/common/accessibility_messages.h" #include "content/common/gpu/gpu_messages.h" #include "content/common/plugin_messages.h" #include "content/common/view_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" #include "content/public/common/content_switches.h" #include "content/public/common/page_zoom.h" #include "content/public/common/process_type.h" #include "skia/ext/skia_utils_win.h" #include "third_party/skia/include/core/SkRegion.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h" #include "ui/base/events/event.h" #include "ui/base/events/event_utils.h" #include "ui/base/ime/composition_text.h" #include "ui/base/l10n/l10n_util_win.h" #include "ui/base/text/text_elider.h" #include "ui/base/ui_base_switches.h" #include "ui/base/view_prop.h" #include "ui/base/win/hwnd_util.h" #include "ui/base/win/mouse_wheel_util.h" #include "ui/gfx/canvas.h" #include "ui/gfx/rect.h" #include "ui/gfx/screen.h" #include "webkit/glue/webcursor.h" #include "webkit/plugins/npapi/plugin_constants_win.h" #include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "win8/util/win8_util.h" using base::TimeDelta; using base::TimeTicks; using ui::ViewProp; using WebKit::WebInputEvent; using WebKit::WebInputEventFactory; using WebKit::WebMouseEvent; using WebKit::WebTextDirection; namespace content { namespace { // Tooltips will wrap after this width. Yes, wrap. Imagine that! const int kTooltipMaxWidthPixels = 300; // Maximum number of characters we allow in a tooltip. const int kMaxTooltipLength = 1024; // A custom MSAA object id used to determine if a screen reader is actively // listening for MSAA events. const int kIdCustom = 1; // The delay before the compositor host window is destroyed. This gives the GPU // process a grace period to stop referencing it. const int kDestroyCompositorHostWindowDelay = 10000; // In mouse lock mode, we need to prevent the (invisible) cursor from hitting // the border of the view, in order to get valid movement information. However, // forcing the cursor back to the center of the view after each mouse move // doesn't work well. It reduces the frequency of useful WM_MOUSEMOVE messages // significantly. Therefore, we move the cursor to the center of the view only // if it approaches the border. |kMouseLockBorderPercentage| specifies the width // of the border area, in percentage of the corresponding dimension. const int kMouseLockBorderPercentage = 15; // A callback function for EnumThreadWindows to enumerate and dismiss // any owned popup windows. BOOL CALLBACK DismissOwnedPopups(HWND window, LPARAM arg) { const HWND toplevel_hwnd = reinterpret_cast<HWND>(arg); if (::IsWindowVisible(window)) { const HWND owner = ::GetWindow(window, GW_OWNER); if (toplevel_hwnd == owner) { ::PostMessage(window, WM_CANCELMODE, 0, 0); } } return TRUE; } void SendToGpuProcessHost(int gpu_host_id, scoped_ptr<IPC::Message> message) { GpuProcessHost* gpu_process_host = GpuProcessHost::FromID(gpu_host_id); if (!gpu_process_host) return; gpu_process_host->Send(message.release()); } void PostTaskOnIOThread(const tracked_objects::Location& from_here, base::Closure task) { BrowserThread::PostTask(BrowserThread::IO, from_here, task); } bool DecodeZoomGesture(HWND hwnd, const GESTUREINFO& gi, PageZoom* zoom, POINT* zoom_center) { static long start = 0; static POINT zoom_first; if (gi.dwFlags == GF_BEGIN) { start = gi.ullArguments; zoom_first.x = gi.ptsLocation.x; zoom_first.y = gi.ptsLocation.y; ScreenToClient(hwnd, &zoom_first); return false; } if (gi.dwFlags == GF_END) return false; POINT zoom_second = {0}; zoom_second.x = gi.ptsLocation.x; zoom_second.y = gi.ptsLocation.y; ScreenToClient(hwnd, &zoom_second); if (zoom_first.x == zoom_second.x && zoom_first.y == zoom_second.y) return false; zoom_center->x = (zoom_first.x + zoom_second.x) / 2; zoom_center->y = (zoom_first.y + zoom_second.y) / 2; double zoom_factor = static_cast<double>(gi.ullArguments)/static_cast<double>(start); *zoom = zoom_factor >= 1 ? PAGE_ZOOM_IN : PAGE_ZOOM_OUT; start = gi.ullArguments; zoom_first = zoom_second; return true; } bool DecodeScrollGesture(const GESTUREINFO& gi, POINT* start, POINT* delta){ // Windows gestures are streams of messages with begin/end messages that // separate each new gesture. We key off the begin message to reset // the static variables. static POINT last_pt; static POINT start_pt; if (gi.dwFlags == GF_BEGIN) { delta->x = 0; delta->y = 0; start_pt.x = gi.ptsLocation.x; start_pt.y = gi.ptsLocation.y; } else { delta->x = gi.ptsLocation.x - last_pt.x; delta->y = gi.ptsLocation.y - last_pt.y; } last_pt.x = gi.ptsLocation.x; last_pt.y = gi.ptsLocation.y; *start = start_pt; return true; } WebKit::WebMouseWheelEvent MakeFakeScrollWheelEvent(HWND hwnd, POINT start, POINT delta) { WebKit::WebMouseWheelEvent result; result.type = WebInputEvent::MouseWheel; result.timeStampSeconds = ::GetMessageTime() / 1000.0; result.button = WebMouseEvent::ButtonNone; result.globalX = start.x; result.globalY = start.y; // Map to window coordinates. POINT client_point = { result.globalX, result.globalY }; MapWindowPoints(0, hwnd, &client_point, 1); result.x = client_point.x; result.y = client_point.y; result.windowX = result.x; result.windowY = result.y; // Note that we support diagonal scrolling. result.deltaX = static_cast<float>(delta.x); result.wheelTicksX = WHEEL_DELTA; result.deltaY = static_cast<float>(delta.y); result.wheelTicksY = WHEEL_DELTA; return result; } static const int kTouchMask = 0x7; inline int GetTouchType(const TOUCHINPUT& point) { return point.dwFlags & kTouchMask; } inline void SetTouchType(TOUCHINPUT* point, int type) { point->dwFlags = (point->dwFlags & kTouchMask) | type; } ui::EventType ConvertToUIEvent(WebKit::WebTouchPoint::State t) { switch (t) { case WebKit::WebTouchPoint::StatePressed: return ui::ET_TOUCH_PRESSED; case WebKit::WebTouchPoint::StateMoved: return ui::ET_TOUCH_MOVED; case WebKit::WebTouchPoint::StateStationary: return ui::ET_TOUCH_STATIONARY; case WebKit::WebTouchPoint::StateReleased: return ui::ET_TOUCH_RELEASED; case WebKit::WebTouchPoint::StateCancelled: return ui::ET_TOUCH_CANCELLED; default: DCHECK(false) << "Unexpected ui type. " << t; return ui::ET_UNKNOWN; } } // Creates a WebGestureEvent corresponding to the given |gesture| WebKit::WebGestureEvent CreateWebGestureEvent(HWND hwnd, const ui::GestureEvent& gesture) { WebKit::WebGestureEvent gesture_event = MakeWebGestureEventFromUIEvent(gesture); POINT client_point = gesture.location().ToPOINT(); POINT screen_point = gesture.location().ToPOINT(); MapWindowPoints(::GetParent(hwnd), hwnd, &client_point, 1); MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1); gesture_event.x = client_point.x; gesture_event.y = client_point.y; gesture_event.globalX = screen_point.x; gesture_event.globalY = screen_point.y; return gesture_event; } WebKit::WebGestureEvent CreateFlingCancelEvent(double time_stamp) { WebKit::WebGestureEvent gesture_event; gesture_event.timeStampSeconds = time_stamp; gesture_event.type = WebKit::WebGestureEvent::GestureFlingCancel; return gesture_event; } class TouchEventFromWebTouchPoint : public ui::TouchEvent { public: TouchEventFromWebTouchPoint(const WebKit::WebTouchPoint& touch_point, base::TimeDelta& timestamp) : ui::TouchEvent(ConvertToUIEvent(touch_point.state), touch_point.position, touch_point.id, timestamp) { set_radius(touch_point.radiusX, touch_point.radiusY); set_rotation_angle(touch_point.rotationAngle); set_force(touch_point.force); set_flags(ui::GetModifiersFromKeyState()); } virtual ~TouchEventFromWebTouchPoint() {} private: DISALLOW_COPY_AND_ASSIGN(TouchEventFromWebTouchPoint); }; bool ShouldSendPinchGesture() { static bool pinch_allowed = CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePinch); return pinch_allowed; } } // namespace const wchar_t kRenderWidgetHostHWNDClass[] = L"Chrome_RenderWidgetHostHWND"; // Wrapper for maintaining touchstate associated with a WebTouchEvent. class WebTouchState { public: explicit WebTouchState(const RenderWidgetHostViewWin* window); // Updates the current touchpoint state with the supplied touches. // Touches will be consumed only if they are of the same type (e.g. down, // up, move). Returns the number of consumed touches. size_t UpdateTouchPoints(TOUCHINPUT* points, size_t count); // Marks all active touchpoints as released. bool ReleaseTouchPoints(); // The contained WebTouchEvent. const WebKit::WebTouchEvent& touch_event() { return touch_event_; } // Returns if any touches are modified in the event. bool is_changed() { return touch_event_.changedTouchesLength != 0; } private: typedef std::map<unsigned int, int> MapType; // Adds a touch point or returns NULL if there's not enough space. WebKit::WebTouchPoint* AddTouchPoint(TOUCHINPUT* touch_input); // Copy details from a TOUCHINPUT to an existing WebTouchPoint, returning // true if the resulting point is a stationary move. bool UpdateTouchPoint(WebKit::WebTouchPoint* touch_point, TOUCHINPUT* touch_input); // Find (or create) a mapping for _os_touch_id_. unsigned int GetMappedTouch(unsigned int os_touch_id); // Remove any mappings that are no longer in use. void RemoveExpiredMappings(); WebKit::WebTouchEvent touch_event_; const RenderWidgetHostViewWin* const window_; // Maps OS touch Id's into an internal (WebKit-friendly) touch-id. // WebKit expects small consecutive integers, starting at 0. MapType touch_map_; DISALLOW_COPY_AND_ASSIGN(WebTouchState); }; typedef void (*MetroSetFrameWindow)(HWND window); typedef void (*MetroCloseFrameWindow)(HWND window); /////////////////////////////////////////////////////////////////////////////// // RenderWidgetHostViewWin, public: RenderWidgetHostViewWin::RenderWidgetHostViewWin(RenderWidgetHost* widget) : render_widget_host_(RenderWidgetHostImpl::From(widget)), compositor_host_window_(NULL), hide_compositor_window_at_next_paint_(false), track_mouse_leave_(false), ime_notification_(false), capture_enter_key_(false), is_hidden_(false), about_to_validate_and_paint_(false), close_on_deactivate_(false), being_destroyed_(false), tooltip_hwnd_(NULL), tooltip_showing_(false), weak_factory_(this), is_loading_(false), text_input_type_(ui::TEXT_INPUT_TYPE_NONE), can_compose_inline_(true), is_fullscreen_(false), ignore_mouse_movement_(true), composition_range_(ui::Range::InvalidRange()), ALLOW_THIS_IN_INITIALIZER_LIST( touch_state_(new WebTouchState(this))), pointer_down_context_(false), last_touch_location_(-1, -1), touch_events_enabled_(false), ALLOW_THIS_IN_INITIALIZER_LIST( gesture_recognizer_(ui::GestureRecognizer::Create(this))) { render_widget_host_->SetView(this); registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED, NotificationService::AllBrowserContextsAndSources()); } RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { UnlockMouse(); ResetTooltip(); } void RenderWidgetHostViewWin::CreateWnd(HWND parent) { // ATL function to create the window. Create(parent); } /////////////////////////////////////////////////////////////////////////////// // RenderWidgetHostViewWin, RenderWidgetHostView implementation: void RenderWidgetHostViewWin::InitAsChild( gfx::NativeView parent_view) { CreateWnd(parent_view); } void RenderWidgetHostViewWin::InitAsPopup( RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { close_on_deactivate_ = true; DoPopupOrFullscreenInit(parent_host_view->GetNativeView(), pos, WS_EX_TOOLWINDOW); } void RenderWidgetHostViewWin::InitAsFullscreen( RenderWidgetHostView* reference_host_view) { gfx::Rect pos = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( reference_host_view->GetNativeView()).bounds(); is_fullscreen_ = true; DoPopupOrFullscreenInit(ui::GetWindowToParentTo(true), pos, 0); } RenderWidgetHost* RenderWidgetHostViewWin::GetRenderWidgetHost() const { return render_widget_host_; } void RenderWidgetHostViewWin::WasShown() { if (!is_hidden_) return; if (web_contents_switch_paint_time_.is_null()) web_contents_switch_paint_time_ = TimeTicks::Now(); is_hidden_ = false; // |render_widget_host_| may be NULL if the WebContentsImpl is in the process // of closing. if (render_widget_host_) render_widget_host_->WasShown(); } void RenderWidgetHostViewWin::WasHidden() { if (is_hidden_) return; // If we receive any more paint messages while we are hidden, we want to // ignore them so we don't re-allocate the backing store. We will paint // everything again when we become selected again. is_hidden_ = true; ResetTooltip(); // If we have a renderer, then inform it that we are being hidden so it can // reduce its resource utilization. if (render_widget_host_) render_widget_host_->WasHidden(); if (accelerated_surface_.get()) accelerated_surface_->WasHidden(); if (GetBrowserAccessibilityManager()) GetBrowserAccessibilityManager()->WasHidden(); } void RenderWidgetHostViewWin::SetSize(const gfx::Size& size) { SetBounds(gfx::Rect(GetViewBounds().origin(), size)); } void RenderWidgetHostViewWin::SetBounds(const gfx::Rect& rect) { if (is_hidden_) return; // No SWP_NOREDRAW as autofill popups can move and the underneath window // should redraw in that case. UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; // If the style is not popup, you have to convert the point to client // coordinate. POINT point = { rect.x(), rect.y() }; if (GetStyle() & WS_CHILD) ScreenToClient(&point); SetWindowPos(NULL, point.x, point.y, rect.width(), rect.height(), swp_flags); render_widget_host_->WasResized(); } gfx::NativeView RenderWidgetHostViewWin::GetNativeView() const { return m_hWnd; } gfx::NativeViewId RenderWidgetHostViewWin::GetNativeViewId() const { return reinterpret_cast<gfx::NativeViewId>(m_hWnd); } gfx::NativeViewAccessible RenderWidgetHostViewWin::GetNativeViewAccessible() { if (render_widget_host_ && !BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { // Attempt to detect screen readers by sending an event with our custom id. NotifyWinEvent(EVENT_SYSTEM_ALERT, m_hWnd, kIdCustom, CHILDID_SELF); } if (!GetBrowserAccessibilityManager()) { // Return busy document tree while renderer accessibility tree loads. AccessibilityNodeData::State busy_state = static_cast<AccessibilityNodeData::State>( 1 << AccessibilityNodeData::STATE_BUSY); SetBrowserAccessibilityManager( BrowserAccessibilityManager::CreateEmptyDocument( m_hWnd, busy_state, this)); } return GetBrowserAccessibilityManager()->GetRoot()-> ToBrowserAccessibilityWin(); } void RenderWidgetHostViewWin::MovePluginWindows( const gfx::Vector2d& scroll_offset, const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { MovePluginWindowsHelper(m_hWnd, plugin_window_moves); } static BOOL CALLBACK AddChildWindowToVector(HWND hwnd, LPARAM lparam) { std::vector<HWND>* vector = reinterpret_cast<std::vector<HWND>*>(lparam); vector->push_back(hwnd); return TRUE; } void RenderWidgetHostViewWin::CleanupCompositorWindow() { if (!compositor_host_window_) return; // Hide the compositor and parent it to the desktop rather than destroying // it immediately. The GPU process has a grace period to stop accessing the // window. TODO(apatrick): the GPU process should acknowledge that it has // finished with the window handle and the browser process should destroy it // at that point. ::ShowWindow(compositor_host_window_, SW_HIDE); ::SetParent(compositor_host_window_, NULL); BrowserThread::PostDelayedTask( BrowserThread::UI, FROM_HERE, base::Bind(base::IgnoreResult(&::DestroyWindow), compositor_host_window_), base::TimeDelta::FromMilliseconds(kDestroyCompositorHostWindowDelay)); compositor_host_window_ = NULL; } bool RenderWidgetHostViewWin::IsActivatable() const { // Popups should not be activated. return popup_type_ == WebKit::WebPopupTypeNone; } void RenderWidgetHostViewWin::Focus() { if (IsWindow()) SetFocus(); } void RenderWidgetHostViewWin::Blur() { NOTREACHED(); } bool RenderWidgetHostViewWin::HasFocus() const { return ::GetFocus() == m_hWnd; } bool RenderWidgetHostViewWin::IsSurfaceAvailableForCopy() const { return !!render_widget_host_->GetBackingStore(false) || !!accelerated_surface_.get(); } void RenderWidgetHostViewWin::Show() { ShowWindow(SW_SHOW); WasShown(); } void RenderWidgetHostViewWin::Hide() { if (!is_fullscreen_ && GetParent() == ui::GetWindowToParentTo(true)) { LOG(WARNING) << "Hide() called twice in a row: " << this << ":" << GetParent(); return; } if (::GetFocus() == m_hWnd) ::SetFocus(NULL); ShowWindow(SW_HIDE); WasHidden(); } bool RenderWidgetHostViewWin::IsShowing() { return !!IsWindowVisible(); } gfx::Rect RenderWidgetHostViewWin::GetViewBounds() const { CRect window_rect; GetWindowRect(&window_rect); return gfx::Rect(window_rect); } void RenderWidgetHostViewWin::UpdateCursor(const WebCursor& cursor) { current_cursor_ = cursor; UpdateCursorIfOverSelf(); } void RenderWidgetHostViewWin::UpdateCursorIfOverSelf() { static HCURSOR kCursorArrow = LoadCursor(NULL, IDC_ARROW); static HCURSOR kCursorAppStarting = LoadCursor(NULL, IDC_APPSTARTING); static HINSTANCE module_handle = GetModuleHandle( GetContentClient()->browser()->GetResourceDllName()); // If the mouse is over our HWND, then update the cursor state immediately. CPoint pt; GetCursorPos(&pt); if (WindowFromPoint(pt) == m_hWnd) { // We cannot pass in NULL as the module handle as this would only work for // standard win32 cursors. We can also receive cursor types which are // defined as webkit resources. We need to specify the module handle of // chrome.dll while loading these cursors. HCURSOR display_cursor = current_cursor_.GetCursor(module_handle); // If a page is in the loading state, we want to show the Arrow+Hourglass // cursor only when the current cursor is the ARROW cursor. In all other // cases we should continue to display the current cursor. if (is_loading_ && display_cursor == kCursorArrow) display_cursor = kCursorAppStarting; SetCursor(display_cursor); } } void RenderWidgetHostViewWin::SetIsLoading(bool is_loading) { is_loading_ = is_loading; UpdateCursorIfOverSelf(); } void RenderWidgetHostViewWin::TextInputStateChanged( const ViewHostMsg_TextInputState_Params& params) { if (text_input_type_ != params.type || can_compose_inline_ != params.can_compose_inline) { text_input_type_ = params.type; can_compose_inline_ = params.can_compose_inline; UpdateIMEState(); } } void RenderWidgetHostViewWin::SelectionBoundsChanged( const gfx::Rect& start_rect, WebKit::WebTextDirection start_direction, const gfx::Rect& end_rect, WebKit::WebTextDirection end_direction) { bool is_enabled = (text_input_type_ != ui::TEXT_INPUT_TYPE_NONE && text_input_type_ != ui::TEXT_INPUT_TYPE_PASSWORD); // Only update caret position if the input method is enabled. if (is_enabled) { caret_rect_ = gfx::UnionRects(start_rect, end_rect); ime_input_.UpdateCaretRect(m_hWnd, caret_rect_); } } void RenderWidgetHostViewWin::ImeCancelComposition() { ime_input_.CancelIME(m_hWnd); } void RenderWidgetHostViewWin::ImeCompositionRangeChanged( const ui::Range& range, const std::vector<gfx::Rect>& character_bounds) { composition_range_ = range; composition_character_bounds_ = character_bounds; } void RenderWidgetHostViewWin::Redraw() { RECT damage_bounds; GetUpdateRect(&damage_bounds, FALSE); base::win::ScopedGDIObject<HRGN> damage_region(CreateRectRgn(0, 0, 0, 0)); GetUpdateRgn(damage_region, FALSE); // Paint the invalid region synchronously. Our caller will not paint again // until we return, so by painting to the screen here, we ensure effective // rate-limiting of backing store updates. This helps a lot on pages that // have animations or fairly expensive layout (e.g., google maps). // // We paint this window synchronously, however child windows (i.e. plugins) // are painted asynchronously. By avoiding synchronous cross-process window // message dispatching we allow scrolling to be smooth, and also avoid the // browser process locking up if the plugin process is hung. // RedrawWindow(NULL, damage_region, RDW_UPDATENOW | RDW_NOCHILDREN); // Send the invalid rect in screen coordinates. gfx::Rect invalid_screen_rect(damage_bounds); invalid_screen_rect.Offset(GetViewBounds().OffsetFromOrigin()); PaintPluginWindowsHelper(m_hWnd, invalid_screen_rect); } void RenderWidgetHostViewWin::DidUpdateBackingStore( const gfx::Rect& scroll_rect, const gfx::Vector2d& scroll_delta, const std::vector<gfx::Rect>& copy_rects) { if (is_hidden_) return; // Schedule invalidations first so that the ScrollWindowEx call is closer to // Redraw. That minimizes chances of "flicker" resulting if the screen // refreshes before we have a chance to paint the exposed area. Somewhat // surprisingly, this ordering matters. for (size_t i = 0; i < copy_rects.size(); ++i) InvalidateRect(&copy_rects[i].ToRECT(), false); if (!scroll_rect.IsEmpty()) { RECT clip_rect = scroll_rect.ToRECT(); ScrollWindowEx(scroll_delta.x(), scroll_delta.y(), NULL, &clip_rect, NULL, NULL, SW_INVALIDATE); } if (!about_to_validate_and_paint_) Redraw(); } void RenderWidgetHostViewWin::RenderViewGone(base::TerminationStatus status, int error_code) { UpdateCursorIfOverSelf(); Destroy(); } void RenderWidgetHostViewWin::WillWmDestroy() { CleanupCompositorWindow(); } void RenderWidgetHostViewWin::Destroy() { // We've been told to destroy. // By clearing close_on_deactivate_, we prevent further deactivations // (caused by windows messages resulting from the DestroyWindow) from // triggering further destructions. The deletion of this is handled by // OnFinalMessage(); close_on_deactivate_ = false; render_widget_host_ = NULL; being_destroyed_ = true; CleanupCompositorWindow(); if (is_fullscreen_ && win8::IsSingleWindowMetroMode()) { MetroCloseFrameWindow close_frame_window = reinterpret_cast<MetroCloseFrameWindow>( ::GetProcAddress(base::win::GetMetroModule(), "CloseFrameWindow")); DCHECK(close_frame_window); close_frame_window(m_hWnd); } DestroyWindow(); } void RenderWidgetHostViewWin::SetTooltipText(const string16& tooltip_text) { if (!is_hidden_) EnsureTooltip(); // Clamp the tooltip length to kMaxTooltipLength so that we don't // accidentally DOS the user with a mega tooltip (since Windows doesn't seem // to do this itself). const string16 new_tooltip_text = ui::TruncateString(tooltip_text, kMaxTooltipLength); if (new_tooltip_text != tooltip_text_) { tooltip_text_ = new_tooltip_text; // Need to check if the tooltip is already showing so that we don't // immediately show the tooltip with no delay when we move the mouse from // a region with no tooltip to a region with a tooltip. if (::IsWindow(tooltip_hwnd_) && tooltip_showing_) { ::SendMessage(tooltip_hwnd_, TTM_POP, 0, 0); ::SendMessage(tooltip_hwnd_, TTM_POPUP, 0, 0); } } else { // Make sure the tooltip gets closed after TTN_POP gets sent. For some // reason this doesn't happen automatically, so moving the mouse around // within the same link/image/etc doesn't cause the tooltip to re-appear. if (!tooltip_showing_) { if (::IsWindow(tooltip_hwnd_)) ::SendMessage(tooltip_hwnd_, TTM_POP, 0, 0); } } } BackingStore* RenderWidgetHostViewWin::AllocBackingStore( const gfx::Size& size) { return new BackingStoreWin(render_widget_host_, size); } void RenderWidgetHostViewWin::CopyFromCompositingSurface( const gfx::Rect& src_subrect, const gfx::Size& dst_size, const base::Callback<void(bool)>& callback, skia::PlatformBitmap* output) { base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false)); if (!accelerated_surface_.get()) return; if (dst_size.IsEmpty()) return; if (!output->Allocate(dst_size.width(), dst_size.height(), true)) return; scoped_callback_runner.Release(); accelerated_surface_->AsyncCopyTo( src_subrect, dst_size, output->GetBitmap().getPixels(), callback); } void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { RenderWidgetHostViewBase::SetBackground(background); render_widget_host_->SetBackground(background); } void RenderWidgetHostViewWin::ProcessAckedTouchEvent( const WebKit::WebTouchEvent& touch, InputEventAckState ack_result) { DCHECK(touch_events_enabled_); ScopedVector<ui::TouchEvent> events; if (!MakeUITouchEventsFromWebTouchEvents(touch, &events)) return; ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), end = events.end(); iter != end; ++iter) { scoped_ptr<ui::GestureRecognizer::Gestures> gestures; gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( *(*iter), result, this)); ProcessGestures(gestures.get()); } } void RenderWidgetHostViewWin::UpdateDesiredTouchMode() { // Make sure that touch events even make sense. CommandLine* cmdline = CommandLine::ForCurrentProcess(); static bool touch_mode = base::win::GetVersion() >= base::win::VERSION_WIN7 && base::win::IsTouchEnabled() && ( !cmdline->HasSwitch(switches::kTouchEvents) || cmdline->GetSwitchValueASCII(switches::kTouchEvents) != switches::kTouchEventsDisabled); if (!touch_mode) return; // Now we know that the window's current state doesn't match the desired // state. If we want touch mode, then we attempt to register for touch // events, and otherwise to unregister. touch_events_enabled_ = RegisterTouchWindow(m_hWnd, TWF_WANTPALM) == TRUE; if (!touch_events_enabled_) { UnregisterTouchWindow(m_hWnd); // Single finger panning is consistent with other windows applications. const DWORD gesture_allow = GC_PAN_WITH_SINGLE_FINGER_VERTICALLY | GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY; const DWORD gesture_block = GC_PAN_WITH_GUTTER; GESTURECONFIG gc[] = { { GID_ZOOM, GC_ZOOM, 0 }, { GID_PAN, gesture_allow , gesture_block}, { GID_TWOFINGERTAP, GC_TWOFINGERTAP , 0}, { GID_PRESSANDTAP, GC_PRESSANDTAP , 0} }; if (!SetGestureConfig(m_hWnd, 0, arraysize(gc), gc, sizeof(GESTURECONFIG))) NOTREACHED(); } } bool RenderWidgetHostViewWin::DispatchLongPressGestureEvent( ui::GestureEvent* event) { return ForwardGestureEventToRenderer(event); } bool RenderWidgetHostViewWin::DispatchCancelTouchEvent( ui::TouchEvent* event) { if (!render_widget_host_ || !touch_events_enabled_ || !render_widget_host_->ShouldForwardTouchEvent()) { return false; } DCHECK(event->type() == WebKit::WebInputEvent::TouchCancel); WebKit::WebTouchEvent cancel_event; cancel_event.type = WebKit::WebInputEvent::TouchCancel; cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); render_widget_host_->ForwardTouchEvent(cancel_event); return true; } void RenderWidgetHostViewWin::SetHasHorizontalScrollbar( bool has_horizontal_scrollbar) { } void RenderWidgetHostViewWin::SetScrollOffsetPinning( bool is_pinned_to_left, bool is_pinned_to_right) { } void RenderWidgetHostViewWin::SetCompositionText( const ui::CompositionText& composition) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; } if (!render_widget_host_) return; // ui::CompositionUnderline should be identical to // WebKit::WebCompositionUnderline, so that we can do reinterpret_cast safely. COMPILE_ASSERT(sizeof(ui::CompositionUnderline) == sizeof(WebKit::WebCompositionUnderline), ui_CompositionUnderline__WebKit_WebCompositionUnderline_diff); const std::vector<WebKit::WebCompositionUnderline>& underlines = reinterpret_cast<const std::vector<WebKit::WebCompositionUnderline>&>( composition.underlines); render_widget_host_->ImeSetComposition(composition.text, underlines, composition.selection.end(), composition.selection.end()); } void RenderWidgetHostViewWin::ConfirmCompositionText() { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); } void RenderWidgetHostViewWin::ClearCompositionText() { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); } void RenderWidgetHostViewWin::InsertText(const string16& text) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; } if (render_widget_host_) render_widget_host_->ImeConfirmComposition(text); } void RenderWidgetHostViewWin::InsertChar(char16 ch, int flags) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); } ui::TextInputType RenderWidgetHostViewWin::GetTextInputType() const { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return ui::TEXT_INPUT_TYPE_NONE; } return text_input_type_; } bool RenderWidgetHostViewWin::CanComposeInline() const { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); return false; } gfx::Rect RenderWidgetHostViewWin::GetCaretBounds() { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return gfx::Rect(0, 0, 0, 0); } RECT tmp_rect = caret_rect_.ToRECT(); ClientToScreen(&tmp_rect); return gfx::Rect(tmp_rect); } bool RenderWidgetHostViewWin::GetCompositionCharacterBounds( uint32 index, gfx::Rect* rect) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } DCHECK(rect); if (index >= composition_character_bounds_.size()) return false; RECT rec = composition_character_bounds_[index].ToRECT(); ClientToScreen(&rec); *rect = gfx::Rect(rec); return true; } bool RenderWidgetHostViewWin::HasCompositionText() { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); return false; } bool RenderWidgetHostViewWin::GetTextRange(ui::Range* range) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } range->set_start(selection_text_offset_); range->set_end(selection_text_offset_ + selection_text_.length()); return false; } bool RenderWidgetHostViewWin::GetCompositionTextRange(ui::Range* range) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); return false; } bool RenderWidgetHostViewWin::GetSelectionRange(ui::Range* range) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } range->set_start(selection_range_.start()); range->set_end(selection_range_.end()); return false; } bool RenderWidgetHostViewWin::SetSelectionRange(const ui::Range& range) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); return false; } bool RenderWidgetHostViewWin::DeleteRange(const ui::Range& range) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); return false; } bool RenderWidgetHostViewWin::GetTextFromRange(const ui::Range& range, string16* text) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } ui::Range selection_text_range(selection_text_offset_, selection_text_offset_ + selection_text_.length()); if (!selection_text_range.Contains(range)) { text->clear(); return false; } if (selection_text_range.EqualsIgnoringDirection(range)) { *text = selection_text_; } else { *text = selection_text_.substr( range.GetMin() - selection_text_offset_, range.length()); } return true; } void RenderWidgetHostViewWin::OnInputMethodChanged() { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); } bool RenderWidgetHostViewWin::ChangeTextDirectionAndLayoutAlignment( base::i18n::TextDirection direction) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; } // TODO(nona): Implement this function. NOTIMPLEMENTED(); return false; } void RenderWidgetHostViewWin::ExtendSelectionAndDelete( size_t before, size_t after) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; } if (!render_widget_host_) return; render_widget_host_->ExtendSelectionAndDelete(before, after); } /////////////////////////////////////////////////////////////////////////////// // RenderWidgetHostViewWin, private: LRESULT RenderWidgetHostViewWin::OnCreate(CREATESTRUCT* create_struct) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnCreate"); // Call the WM_INPUTLANGCHANGE message handler to initialize the input locale // of a browser process. OnInputLangChange(0, 0); // Marks that window as supporting mouse-wheel messages rerouting so it is // scrolled when under the mouse pointer even if inactive. props_.push_back(ui::SetWindowSupportsRerouteMouseWheel(m_hWnd)); UpdateDesiredTouchMode(); UpdateIMEState(); return 0; } void RenderWidgetHostViewWin::OnActivate(UINT action, BOOL minimized, HWND window) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnActivate"); // If the container is a popup, clicking elsewhere on screen should close the // popup. if (close_on_deactivate_ && action == WA_INACTIVE) { // Send a windows message so that any derived classes // will get a change to override the default handling SendMessage(WM_CANCELMODE); } } void RenderWidgetHostViewWin::OnDestroy() { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnDestroy"); DetachPluginsHelper(m_hWnd); props_.clear(); if (base::win::GetVersion() >= base::win::VERSION_WIN7 && IsTouchWindow(m_hWnd, NULL)) { UnregisterTouchWindow(m_hWnd); } CleanupCompositorWindow(); ResetTooltip(); TrackMouseLeave(false); } void RenderWidgetHostViewWin::OnPaint(HDC unused_dc) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnPaint"); // Grab the region to paint before creation of paint_dc since it clears the // damage region. base::win::ScopedGDIObject<HRGN> damage_region(CreateRectRgn(0, 0, 0, 0)); GetUpdateRgn(damage_region, FALSE); CPaintDC paint_dc(m_hWnd); if (!render_widget_host_) return; DCHECK(render_widget_host_->GetProcess()->HasConnection()); // If the GPU process is rendering to a child window, compositing is // already triggered by damage to compositor_host_window_, so all we need to // do here is clear borders during resize. if (compositor_host_window_ && render_widget_host_->is_accelerated_compositing_active()) { RECT host_rect, child_rect; GetClientRect(&host_rect); if (::GetClientRect(compositor_host_window_, &child_rect) && (child_rect.right < host_rect.right || child_rect.bottom < host_rect.bottom)) { paint_dc.FillRect(&host_rect, reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH))); } return; } if (accelerated_surface_.get() && render_widget_host_->is_accelerated_compositing_active()) { AcceleratedPaint(paint_dc.m_hDC); return; } about_to_validate_and_paint_ = true; BackingStoreWin* backing_store = static_cast<BackingStoreWin*>( render_widget_host_->GetBackingStore(true)); // We initialize |paint_dc| (and thus call BeginPaint()) after calling // GetBackingStore(), so that if it updates the invalid rect we'll catch the // changes and repaint them. about_to_validate_and_paint_ = false; if (compositor_host_window_ && hide_compositor_window_at_next_paint_) { ::ShowWindow(compositor_host_window_, SW_HIDE); hide_compositor_window_at_next_paint_ = false; } gfx::Rect damaged_rect(paint_dc.m_ps.rcPaint); if (damaged_rect.IsEmpty()) return; if (backing_store) { gfx::Rect bitmap_rect(gfx::Point(), backing_store->size()); bool manage_colors = BackingStoreWin::ColorManagementEnabled(); if (manage_colors) SetICMMode(paint_dc.m_hDC, ICM_ON); // Blit only the damaged regions from the backing store. DWORD data_size = GetRegionData(damage_region, 0, NULL); scoped_array<char> region_data_buf; RGNDATA* region_data = NULL; RECT* region_rects = NULL; if (data_size) { region_data_buf.reset(new char[data_size]); region_data = reinterpret_cast<RGNDATA*>(region_data_buf.get()); region_rects = reinterpret_cast<RECT*>(region_data->Buffer); data_size = GetRegionData(damage_region, data_size, region_data); } if (!data_size) { // Grabbing the damaged regions failed, fake with the whole rect. data_size = sizeof(RGNDATAHEADER) + sizeof(RECT); region_data_buf.reset(new char[data_size]); region_data = reinterpret_cast<RGNDATA*>(region_data_buf.get()); region_rects = reinterpret_cast<RECT*>(region_data->Buffer); region_data->rdh.nCount = 1; region_rects[0] = damaged_rect.ToRECT(); } for (DWORD i = 0; i < region_data->rdh.nCount; ++i) { gfx::Rect paint_rect = gfx::IntersectRects(bitmap_rect, gfx::Rect(region_rects[i])); if (!paint_rect.IsEmpty()) { BitBlt(paint_dc.m_hDC, paint_rect.x(), paint_rect.y(), paint_rect.width(), paint_rect.height(), backing_store->hdc(), paint_rect.x(), paint_rect.y(), SRCCOPY); } } if (manage_colors) SetICMMode(paint_dc.m_hDC, ICM_OFF); // Fill the remaining portion of the damaged_rect with the background if (damaged_rect.right() > bitmap_rect.right()) { RECT r; r.left = std::max(bitmap_rect.right(), damaged_rect.x()); r.right = damaged_rect.right(); r.top = damaged_rect.y(); r.bottom = std::min(bitmap_rect.bottom(), damaged_rect.bottom()); DrawBackground(r, &paint_dc); } if (damaged_rect.bottom() > bitmap_rect.bottom()) { RECT r; r.left = damaged_rect.x(); r.right = damaged_rect.right(); r.top = std::max(bitmap_rect.bottom(), damaged_rect.y()); r.bottom = damaged_rect.bottom(); DrawBackground(r, &paint_dc); } if (!whiteout_start_time_.is_null()) { TimeDelta whiteout_duration = TimeTicks::Now() - whiteout_start_time_; UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration", whiteout_duration); // Reset the start time to 0 so that we start recording again the next // time the backing store is NULL... whiteout_start_time_ = TimeTicks(); } if (!web_contents_switch_paint_time_.is_null()) { TimeDelta web_contents_switch_paint_duration = TimeTicks::Now() - web_contents_switch_paint_time_; UMA_HISTOGRAM_TIMES("MPArch.RWH_TabSwitchPaintDuration", web_contents_switch_paint_duration); // Reset contents_switch_paint_time_ to 0 so future tab selections are // recorded. web_contents_switch_paint_time_ = TimeTicks(); } } else { DrawBackground(paint_dc.m_ps.rcPaint, &paint_dc); if (whiteout_start_time_.is_null()) whiteout_start_time_ = TimeTicks::Now(); } } void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect, CPaintDC* dc) { if (!background_.empty()) { gfx::Rect dirty_area(dirty_rect); gfx::Canvas canvas(dirty_area.size(), ui::SCALE_FACTOR_100P, true); canvas.Translate(-dirty_area.OffsetFromOrigin()); gfx::Rect dc_rect(dc->m_ps.rcPaint); // TODO(pkotwicz): Fix |background_| such that it is an ImageSkia. canvas.TileImageInt(gfx::ImageSkia(background_), 0, 0, dc_rect.width(), dc_rect.height()); skia::DrawToNativeContext(canvas.sk_canvas(), *dc, dirty_area.x(), dirty_area.y(), NULL); } else { HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH)); dc->FillRect(&dirty_rect, white_brush); } } void RenderWidgetHostViewWin::OnNCPaint(HRGN update_region) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnNCPaint"); // Do nothing. This suppresses the resize corner that Windows would // otherwise draw for us. } void RenderWidgetHostViewWin::SetClickthroughRegion(SkRegion* region) { transparent_region_.reset(region); } LRESULT RenderWidgetHostViewWin::OnNCHitTest(const CPoint& point) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnNCHitTest"); RECT rc; GetWindowRect(&rc); if (transparent_region_.get() && transparent_region_->contains(point.x - rc.left, point.y - rc.top)) { SetMsgHandled(TRUE); return HTTRANSPARENT; } SetMsgHandled(FALSE); return 0; } LRESULT RenderWidgetHostViewWin::OnEraseBkgnd(HDC dc) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnEraseBkgnd"); return 1; } LRESULT RenderWidgetHostViewWin::OnSetCursor(HWND window, UINT hittest_code, UINT mouse_message_id) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnSetCursor"); UpdateCursorIfOverSelf(); return 0; } void RenderWidgetHostViewWin::OnSetFocus(HWND window) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnSetFocus"); if (!render_widget_host_) return; if (GetBrowserAccessibilityManager()) GetBrowserAccessibilityManager()->GotFocus(pointer_down_context_); render_widget_host_->GotFocus(); render_widget_host_->SetActive(true); if (base::win::IsTSFAwareRequired()) ui::TSFBridge::GetInstance()->SetFocusedClient(m_hWnd, this); } void RenderWidgetHostViewWin::OnKillFocus(HWND window) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnKillFocus"); if (!render_widget_host_) return; render_widget_host_->SetActive(false); render_widget_host_->Blur(); last_touch_location_ = gfx::Point(-1, -1); if (base::win::IsTSFAwareRequired()) ui::TSFBridge::GetInstance()->RemoveFocusedClient(this); } void RenderWidgetHostViewWin::OnCaptureChanged(HWND window) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnCaptureChanged"); if (render_widget_host_) render_widget_host_->LostCapture(); pointer_down_context_ = false; } void RenderWidgetHostViewWin::OnCancelMode() { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnCancelMode"); if (render_widget_host_) render_widget_host_->LostCapture(); if ((is_fullscreen_ || close_on_deactivate_) && !weak_factory_.HasWeakPtrs()) { // Dismiss popups and menus. We do this asynchronously to avoid changing // activation within this callstack, which may interfere with another window // being activated. We can synchronously hide the window, but we need to // not change activation while doing so. SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER); MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&RenderWidgetHostViewWin::ShutdownHost, weak_factory_.GetWeakPtr())); } } void RenderWidgetHostViewWin::OnInputLangChange(DWORD character_set, HKL input_language_id) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnInputLangChange"); // Send the given Locale ID to the ImeInput object and retrieves whether // or not the current input context has IMEs. // If the current input context has IMEs, a browser process has to send a // request to a renderer process that it needs status messages about // the focused edit control from the renderer process. // On the other hand, if the current input context does not have IMEs, the // browser process also has to send a request to the renderer process that // it does not need the status messages any longer. // To minimize the number of this notification request, we should check if // the browser process is actually retrieving the status messages (this // state is stored in ime_notification_) and send a request only if the // browser process has to update this status, its details are listed below: // * If a browser process is not retrieving the status messages, // (i.e. ime_notification_ == false), // send this request only if the input context does have IMEs, // (i.e. ime_status == true); // When it successfully sends the request, toggle its notification status, // (i.e.ime_notification_ = !ime_notification_ = true). // * If a browser process is retrieving the status messages // (i.e. ime_notification_ == true), // send this request only if the input context does not have IMEs, // (i.e. ime_status == false). // When it successfully sends the request, toggle its notification status, // (i.e.ime_notification_ = !ime_notification_ = false). // To analyze the above actions, we can optimize them into the ones // listed below: // 1 Sending a request only if ime_status_ != ime_notification_, and; // 2 Copying ime_status to ime_notification_ if it sends the request // successfully (because Action 1 shows ime_status = !ime_notification_.) bool ime_status = ime_input_.SetInputLanguage(); if (ime_status != ime_notification_) { if (render_widget_host_) { render_widget_host_->SetInputMethodActive(ime_status); ime_notification_ = ime_status; } } // Call DefWindowProc() for consistency with other Chrome windows. // TODO(hbono): This is a speculative fix for Bug 36354 and this code may be // reverted if it does not fix it. SetMsgHandled(FALSE); } void RenderWidgetHostViewWin::OnThemeChanged() { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnThemeChanged"); if (!render_widget_host_) return; render_widget_host_->Send(new ViewMsg_ThemeChanged( render_widget_host_->GetRoutingID())); } LRESULT RenderWidgetHostViewWin::OnNotify(int w_param, NMHDR* header) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnNotify"); if (tooltip_hwnd_ == NULL) return 0; switch (header->code) { case TTN_GETDISPINFO: { NMTTDISPINFOW* tooltip_info = reinterpret_cast<NMTTDISPINFOW*>(header); tooltip_info->szText[0] = L'\0'; tooltip_info->lpszText = const_cast<WCHAR*>(tooltip_text_.c_str()); ::SendMessage( tooltip_hwnd_, TTM_SETMAXTIPWIDTH, 0, kTooltipMaxWidthPixels); SetMsgHandled(TRUE); break; } case TTN_POP: tooltip_showing_ = false; SetMsgHandled(TRUE); break; case TTN_SHOW: // Tooltip shouldn't be shown when the mouse is locked. DCHECK(!mouse_locked_); tooltip_showing_ = true; SetMsgHandled(TRUE); break; } return 0; } LRESULT RenderWidgetHostViewWin::OnImeSetContext( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnImeSetContext"); if (!render_widget_host_) return 0; // We need status messages about the focused input control from a // renderer process when: // * the current input context has IMEs, and; // * an application is activated. // This seems to tell we should also check if the current input context has // IMEs before sending a request, however, this WM_IME_SETCONTEXT is // fortunately sent to an application only while the input context has IMEs. // Therefore, we just start/stop status messages according to the activation // status of this application without checks. bool activated = (wparam == TRUE); if (render_widget_host_) { render_widget_host_->SetInputMethodActive(activated); ime_notification_ = activated; } if (ime_notification_) ime_input_.CreateImeWindow(m_hWnd); ime_input_.CleanupComposition(m_hWnd); return ime_input_.SetImeWindowStyle( m_hWnd, message, wparam, lparam, &handled); } LRESULT RenderWidgetHostViewWin::OnImeStartComposition( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnImeStartComposition"); if (!render_widget_host_) return 0; // Reset the composition status and create IME windows. ime_input_.CreateImeWindow(m_hWnd); ime_input_.ResetComposition(m_hWnd); // When the focus is on an element that does not draw composition by itself // (i.e., PPAPI plugin not handling IME), let IME to draw the text. Otherwise // we have to prevent WTL from calling ::DefWindowProc() because the function // calls ::ImmSetCompositionWindow() and ::ImmSetCandidateWindow() to // over-write the position of IME windows. handled = (can_compose_inline_ ? TRUE : FALSE); return 0; } LRESULT RenderWidgetHostViewWin::OnImeComposition( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnImeComposition"); if (!render_widget_host_) return 0; // At first, update the position of the IME window. ime_input_.UpdateImeWindow(m_hWnd); // ui::CompositionUnderline should be identical to // WebKit::WebCompositionUnderline, so that we can do reinterpret_cast safely. COMPILE_ASSERT(sizeof(ui::CompositionUnderline) == sizeof(WebKit::WebCompositionUnderline), ui_CompositionUnderline__WebKit_WebCompositionUnderline_diff); // Retrieve the result string and its attributes of the ongoing composition // and send it to a renderer process. ui::CompositionText composition; if (ime_input_.GetResult(m_hWnd, lparam, &composition.text)) { render_widget_host_->ImeConfirmComposition(composition.text); ime_input_.ResetComposition(m_hWnd); // Fall though and try reading the composition string. // Japanese IMEs send a message containing both GCS_RESULTSTR and // GCS_COMPSTR, which means an ongoing composition has been finished // by the start of another composition. } // Retrieve the composition string and its attributes of the ongoing // composition and send it to a renderer process. if (ime_input_.GetComposition(m_hWnd, lparam, &composition)) { // TODO(suzhe): due to a bug of webkit, we can't use selection range with // composition string. See: https://bugs.webkit.org/show_bug.cgi?id=37788 composition.selection = ui::Range(composition.selection.end()); // TODO(suzhe): convert both renderer_host and renderer to use // ui::CompositionText. const std::vector<WebKit::WebCompositionUnderline>& underlines = reinterpret_cast<const std::vector<WebKit::WebCompositionUnderline>&>( composition.underlines); render_widget_host_->ImeSetComposition( composition.text, underlines, composition.selection.start(), composition.selection.end()); } // We have to prevent WTL from calling ::DefWindowProc() because we do not // want for the IMM (Input Method Manager) to send WM_IME_CHAR messages. handled = TRUE; if (!can_compose_inline_) { // When the focus is on an element that does not draw composition by itself // (i.e., PPAPI plugin not handling IME), let IME to draw the text, which // is the default behavior of DefWindowProc. Note, however, even in this // case we don't want GCS_RESULTSTR to be converted to WM_IME_CHAR messages. // Thus we explicitly drop the flag. return ::DefWindowProc(m_hWnd, message, wparam, lparam & ~GCS_RESULTSTR); } return 0; } LRESULT RenderWidgetHostViewWin::OnImeEndComposition( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnImeEndComposition"); if (!render_widget_host_) return 0; if (ime_input_.is_composing()) { // A composition has been ended while there is an ongoing composition, // i.e. the ongoing composition has been canceled. // We need to reset the composition status both of the ImeInput object and // of the renderer process. render_widget_host_->ImeCancelComposition(); ime_input_.ResetComposition(m_hWnd); } ime_input_.DestroyImeWindow(m_hWnd); // Let WTL call ::DefWindowProc() and release its resources. handled = FALSE; return 0; } LRESULT RenderWidgetHostViewWin::OnImeRequest( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnImeRequest"); if (!render_widget_host_) { handled = FALSE; return 0; } // Should not receive WM_IME_REQUEST message, if IME is disabled. if (text_input_type_ == ui::TEXT_INPUT_TYPE_NONE || text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) { handled = FALSE; return 0; } switch (wparam) { case IMR_RECONVERTSTRING: return OnReconvertString(reinterpret_cast<RECONVERTSTRING*>(lparam)); case IMR_DOCUMENTFEED: return OnDocumentFeed(reinterpret_cast<RECONVERTSTRING*>(lparam)); case IMR_QUERYCHARPOSITION: return OnQueryCharPosition(reinterpret_cast<IMECHARPOSITION*>(lparam)); default: handled = FALSE; return 0; } } LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnMouseEvent"); handled = TRUE; if (message == WM_MOUSELEAVE) ignore_mouse_movement_ = true; if (mouse_locked_) { HandleLockedMouseEvent(message, wparam, lparam); MoveCursorToCenterIfNecessary(); return 0; } if (::IsWindow(tooltip_hwnd_)) { // Forward mouse events through to the tooltip window MSG msg; msg.hwnd = m_hWnd; msg.message = message; msg.wParam = wparam; msg.lParam = lparam; SendMessage(tooltip_hwnd_, TTM_RELAYEVENT, NULL, reinterpret_cast<LPARAM>(&msg)); } // TODO(jcampan): I am not sure if we should forward the message to the // WebContentsImpl first in the case of popups. If we do, we would need to // convert the click from the popup window coordinates to the WebContentsImpl' // window coordinates. For now we don't forward the message in that case to // address bug #907474. // Note: GetParent() on popup windows returns the top window and not the // parent the window was created with (the parent and the owner of the popup // is the first non-child view of the view that was specified to the create // call). So the WebContentsImpl's window would have to be specified to the // RenderViewHostHWND as there is no way to retrieve it from the HWND. // Don't forward if the container is a popup or fullscreen widget. if (!is_fullscreen_ && !close_on_deactivate_) { switch (message) { case WM_LBUTTONDOWN: case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: // Finish the ongoing composition whenever a mouse click happens. // It matches IE's behavior. if (base::win::IsTSFAwareRequired()) { ui::TSFBridge::GetInstance()->CancelComposition(); } else { ime_input_.CleanupComposition(m_hWnd); } // Fall through. case WM_MOUSEMOVE: case WM_MOUSELEAVE: { // Give the WebContentsImpl first crack at the message. It may want to // prevent forwarding to the renderer if some higher level browser // functionality is invoked. LPARAM parent_msg_lparam = lparam; if (message != WM_MOUSELEAVE) { // For the messages except WM_MOUSELEAVE, before forwarding them to // parent window, we should adjust cursor position from client // coordinates in current window to client coordinates in its parent // window. CPoint cursor_pos(GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)); ClientToScreen(&cursor_pos); GetParent().ScreenToClient(&cursor_pos); parent_msg_lparam = MAKELPARAM(cursor_pos.x, cursor_pos.y); } if (SendMessage(GetParent(), message, wparam, parent_msg_lparam) != 0) { TRACE_EVENT0("browser", "EarlyOut_SentToParent"); return 1; } } } } if (message == WM_LBUTTONDOWN && pointer_down_context_ && GetBrowserAccessibilityManager()) GetBrowserAccessibilityManager()->GotMouseDown(); if (message == WM_LBUTTONUP && ui::IsMouseEventFromTouch(message) && base::win::IsMetroProcess()) pointer_down_context_ = false; ForwardMouseEventToRenderer(message, wparam, lparam); return 0; } LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnKeyEvent"); handled = TRUE; // When Escape is pressed, force fullscreen windows to close if necessary. if ((message == WM_KEYDOWN || message == WM_KEYUP) && wparam == VK_ESCAPE) { if (is_fullscreen_) { SendMessage(WM_CANCELMODE); return 0; } } // If we are a pop-up, forward tab related messages to our parent HWND, so // that we are dismissed appropriately and so that the focus advance in our // parent. // TODO(jcampan): http://b/issue?id=1192881 Could be abstracted in the // FocusManager. if (close_on_deactivate_ && (((message == WM_KEYDOWN || message == WM_KEYUP) && (wparam == VK_TAB)) || (message == WM_CHAR && wparam == L'\t'))) { // First close the pop-up. SendMessage(WM_CANCELMODE); // Then move the focus by forwarding the tab key to the parent. return ::SendMessage(GetParent(), message, wparam, lparam); } if (!render_widget_host_) return 0; // Bug 1845: we need to update the text direction when a user releases // either a right-shift key or a right-control key after pressing both of // them. So, we just update the text direction while a user is pressing the // keys, and we notify the text direction when a user releases either of them. // Bug 9718: http://crbug.com/9718 To investigate IE and notepad, this // shortcut is enabled only on a PC having RTL keyboard layouts installed. // We should emulate them. if (ui::ImeInput::IsRTLKeyboardLayoutInstalled()) { if (message == WM_KEYDOWN) { if (wparam == VK_SHIFT) { base::i18n::TextDirection dir; if (ui::ImeInput::IsCtrlShiftPressed(&dir)) { render_widget_host_->UpdateTextDirection( dir == base::i18n::RIGHT_TO_LEFT ? WebKit::WebTextDirectionRightToLeft : WebKit::WebTextDirectionLeftToRight); } } else if (wparam != VK_CONTROL) { // Bug 9762: http://crbug.com/9762 A user pressed a key except shift // and control keys. // When a user presses a key while he/she holds control and shift keys, // we cancel sending an IPC message in NotifyTextDirection() below and // ignore succeeding UpdateTextDirection() calls while we call // NotifyTextDirection(). // To cancel it, this call set a flag that prevents sending an IPC // message in NotifyTextDirection() only if we are going to send it. // It is harmless to call this function if we aren't going to send it. render_widget_host_->CancelUpdateTextDirection(); } } else if (message == WM_KEYUP && (wparam == VK_SHIFT || wparam == VK_CONTROL)) { // We send an IPC message only if we need to update the text direction. render_widget_host_->NotifyTextDirection(); } } // Special processing for enter key: When user hits enter in omnibox // we change focus to render host after the navigation, so repeat WM_KEYDOWNs // and WM_KEYUP are going to render host, despite being initiated in other // window. This code filters out these messages. bool ignore_keyboard_event = false; if (wparam == VK_RETURN) { if (message == WM_KEYDOWN || message == WM_SYSKEYDOWN) { if (KF_REPEAT & HIWORD(lparam)) { // this is a repeated key if (!capture_enter_key_) ignore_keyboard_event = true; } else { capture_enter_key_ = true; } } else if (message == WM_KEYUP || message == WM_SYSKEYUP) { if (!capture_enter_key_) ignore_keyboard_event = true; capture_enter_key_ = false; } else { // Ignore all other keyboard events for the enter key if not captured. if (!capture_enter_key_) ignore_keyboard_event = true; } } MSG msg = { m_hWnd, message, wparam, lparam }; ui::KeyEvent key_event(msg, message == WM_CHAR); if (render_widget_host_ && render_widget_host_->KeyPressListenersHandleEvent( NativeWebKeyboardEvent(msg))) return 0; if (render_widget_host_ && !ignore_keyboard_event) render_widget_host_->ForwardKeyboardEvent(NativeWebKeyboardEvent(msg)); return 0; } LRESULT RenderWidgetHostViewWin::OnWheelEvent(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnWheelEvent"); // Forward the mouse-wheel message to the window under the mouse if it belongs // to us. if (message == WM_MOUSEWHEEL && ui::RerouteMouseWheel(m_hWnd, wparam, lparam)) { handled = TRUE; return 0; } // Workaround for Thinkpad mousewheel driver. We get mouse wheel/scroll // messages even if we are not in the foreground. So here we check if // we have any owned popup windows in the foreground and dismiss them. if (m_hWnd != GetForegroundWindow()) { HWND toplevel_hwnd = ::GetAncestor(m_hWnd, GA_ROOT); EnumThreadWindows( GetCurrentThreadId(), DismissOwnedPopups, reinterpret_cast<LPARAM>(toplevel_hwnd)); } // This is a bit of a hack, but will work for now since we don't want to // pollute this object with WebContentsImpl-specific functionality... bool handled_by_WebContentsImpl = false; if (!is_fullscreen_ && GetParent()) { // Use a special reflected message to break recursion. If we send // WM_MOUSEWHEEL, the focus manager subclass of web contents will // route it back here. MSG new_message = {0}; new_message.hwnd = m_hWnd; new_message.message = message; new_message.wParam = wparam; new_message.lParam = lparam; handled_by_WebContentsImpl = !!::SendMessage(GetParent(), base::win::kReflectedMessage, 0, reinterpret_cast<LPARAM>(&new_message)); } if (!handled_by_WebContentsImpl && render_widget_host_) { render_widget_host_->ForwardWheelEvent( WebInputEventFactory::mouseWheelEvent(m_hWnd, message, wparam, lparam)); } handled = TRUE; return 0; } WebTouchState::WebTouchState(const RenderWidgetHostViewWin* window) : window_(window) { } size_t WebTouchState::UpdateTouchPoints( TOUCHINPUT* points, size_t count) { // First we reset all touch event state. This involves removing any released // touchpoints and marking the rest as stationary. After that we go through // and alter/add any touchpoints (from the touch input buffer) that we can // coalesce into a single message. The return value is the number of consumed // input message. WebKit::WebTouchPoint* point = touch_event_.touches; WebKit::WebTouchPoint* end = point + touch_event_.touchesLength; while (point < end) { if (point->state == WebKit::WebTouchPoint::StateReleased) { *point = *(--end); --touch_event_.touchesLength; } else { point->state = WebKit::WebTouchPoint::StateStationary; point++; } } touch_event_.changedTouchesLength = 0; touch_event_.modifiers = content::EventFlagsToWebEventModifiers( ui::GetModifiersFromKeyState()); // Consume all events of the same type and add them to the changed list. int last_type = 0; for (size_t i = 0; i < count; ++i) { unsigned int mapped_id = GetMappedTouch(points[i].dwID); WebKit::WebTouchPoint* point = NULL; for (unsigned j = 0; j < touch_event_.touchesLength; ++j) { if (static_cast<DWORD>(touch_event_.touches[j].id) == mapped_id) { point = &touch_event_.touches[j]; break; } } // Use a move instead if we see a down on a point we already have. int type = GetTouchType(points[i]); if (point && type == TOUCHEVENTF_DOWN) SetTouchType(&points[i], TOUCHEVENTF_MOVE); // Stop processing when the event type changes. if (touch_event_.changedTouchesLength && type != last_type) return i; touch_event_.timeStampSeconds = points[i].dwTime / 1000.0; last_type = type; switch (type) { case TOUCHEVENTF_DOWN: { if (!(point = AddTouchPoint(&points[i]))) continue; touch_event_.type = WebKit::WebInputEvent::TouchStart; break; } case TOUCHEVENTF_UP: { if (!point) // Just throw away a stray up. continue; point->state = WebKit::WebTouchPoint::StateReleased; UpdateTouchPoint(point, &points[i]); touch_event_.type = WebKit::WebInputEvent::TouchEnd; break; } case TOUCHEVENTF_MOVE: { if (point) { point->state = WebKit::WebTouchPoint::StateMoved; // Don't update the message if the point didn't really move. if (UpdateTouchPoint(point, &points[i])) continue; touch_event_.type = WebKit::WebInputEvent::TouchMove; } else if (touch_event_.changedTouchesLength) { RemoveExpiredMappings(); // Can't add a point if we're already handling move events. return i; } else { // Treat a move with no existing point as a down. if (!(point = AddTouchPoint(&points[i]))) continue; last_type = TOUCHEVENTF_DOWN; SetTouchType(&points[i], TOUCHEVENTF_DOWN); touch_event_.type = WebKit::WebInputEvent::TouchStart; } break; } default: NOTREACHED(); continue; } touch_event_.changedTouches[touch_event_.changedTouchesLength++] = *point; } RemoveExpiredMappings(); return count; } void WebTouchState::RemoveExpiredMappings() { WebTouchState::MapType new_map; for (MapType::iterator it = touch_map_.begin(); it != touch_map_.end(); ++it) { WebKit::WebTouchPoint* point = touch_event_.touches; WebKit::WebTouchPoint* end = point + touch_event_.touchesLength; while (point < end) { if ((point->id == it->second) && (point->state != WebKit::WebTouchPoint::StateReleased)) { new_map.insert(*it); break; } point++; } } touch_map_.swap(new_map); } bool WebTouchState::ReleaseTouchPoints() { if (touch_event_.touchesLength == 0) return false; // Mark every active touchpoint as released. touch_event_.type = WebKit::WebInputEvent::TouchEnd; touch_event_.changedTouchesLength = touch_event_.touchesLength; for (unsigned int i = 0; i < touch_event_.touchesLength; ++i) { touch_event_.touches[i].state = WebKit::WebTouchPoint::StateReleased; touch_event_.changedTouches[i].state = WebKit::WebTouchPoint::StateReleased; } return true; } WebKit::WebTouchPoint* WebTouchState::AddTouchPoint( TOUCHINPUT* touch_input) { DCHECK(touch_event_.touchesLength < WebKit::WebTouchEvent::touchesLengthCap); if (touch_event_.touchesLength >= WebKit::WebTouchEvent::touchesLengthCap) return NULL; WebKit::WebTouchPoint* point = &touch_event_.touches[touch_event_.touchesLength++]; point->state = WebKit::WebTouchPoint::StatePressed; point->id = GetMappedTouch(touch_input->dwID); UpdateTouchPoint(point, touch_input); return point; } bool WebTouchState::UpdateTouchPoint( WebKit::WebTouchPoint* touch_point, TOUCHINPUT* touch_input) { CPoint coordinates(TOUCH_COORD_TO_PIXEL(touch_input->x), TOUCH_COORD_TO_PIXEL(touch_input->y)); int radius_x = 1; int radius_y = 1; if (touch_input->dwMask & TOUCHINPUTMASKF_CONTACTAREA) { radius_x = TOUCH_COORD_TO_PIXEL(touch_input->cxContact); radius_y = TOUCH_COORD_TO_PIXEL(touch_input->cyContact); } // Detect and exclude stationary moves. if (GetTouchType(*touch_input) == TOUCHEVENTF_MOVE && touch_point->screenPosition.x == coordinates.x && touch_point->screenPosition.y == coordinates.y && touch_point->radiusX == radius_x && touch_point->radiusY == radius_y) { touch_point->state = WebKit::WebTouchPoint::StateStationary; return true; } touch_point->screenPosition.x = coordinates.x; touch_point->screenPosition.y = coordinates.y; window_->GetParent().ScreenToClient(&coordinates); touch_point->position.x = coordinates.x; touch_point->position.y = coordinates.y; touch_point->radiusX = radius_x; touch_point->radiusY = radius_y; touch_point->force = 0; touch_point->rotationAngle = 0; return false; } // Find (or create) a mapping for _os_touch_id_. unsigned int WebTouchState::GetMappedTouch(unsigned int os_touch_id) { MapType::iterator it = touch_map_.find(os_touch_id); if (it != touch_map_.end()) return it->second; int next_value = 0; for (it = touch_map_.begin(); it != touch_map_.end(); ++it) next_value = std::max(next_value, it->second + 1); touch_map_[os_touch_id] = next_value; return next_value; } LRESULT RenderWidgetHostViewWin::OnTouchEvent(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnTouchEvent"); // Finish the ongoing composition whenever a touch event happens. // It matches IE's behavior. if (base::win::IsTSFAwareRequired()) { ui::TSFBridge::GetInstance()->CancelComposition(); } else { ime_input_.CleanupComposition(m_hWnd); } // TODO(jschuh): Add support for an arbitrary number of touchpoints. size_t total = std::min(static_cast<int>(LOWORD(wparam)), static_cast<int>(WebKit::WebTouchEvent::touchesLengthCap)); TOUCHINPUT points[WebKit::WebTouchEvent::touchesLengthCap]; if (!total || !GetTouchInputInfo((HTOUCHINPUT)lparam, total, points, sizeof(TOUCHINPUT))) { TRACE_EVENT0("browser", "EarlyOut_NothingToDo"); return 0; } if (total == 1 && (points[0].dwFlags & TOUCHEVENTF_DOWN)) { pointer_down_context_ = true; last_touch_location_ = gfx::Point( TOUCH_COORD_TO_PIXEL(points[0].x), TOUCH_COORD_TO_PIXEL(points[0].y)); } bool should_forward = render_widget_host_->ShouldForwardTouchEvent() && touch_events_enabled_; // Send a copy of the touch events on to the gesture recognizer. for (size_t start = 0; start < total;) { start += touch_state_->UpdateTouchPoints(points + start, total - start); if (should_forward) { if (touch_state_->is_changed()) render_widget_host_->ForwardTouchEvent(touch_state_->touch_event()); } else { const WebKit::WebTouchEvent& touch_event = touch_state_->touch_event(); base::TimeDelta timestamp = base::TimeDelta::FromMilliseconds( touch_event.timeStampSeconds * 1000); for (size_t i = 0; i < touch_event.touchesLength; ++i) { scoped_ptr<ui::GestureRecognizer::Gestures> gestures; gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( TouchEventFromWebTouchPoint(touch_event.touches[i], timestamp), ui::ER_UNHANDLED, this)); ProcessGestures(gestures.get()); } } } CloseTouchInputHandle((HTOUCHINPUT)lparam); return 0; } void RenderWidgetHostViewWin::ProcessGestures( ui::GestureRecognizer::Gestures* gestures) { if ((gestures == NULL) || gestures->empty()) return; for (ui::GestureRecognizer::Gestures::iterator g_it = gestures->begin(); g_it != gestures->end(); ++g_it) { ForwardGestureEventToRenderer(*g_it); } } LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnMouseActivate"); if (!render_widget_host_) return MA_NOACTIVATE; if (!IsActivatable()) return MA_NOACTIVATE; HWND focus_window = GetFocus(); if (!::IsWindow(focus_window) || !IsChild(focus_window)) { // We handle WM_MOUSEACTIVATE to set focus to the underlying plugin // child window. This is to ensure that keyboard events are received // by the plugin. The correct way to fix this would be send over // an event to the renderer which would then eventually send over // a setFocus call to the plugin widget. This would ensure that // the renderer (webkit) knows about the plugin widget receiving // focus. // TODO(iyengar) Do the right thing as per the above comment. POINT cursor_pos = {0}; ::GetCursorPos(&cursor_pos); ::ScreenToClient(m_hWnd, &cursor_pos); HWND child_window = ::RealChildWindowFromPoint(m_hWnd, cursor_pos); if (::IsWindow(child_window) && child_window != m_hWnd) { if (ui::GetClassName(child_window) == webkit::npapi::kWrapperNativeWindowClassName) child_window = ::GetWindow(child_window, GW_CHILD); ::SetFocus(child_window); return MA_NOACTIVATE; } } handled = FALSE; render_widget_host_->OnPointerEventActivate(); return MA_ACTIVATE; } LRESULT RenderWidgetHostViewWin::OnGestureEvent( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnGestureEvent"); // Note that as of M22, touch events are enabled by default on Windows. // This code should not be reachable. DCHECK(!touch_events_enabled_); handled = FALSE; GESTUREINFO gi = {sizeof(GESTUREINFO)}; HGESTUREINFO gi_handle = reinterpret_cast<HGESTUREINFO>(lparam); if (!::GetGestureInfo(gi_handle, &gi)) { DWORD error = GetLastError(); NOTREACHED() << "Unable to get gesture info. Error : " << error; return 0; } if (gi.dwID == GID_ZOOM) { PageZoom zoom = PAGE_ZOOM_RESET; POINT zoom_center = {0}; if (DecodeZoomGesture(m_hWnd, gi, &zoom, &zoom_center)) { handled = TRUE; Send(new ViewMsg_ZoomFactor(render_widget_host_->GetRoutingID(), zoom, zoom_center.x, zoom_center.y)); } } else if (gi.dwID == GID_PAN) { // Right now we only decode scroll gestures and we forward to the page // as scroll events. POINT start; POINT delta; if (DecodeScrollGesture(gi, &start, &delta)) { handled = TRUE; render_widget_host_->ForwardWheelEvent( MakeFakeScrollWheelEvent(m_hWnd, start, delta)); } } ::CloseGestureInfoHandle(gi_handle); return 0; } LRESULT RenderWidgetHostViewWin::OnMoveOrSize( UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { // Reset the cliping rectangle if the mouse is locked. if (mouse_locked_) { CRect rect; GetWindowRect(&rect); ::ClipCursor(&rect); } return 0; } void RenderWidgetHostViewWin::OnAccessibilityNotifications( const std::vector<AccessibilityHostMsg_NotificationParams>& params) { if (!GetBrowserAccessibilityManager()) { SetBrowserAccessibilityManager( BrowserAccessibilityManager::CreateEmptyDocument( m_hWnd, static_cast<AccessibilityNodeData::State>(0), this)); } GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params); } bool RenderWidgetHostViewWin::LockMouse() { if (mouse_locked_) return true; mouse_locked_ = true; // Hide the tooltip window if it is currently visible. When the mouse is // locked, no mouse message is relayed to the tooltip window, so we don't need // to worry that it will reappear. if (::IsWindow(tooltip_hwnd_) && tooltip_showing_) { ::SendMessage(tooltip_hwnd_, TTM_POP, 0, 0); // Sending a TTM_POP message doesn't seem to actually hide the tooltip // window, although we will receive a TTN_POP notification. As a result, // ShowWindow() is explicitly called to hide the window. ::ShowWindow(tooltip_hwnd_, SW_HIDE); } // TODO(yzshen): ShowCursor(FALSE) causes SetCursorPos() to be ignored on // Remote Desktop. ::ShowCursor(FALSE); move_to_center_request_.pending = false; last_mouse_position_.locked_global = last_mouse_position_.unlocked_global; MoveCursorToCenterIfNecessary(); CRect rect; GetWindowRect(&rect); ::ClipCursor(&rect); return true; } void RenderWidgetHostViewWin::UnlockMouse() { if (!mouse_locked_) return; mouse_locked_ = false; ::ClipCursor(NULL); ::SetCursorPos(last_mouse_position_.unlocked_global.x(), last_mouse_position_.unlocked_global.y()); ::ShowCursor(TRUE); if (render_widget_host_) render_widget_host_->LostMouseLock(); } void RenderWidgetHostViewWin::Observe( int type, const NotificationSource& source, const NotificationDetails& details) { DCHECK(type == NOTIFICATION_RENDERER_PROCESS_TERMINATED); // Get the RenderProcessHost that posted this notification, and exit // if it's not the one associated with this host view. RenderProcessHost* render_process_host = Source<RenderProcessHost>(source).ptr(); DCHECK(render_process_host); if (!render_widget_host_ || render_process_host != render_widget_host_->GetProcess()) { return; } // If it was our RenderProcessHost that posted the notification, // clear the BrowserAccessibilityManager, because the renderer is // dead and any accessibility information we have is now stale. SetBrowserAccessibilityManager(NULL); } static void PaintCompositorHostWindow(HWND hWnd) { PAINTSTRUCT paint; BeginPaint(hWnd, &paint); RenderWidgetHostViewWin* win = static_cast<RenderWidgetHostViewWin*>( ui::GetWindowUserData(hWnd)); // Trigger composite to rerender window. if (win) win->AcceleratedPaint(paint.hdc); EndPaint(hWnd, &paint); } // WndProc for the compositor host window. We use this instead of Default so // we can drop WM_PAINT and WM_ERASEBKGD messages on the floor. static LRESULT CALLBACK CompositorHostWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_ERASEBKGND: return 0; case WM_DESTROY: ui::SetWindowUserData(hWnd, NULL); return 0; case WM_PAINT: PaintCompositorHostWindow(hWnd); return 0; default: return DefWindowProc(hWnd, message, wParam, lParam); } } void RenderWidgetHostViewWin::AcceleratedPaint(HDC dc) { if (render_widget_host_) render_widget_host_->ScheduleComposite(); if (accelerated_surface_.get()) accelerated_surface_->Present(dc); } gfx::Rect RenderWidgetHostViewWin::GetBoundsInRootWindow() { RECT window_rect = {0}; HWND root_window = GetAncestor(m_hWnd, GA_ROOT); ::GetWindowRect(root_window, &window_rect); gfx::Rect rect(window_rect); // Maximized windows are outdented from the work area by the frame thickness // even though this "frame" is not painted. This confuses code (and people) // that think of a maximized window as corresponding exactly to the work area. // Correct for this by subtracting the frame thickness back off. if (::IsZoomed(root_window)) { rect.Inset(GetSystemMetrics(SM_CXSIZEFRAME), GetSystemMetrics(SM_CYSIZEFRAME)); } return rect; } // Creates a HWND within the RenderWidgetHostView that will serve as a host // for a HWND that the GPU process will create. The host window is used // to Z-position the GPU's window relative to other plugin windows. gfx::GLSurfaceHandle RenderWidgetHostViewWin::GetCompositingSurface() { // If the window has been created, don't recreate it a second time if (compositor_host_window_) return gfx::GLSurfaceHandle(compositor_host_window_, true); // On Vista and later we present directly to the view window rather than a // child window. if (GpuDataManagerImpl::GetInstance()->IsUsingAcceleratedSurface()) { if (!accelerated_surface_.get()) accelerated_surface_.reset(new AcceleratedSurface(m_hWnd)); return gfx::GLSurfaceHandle(m_hWnd, true); } // On XP we need a child window that can be resized independently of the // parent. static ATOM atom = 0; static HMODULE instance = NULL; if (!atom) { WNDCLASSEX window_class; base::win::InitializeWindowClass( L"CompositorHostWindowClass", &base::win::WrappedWindowProc<CompositorHostWindowProc>, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, &window_class); instance = window_class.hInstance; atom = RegisterClassEx(&window_class); DCHECK(atom); } RECT currentRect; GetClientRect(&currentRect); // Ensure window does not have zero area because D3D cannot create a zero // area swap chain. int width = std::max(1, static_cast<int>(currentRect.right - currentRect.left)); int height = std::max(1, static_cast<int>(currentRect.bottom - currentRect.top)); compositor_host_window_ = CreateWindowEx( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR, MAKEINTATOM(atom), 0, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_DISABLED, 0, 0, width, height, m_hWnd, 0, instance, 0); ui::CheckWindowCreated(compositor_host_window_); ui::SetWindowUserData(compositor_host_window_, this); gfx::GLSurfaceHandle surface_handle(compositor_host_window_, true); return surface_handle; } void RenderWidgetHostViewWin::OnAcceleratedCompositingStateChange() { bool show = render_widget_host_->is_accelerated_compositing_active(); // When we first create the compositor, we will get a show request from // the renderer before we have gotten the create request from the GPU. In this // case, simply ignore the show request. if (compositor_host_window_ == NULL) return; if (show) { ::ShowWindow(compositor_host_window_, SW_SHOW); // Get all the child windows of this view, including the compositor window. std::vector<HWND> all_child_windows; ::EnumChildWindows(m_hWnd, AddChildWindowToVector, reinterpret_cast<LPARAM>(&all_child_windows)); // Build a list of just the plugin window handles std::vector<HWND> plugin_windows; bool compositor_host_window_found = false; for (size_t i = 0; i < all_child_windows.size(); ++i) { if (all_child_windows[i] != compositor_host_window_) plugin_windows.push_back(all_child_windows[i]); else compositor_host_window_found = true; } DCHECK(compositor_host_window_found); // Set all the plugin windows to be "after" the compositor window. // When the compositor window is created, gets placed above plugins. for (size_t i = 0; i < plugin_windows.size(); ++i) { HWND next; if (i + 1 < plugin_windows.size()) next = plugin_windows[i+1]; else next = compositor_host_window_; ::SetWindowPos(plugin_windows[i], next, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); } } else { // Drop the backing store for the accelerated surface when the accelerated // compositor is disabled. Otherwise, a flash of the last presented frame // could appear when it is next enabled. if (accelerated_surface_.get()) accelerated_surface_->Suspend(); hide_compositor_window_at_next_paint_ = true; } } void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped( const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, int gpu_host_id) { NOTREACHED(); } void RenderWidgetHostViewWin::AcceleratedSurfacePostSubBuffer( const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, int gpu_host_id) { NOTREACHED(); } void RenderWidgetHostViewWin::AcceleratedSurfaceSuspend() { if (!accelerated_surface_.get()) return; accelerated_surface_->Suspend(); } bool RenderWidgetHostViewWin::HasAcceleratedSurface( const gfx::Size& desired_size) { // TODO(jbates) Implement this so this view can use GetBackingStore for both // software and GPU frames. Defaulting to false just makes GetBackingStore // only useable for software frames. return false; } void RenderWidgetHostViewWin::SetAccessibilityFocus(int acc_obj_id) { if (!render_widget_host_) return; render_widget_host_->AccessibilitySetFocus(acc_obj_id); } void RenderWidgetHostViewWin::AccessibilityDoDefaultAction(int acc_obj_id) { if (!render_widget_host_) return; render_widget_host_->AccessibilityDoDefaultAction(acc_obj_id); } void RenderWidgetHostViewWin::AccessibilityScrollToMakeVisible( int acc_obj_id, gfx::Rect subfocus) { if (!render_widget_host_) return; render_widget_host_->AccessibilityScrollToMakeVisible(acc_obj_id, subfocus); } void RenderWidgetHostViewWin::AccessibilityScrollToPoint( int acc_obj_id, gfx::Point point) { if (!render_widget_host_) return; render_widget_host_->AccessibilityScrollToPoint(acc_obj_id, point); } void RenderWidgetHostViewWin::AccessibilitySetTextSelection( int acc_obj_id, int start_offset, int end_offset) { if (!render_widget_host_) return; render_widget_host_->AccessibilitySetTextSelection( acc_obj_id, start_offset, end_offset); } gfx::Point RenderWidgetHostViewWin::GetLastTouchEventLocation() const { return last_touch_location_; } LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnGetObject"); if (kIdCustom == lparam) { // An MSAA client requestes our custom id. Assume that we have detected an // active windows screen reader. BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected(); render_widget_host_->SetAccessibilityMode( BrowserAccessibilityStateImpl::GetInstance()->GetAccessibilityMode()); // Return with failure. return static_cast<LRESULT>(0L); } if (lparam != OBJID_CLIENT) { handled = false; return static_cast<LRESULT>(0L); } IAccessible* iaccessible = GetNativeViewAccessible(); if (iaccessible) return LresultFromObject(IID_IAccessible, wparam, iaccessible); handled = false; return static_cast<LRESULT>(0L); } LRESULT RenderWidgetHostViewWin::OnParentNotify(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnParentNotify"); handled = FALSE; if (!render_widget_host_) return 0; switch (LOWORD(wparam)) { case WM_LBUTTONDOWN: case WM_RBUTTONDOWN: case WM_MBUTTONDOWN: render_widget_host_->StartUserGesture(); break; default: break; } return 0; } void RenderWidgetHostViewWin::OnFinalMessage(HWND window) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnFinalMessage"); // When the render widget host is being destroyed, it ends up calling // Destroy() which NULLs render_widget_host_. // Note: the following bug http://crbug.com/24248 seems to report that // OnFinalMessage is called with a deleted |render_widget_host_|. It is not // clear how this could happen, hence the NULLing of render_widget_host_ // above. if (!render_widget_host_ && !being_destroyed_) { // If you hit this NOTREACHED, please add a comment to report it on // http://crbug.com/24248, including what you did when it happened and if // you can repro. NOTREACHED(); } if (render_widget_host_) render_widget_host_->ViewDestroyed(); delete this; } void RenderWidgetHostViewWin::TrackMouseLeave(bool track) { if (track == track_mouse_leave_) return; track_mouse_leave_ = track; DCHECK(m_hWnd); TRACKMOUSEEVENT tme; tme.cbSize = sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_LEAVE; if (!track_mouse_leave_) tme.dwFlags |= TME_CANCEL; tme.hwndTrack = m_hWnd; TrackMouseEvent(&tme); } bool RenderWidgetHostViewWin::Send(IPC::Message* message) { if (!render_widget_host_) return false; return render_widget_host_->Send(message); } void RenderWidgetHostViewWin::EnsureTooltip() { UINT message = TTM_NEWTOOLRECT; TOOLINFO ti = {0}; ti.cbSize = sizeof(ti); ti.hwnd = m_hWnd; ti.uId = 0; if (!::IsWindow(tooltip_hwnd_)) { message = TTM_ADDTOOL; tooltip_hwnd_ = CreateWindowEx( WS_EX_TRANSPARENT | l10n_util::GetExtendedTooltipStyles(), TOOLTIPS_CLASS, NULL, TTS_NOPREFIX, 0, 0, 0, 0, m_hWnd, NULL, NULL, NULL); if (!tooltip_hwnd_) { // Tooltip creation can inexplicably fail. See bug 82913 for details. LOG_GETLASTERROR(WARNING) << "Tooltip creation failed, tooltips won't work"; return; } ti.uFlags = TTF_TRANSPARENT; ti.lpszText = LPSTR_TEXTCALLBACK; // Ensure web content tooltips are displayed for at least this amount of // time, to give users a chance to read longer messages. const int kMinimumAutopopDurationMs = 10 * 1000; int autopop_duration_ms = SendMessage(tooltip_hwnd_, TTM_GETDELAYTIME, TTDT_AUTOPOP, NULL); if (autopop_duration_ms < kMinimumAutopopDurationMs) { SendMessage(tooltip_hwnd_, TTM_SETDELAYTIME, TTDT_AUTOPOP, kMinimumAutopopDurationMs); } } CRect cr; GetClientRect(&ti.rect); SendMessage(tooltip_hwnd_, message, NULL, reinterpret_cast<LPARAM>(&ti)); } void RenderWidgetHostViewWin::ResetTooltip() { if (::IsWindow(tooltip_hwnd_)) ::DestroyWindow(tooltip_hwnd_); tooltip_hwnd_ = NULL; } bool RenderWidgetHostViewWin::ForwardGestureEventToRenderer( ui::GestureEvent* gesture) { if (!render_widget_host_) return false; // Pinch gestures are disabled by default on windows desktop. See // crbug.com/128477 and crbug.com/148816 if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN || gesture->type() == ui::ET_GESTURE_PINCH_UPDATE || gesture->type() == ui::ET_GESTURE_PINCH_END) && !ShouldSendPinchGesture()) { return true; } WebKit::WebGestureEvent web_gesture = CreateWebGestureEvent(m_hWnd, *gesture); if (web_gesture.type == WebKit::WebGestureEvent::Undefined) return false; if (web_gesture.type == WebKit::WebGestureEvent::GestureTapDown) { render_widget_host_->ForwardGestureEvent( CreateFlingCancelEvent(gesture->time_stamp().InSecondsF())); } render_widget_host_->ForwardGestureEvent(web_gesture); return true; } void RenderWidgetHostViewWin::ForwardMouseEventToRenderer(UINT message, WPARAM wparam, LPARAM lparam) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::ForwardMouseEventToRenderer"); if (!render_widget_host_) { TRACE_EVENT0("browser", "EarlyOut_NoRWH"); return; } WebMouseEvent event( WebInputEventFactory::mouseEvent(m_hWnd, message, wparam, lparam)); if (mouse_locked_) { event.movementX = event.globalX - last_mouse_position_.locked_global.x(); event.movementY = event.globalY - last_mouse_position_.locked_global.y(); last_mouse_position_.locked_global.SetPoint(event.globalX, event.globalY); event.x = last_mouse_position_.unlocked.x(); event.y = last_mouse_position_.unlocked.y(); event.windowX = last_mouse_position_.unlocked.x(); event.windowY = last_mouse_position_.unlocked.y(); event.globalX = last_mouse_position_.unlocked_global.x(); event.globalY = last_mouse_position_.unlocked_global.y(); } else { if (ignore_mouse_movement_) { ignore_mouse_movement_ = false; event.movementX = 0; event.movementY = 0; } else { event.movementX = event.globalX - last_mouse_position_.unlocked_global.x(); event.movementY = event.globalY - last_mouse_position_.unlocked_global.y(); } last_mouse_position_.unlocked.SetPoint(event.windowX, event.windowY); last_mouse_position_.unlocked_global.SetPoint(event.globalX, event.globalY); } // Windows sends (fake) mouse messages for touch events. Don't send these to // the render widget. if (!touch_events_enabled_ || !ui::IsMouseEventFromTouch(message)) { // Send the event to the renderer before changing mouse capture, so that // the capturelost event arrives after mouseup. render_widget_host_->ForwardMouseEvent(event); switch (event.type) { case WebInputEvent::MouseMove: TrackMouseLeave(true); break; case WebInputEvent::MouseLeave: TrackMouseLeave(false); break; case WebInputEvent::MouseDown: SetCapture(); break; case WebInputEvent::MouseUp: if (GetCapture() == m_hWnd) ReleaseCapture(); break; } } if (IsActivatable() && event.type == WebInputEvent::MouseDown) { // This is a temporary workaround for bug 765011 to get focus when the // mouse is clicked. This happens after the mouse down event is sent to // the renderer because normally Windows does a WM_SETFOCUS after // WM_LBUTTONDOWN. SetFocus(); } } void RenderWidgetHostViewWin::ShutdownHost() { weak_factory_.InvalidateWeakPtrs(); if (render_widget_host_) render_widget_host_->Shutdown(); // Do not touch any members at this point, |this| has been deleted. } void RenderWidgetHostViewWin::DoPopupOrFullscreenInit(HWND parent_hwnd, const gfx::Rect& pos, DWORD ex_style) { Create(parent_hwnd, NULL, NULL, WS_POPUP, ex_style); MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); if (is_fullscreen_ && win8::IsSingleWindowMetroMode()) { MetroSetFrameWindow set_frame_window = reinterpret_cast<MetroSetFrameWindow>( ::GetProcAddress(base::win::GetMetroModule(), "SetFrameWindow")); DCHECK(set_frame_window); set_frame_window(m_hWnd); } } CPoint RenderWidgetHostViewWin::GetClientCenter() const { CRect rect; GetClientRect(&rect); return rect.CenterPoint(); } void RenderWidgetHostViewWin::MoveCursorToCenterIfNecessary() { DCHECK(mouse_locked_); CRect rect; GetClipCursor(&rect); int border_x = rect.Width() * kMouseLockBorderPercentage / 100; int border_y = rect.Height() * kMouseLockBorderPercentage / 100; bool should_move = last_mouse_position_.locked_global.x() < rect.left + border_x || last_mouse_position_.locked_global.x() > rect.right - border_x || last_mouse_position_.locked_global.y() < rect.top + border_y || last_mouse_position_.locked_global.y() > rect.bottom - border_y; if (should_move) { move_to_center_request_.pending = true; move_to_center_request_.target = rect.CenterPoint(); if (!::SetCursorPos(move_to_center_request_.target.x(), move_to_center_request_.target.y())) { LOG_GETLASTERROR(WARNING) << "Failed to set cursor position."; } } } void RenderWidgetHostViewWin::HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam) { TRACE_EVENT0("browser", "RenderWidgetHostViewWin::HandleLockedMouseEvent"); DCHECK(mouse_locked_); if (message == WM_MOUSEMOVE && move_to_center_request_.pending) { // Ignore WM_MOUSEMOVE messages generated by // MoveCursorToCenterIfNecessary(). CPoint current_position(LOWORD(lparam), HIWORD(lparam)); ClientToScreen(&current_position); if (move_to_center_request_.target.x() == current_position.x && move_to_center_request_.target.y() == current_position.y) { move_to_center_request_.pending = false; last_mouse_position_.locked_global = move_to_center_request_.target; return; } } ForwardMouseEventToRenderer(message, wparam, lparam); } LRESULT RenderWidgetHostViewWin::OnDocumentFeed(RECONVERTSTRING* reconv) { size_t target_offset; size_t target_length; bool has_composition; if (!composition_range_.is_empty()) { target_offset = composition_range_.GetMin(); target_length = composition_range_.length(); has_composition = true; } else if (selection_range_.IsValid()) { target_offset = selection_range_.GetMin(); target_length = selection_range_.length(); has_composition = false; } else { return 0; } size_t len = selection_text_.length(); size_t need_size = sizeof(RECONVERTSTRING) + len * sizeof(WCHAR); if (target_offset < selection_text_offset_ || target_offset + target_length > selection_text_offset_ + len) { return 0; } if (!reconv) return need_size; if (reconv->dwSize < need_size) return 0; reconv->dwVersion = 0; reconv->dwStrLen = len; reconv->dwStrOffset = sizeof(RECONVERTSTRING); reconv->dwCompStrLen = has_composition ? target_length: 0; reconv->dwCompStrOffset = (target_offset - selection_text_offset_) * sizeof(WCHAR); reconv->dwTargetStrLen = target_length; reconv->dwTargetStrOffset = reconv->dwCompStrOffset; memcpy(reinterpret_cast<char*>(reconv) + sizeof(RECONVERTSTRING), selection_text_.c_str(), len * sizeof(WCHAR)); // According to Microsft API document, IMR_RECONVERTSTRING and // IMR_DOCUMENTFEED should return reconv, but some applications return // need_size. return reinterpret_cast<LRESULT>(reconv); } LRESULT RenderWidgetHostViewWin::OnReconvertString(RECONVERTSTRING* reconv) { // If there is a composition string already, we don't allow reconversion. if (ime_input_.is_composing()) return 0; if (selection_range_.is_empty()) return 0; if (selection_text_.empty()) return 0; if (selection_range_.GetMin() < selection_text_offset_ || selection_range_.GetMax() > selection_text_offset_ + selection_text_.length()) { return 0; } size_t len = selection_range_.length(); size_t need_size = sizeof(RECONVERTSTRING) + len * sizeof(WCHAR); if (!reconv) return need_size; if (reconv->dwSize < need_size) return 0; reconv->dwVersion = 0; reconv->dwStrLen = len; reconv->dwStrOffset = sizeof(RECONVERTSTRING); reconv->dwCompStrLen = len; reconv->dwCompStrOffset = 0; reconv->dwTargetStrLen = len; reconv->dwTargetStrOffset = 0; size_t offset = selection_range_.GetMin() - selection_text_offset_; memcpy(reinterpret_cast<char*>(reconv) + sizeof(RECONVERTSTRING), selection_text_.c_str() + offset, len * sizeof(WCHAR)); // According to Microsft API document, IMR_RECONVERTSTRING and // IMR_DOCUMENTFEED should return reconv, but some applications return // need_size. return reinterpret_cast<LRESULT>(reconv); } LRESULT RenderWidgetHostViewWin::OnQueryCharPosition( IMECHARPOSITION* position) { DCHECK(position); if (position->dwSize < sizeof(IMECHARPOSITION)) return 0; RECT target_rect = {}; if (ime_input_.is_composing() && !composition_range_.is_empty() && position->dwCharPos < composition_character_bounds_.size()) { target_rect = composition_character_bounds_[position->dwCharPos].ToRECT(); } else if (position->dwCharPos == 0) { // When there is no on-going composition but |position->dwCharPos| is 0, // use the caret rect. This behavior is the same to RichEdit. In fact, // CUAS (Cicero Unaware Application Support) relies on this behavior to // implement ITfContextView::GetTextExt on top of IMM32-based applications. target_rect = caret_rect_.ToRECT(); } else { return 0; } ClientToScreen(&target_rect); RECT document_rect = GetViewBounds().ToRECT(); ClientToScreen(&document_rect); position->pt.x = target_rect.left; position->pt.y = target_rect.top; position->cLineHeight = target_rect.bottom - target_rect.top; position->rcDocument = document_rect; return 1; } void RenderWidgetHostViewWin::UpdateIMEState() { if (base::win::IsTSFAwareRequired()) { ui::TSFBridge::GetInstance()->OnTextInputTypeChanged(this); return; } if (text_input_type_ != ui::TEXT_INPUT_TYPE_NONE && text_input_type_ != ui::TEXT_INPUT_TYPE_PASSWORD) { ime_input_.EnableIME(m_hWnd); ime_input_.SetUseCompositionWindow(!can_compose_inline_); } else { ime_input_.DisableIME(m_hWnd); } } //////////////////////////////////////////////////////////////////////////////// // RenderWidgetHostView, public: // static RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( RenderWidgetHost* widget) { return new RenderWidgetHostViewWin(widget); } } // namespace content
leiferikb/bitpop-private
content/browser/renderer_host/render_widget_host_view_win.cc
C++
bsd-3-clause
104,873
//===---- TargetInfo.cpp - Encapsulate target details -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // These classes wrap the information about a call or function // definition used to handle ABI compliancy. // //===----------------------------------------------------------------------===// #include "TargetInfo.h" #include "ABIInfo.h" #include "CGCXXABI.h" #include "CodeGenFunction.h" #include "clang/AST/RecordLayout.h" #include "clang/CodeGen/CGFunctionInfo.h" #include "clang/Frontend/CodeGenOptions.h" #include "llvm/ADT/Triple.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Type.h" #include "llvm/Support/raw_ostream.h" using namespace clang; using namespace CodeGen; static void AssignToArrayRange(CodeGen::CGBuilderTy &Builder, llvm::Value *Array, llvm::Value *Value, unsigned FirstIndex, unsigned LastIndex) { // Alternatively, we could emit this as a loop in the source. for (unsigned I = FirstIndex; I <= LastIndex; ++I) { llvm::Value *Cell = Builder.CreateConstInBoundsGEP1_32(Array, I); Builder.CreateStore(Value, Cell); } } static bool isAggregateTypeForABI(QualType T) { return !CodeGenFunction::hasScalarEvaluationKind(T) || T->isMemberFunctionPointerType(); } ABIInfo::~ABIInfo() {} static bool isRecordReturnIndirect(const RecordType *RT, CGCXXABI &CXXABI) { const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(RT->getDecl()); if (!RD) return false; return CXXABI.isReturnTypeIndirect(RD); } static bool isRecordReturnIndirect(QualType T, CGCXXABI &CXXABI) { const RecordType *RT = T->getAs<RecordType>(); if (!RT) return false; return isRecordReturnIndirect(RT, CXXABI); } static CGCXXABI::RecordArgABI getRecordArgABI(const RecordType *RT, CGCXXABI &CXXABI) { const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(RT->getDecl()); if (!RD) return CGCXXABI::RAA_Default; return CXXABI.getRecordArgABI(RD); } static CGCXXABI::RecordArgABI getRecordArgABI(QualType T, CGCXXABI &CXXABI) { const RecordType *RT = T->getAs<RecordType>(); if (!RT) return CGCXXABI::RAA_Default; return getRecordArgABI(RT, CXXABI); } CGCXXABI &ABIInfo::getCXXABI() const { return CGT.getCXXABI(); } ASTContext &ABIInfo::getContext() const { return CGT.getContext(); } llvm::LLVMContext &ABIInfo::getVMContext() const { return CGT.getLLVMContext(); } const llvm::DataLayout &ABIInfo::getDataLayout() const { return CGT.getDataLayout(); } const TargetInfo &ABIInfo::getTarget() const { return CGT.getTarget(); } void ABIArgInfo::dump() const { raw_ostream &OS = llvm::errs(); OS << "(ABIArgInfo Kind="; switch (TheKind) { case Direct: OS << "Direct Type="; if (llvm::Type *Ty = getCoerceToType()) Ty->print(OS); else OS << "null"; break; case Extend: OS << "Extend"; break; case Ignore: OS << "Ignore"; break; case Indirect: OS << "Indirect Align=" << getIndirectAlign() << " ByVal=" << getIndirectByVal() << " Realign=" << getIndirectRealign(); break; case Expand: OS << "Expand"; break; } OS << ")\n"; } TargetCodeGenInfo::~TargetCodeGenInfo() { delete Info; } // If someone can figure out a general rule for this, that would be great. // It's probably just doomed to be platform-dependent, though. unsigned TargetCodeGenInfo::getSizeOfUnwindException() const { // Verified for: // x86-64 FreeBSD, Linux, Darwin // x86-32 FreeBSD, Linux, Darwin // PowerPC Linux, Darwin // ARM Darwin (*not* EABI) // AArch64 Linux return 32; } bool TargetCodeGenInfo::isNoProtoCallVariadic(const CallArgList &args, const FunctionNoProtoType *fnType) const { // The following conventions are known to require this to be false: // x86_stdcall // MIPS // For everything else, we just prefer false unless we opt out. return false; } void TargetCodeGenInfo::getDependentLibraryOption(llvm::StringRef Lib, llvm::SmallString<24> &Opt) const { // This assumes the user is passing a library name like "rt" instead of a // filename like "librt.a/so", and that they don't care whether it's static or // dynamic. Opt = "-l"; Opt += Lib; } static bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays); /// isEmptyField - Return true iff a the field is "empty", that is it /// is an unnamed bit-field or an (array of) empty record(s). static bool isEmptyField(ASTContext &Context, const FieldDecl *FD, bool AllowArrays) { if (FD->isUnnamedBitfield()) return true; QualType FT = FD->getType(); // Constant arrays of empty records count as empty, strip them off. // Constant arrays of zero length always count as empty. if (AllowArrays) while (const ConstantArrayType *AT = Context.getAsConstantArrayType(FT)) { if (AT->getSize() == 0) return true; FT = AT->getElementType(); } const RecordType *RT = FT->getAs<RecordType>(); if (!RT) return false; // C++ record fields are never empty, at least in the Itanium ABI. // // FIXME: We should use a predicate for whether this behavior is true in the // current ABI. if (isa<CXXRecordDecl>(RT->getDecl())) return false; return isEmptyRecord(Context, FT, AllowArrays); } /// isEmptyRecord - Return true iff a structure contains only empty /// fields. Note that a structure with a flexible array member is not /// considered empty. static bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays) { const RecordType *RT = T->getAs<RecordType>(); if (!RT) return 0; const RecordDecl *RD = RT->getDecl(); if (RD->hasFlexibleArrayMember()) return false; // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) for (CXXRecordDecl::base_class_const_iterator i = CXXRD->bases_begin(), e = CXXRD->bases_end(); i != e; ++i) if (!isEmptyRecord(Context, i->getType(), true)) return false; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) if (!isEmptyField(Context, *i, AllowArrays)) return false; return true; } /// isSingleElementStruct - Determine if a structure is a "single /// element struct", i.e. it has exactly one non-empty field or /// exactly one field which is itself a single element /// struct. Structures with flexible array members are never /// considered single element structs. /// /// \return The field declaration for the single non-empty field, if /// it exists. static const Type *isSingleElementStruct(QualType T, ASTContext &Context) { const RecordType *RT = T->getAsStructureType(); if (!RT) return 0; const RecordDecl *RD = RT->getDecl(); if (RD->hasFlexibleArrayMember()) return 0; const Type *Found = 0; // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) { for (CXXRecordDecl::base_class_const_iterator i = CXXRD->bases_begin(), e = CXXRD->bases_end(); i != e; ++i) { // Ignore empty records. if (isEmptyRecord(Context, i->getType(), true)) continue; // If we already found an element then this isn't a single-element struct. if (Found) return 0; // If this is non-empty and not a single element struct, the composite // cannot be a single element struct. Found = isSingleElementStruct(i->getType(), Context); if (!Found) return 0; } } // Check for single element. for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { const FieldDecl *FD = *i; QualType FT = FD->getType(); // Ignore empty fields. if (isEmptyField(Context, FD, true)) continue; // If we already found an element then this isn't a single-element // struct. if (Found) return 0; // Treat single element arrays as the element. while (const ConstantArrayType *AT = Context.getAsConstantArrayType(FT)) { if (AT->getSize().getZExtValue() != 1) break; FT = AT->getElementType(); } if (!isAggregateTypeForABI(FT)) { Found = FT.getTypePtr(); } else { Found = isSingleElementStruct(FT, Context); if (!Found) return 0; } } // We don't consider a struct a single-element struct if it has // padding beyond the element type. if (Found && Context.getTypeSize(Found) != Context.getTypeSize(T)) return 0; return Found; } static bool is32Or64BitBasicType(QualType Ty, ASTContext &Context) { // Treat complex types as the element type. if (const ComplexType *CTy = Ty->getAs<ComplexType>()) Ty = CTy->getElementType(); // Check for a type which we know has a simple scalar argument-passing // convention without any padding. (We're specifically looking for 32 // and 64-bit integer and integer-equivalents, float, and double.) if (!Ty->getAs<BuiltinType>() && !Ty->hasPointerRepresentation() && !Ty->isEnumeralType() && !Ty->isBlockPointerType()) return false; uint64_t Size = Context.getTypeSize(Ty); return Size == 32 || Size == 64; } /// canExpandIndirectArgument - Test whether an argument type which is to be /// passed indirectly (on the stack) would have the equivalent layout if it was /// expanded into separate arguments. If so, we prefer to do the latter to avoid /// inhibiting optimizations. /// // FIXME: This predicate is missing many cases, currently it just follows // llvm-gcc (checks that all fields are 32-bit or 64-bit primitive types). We // should probably make this smarter, or better yet make the LLVM backend // capable of handling it. static bool canExpandIndirectArgument(QualType Ty, ASTContext &Context) { // We can only expand structure types. const RecordType *RT = Ty->getAs<RecordType>(); if (!RT) return false; // We can only expand (C) structures. // // FIXME: This needs to be generalized to handle classes as well. const RecordDecl *RD = RT->getDecl(); if (!RD->isStruct() || isa<CXXRecordDecl>(RD)) return false; uint64_t Size = 0; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { const FieldDecl *FD = *i; if (!is32Or64BitBasicType(FD->getType(), Context)) return false; // FIXME: Reject bit-fields wholesale; there are two problems, we don't know // how to expand them yet, and the predicate for telling if a bitfield still // counts as "basic" is more complicated than what we were doing previously. if (FD->isBitField()) return false; Size += Context.getTypeSize(FD->getType()); } // Make sure there are not any holes in the struct. if (Size != Context.getTypeSize(Ty)) return false; return true; } namespace { /// DefaultABIInfo - The default implementation for ABI specific /// details. This implementation provides information which results in /// self-consistent and sensible LLVM IR generation, but does not /// conform to any particular ABI. class DefaultABIInfo : public ABIInfo { public: DefaultABIInfo(CodeGen::CodeGenTypes &CGT) : ABIInfo(CGT) {} ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType RetTy) const; virtual void computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyArgumentType(it->type); } virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class DefaultTargetCodeGenInfo : public TargetCodeGenInfo { public: DefaultTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) : TargetCodeGenInfo(new DefaultABIInfo(CGT)) {} }; llvm::Value *DefaultABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { return 0; } ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const { if (isAggregateTypeForABI(Ty)) { // Records with non trivial destructors/constructors should not be passed // by value. if (isRecordReturnIndirect(Ty, getCXXABI())) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); return ABIArgInfo::getIndirect(0); } // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } ABIArgInfo DefaultABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); if (isAggregateTypeForABI(RetTy)) return ABIArgInfo::getIndirect(0); // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } //===----------------------------------------------------------------------===// // le32/PNaCl bitcode ABI Implementation // // This is a simplified version of the x86_32 ABI. Arguments and return values // are always passed on the stack. //===----------------------------------------------------------------------===// class PNaClABIInfo : public ABIInfo { public: PNaClABIInfo(CodeGen::CodeGenTypes &CGT) : ABIInfo(CGT) {} ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType RetTy) const; virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class PNaClTargetCodeGenInfo : public TargetCodeGenInfo { public: PNaClTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) : TargetCodeGenInfo(new PNaClABIInfo(CGT)) {} }; void PNaClABIInfo::computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyArgumentType(it->type); } llvm::Value *PNaClABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { return 0; } /// \brief Classify argument of given type \p Ty. ABIArgInfo PNaClABIInfo::classifyArgumentType(QualType Ty) const { if (isAggregateTypeForABI(Ty)) { if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); return ABIArgInfo::getIndirect(0); } else if (const EnumType *EnumTy = Ty->getAs<EnumType>()) { // Treat an enum type as its underlying type. Ty = EnumTy->getDecl()->getIntegerType(); } else if (Ty->isFloatingType()) { // Floating-point types don't go inreg. return ABIArgInfo::getDirect(); } return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } ABIArgInfo PNaClABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); // In the PNaCl ABI we always return records/structures on the stack. if (isAggregateTypeForABI(RetTy)) return ABIArgInfo::getIndirect(0); // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } /// IsX86_MMXType - Return true if this is an MMX type. bool IsX86_MMXType(llvm::Type *IRType) { // Return true if the type is an MMX type <2 x i32>, <4 x i16>, or <8 x i8>. return IRType->isVectorTy() && IRType->getPrimitiveSizeInBits() == 64 && cast<llvm::VectorType>(IRType)->getElementType()->isIntegerTy() && IRType->getScalarSizeInBits() != 64; } static llvm::Type* X86AdjustInlineAsmType(CodeGen::CodeGenFunction &CGF, StringRef Constraint, llvm::Type* Ty) { if ((Constraint == "y" || Constraint == "&y") && Ty->isVectorTy()) { if (cast<llvm::VectorType>(Ty)->getBitWidth() != 64) { // Invalid MMX constraint return 0; } return llvm::Type::getX86_MMXTy(CGF.getLLVMContext()); } // No operation needed return Ty; } //===----------------------------------------------------------------------===// // X86-32 ABI Implementation //===----------------------------------------------------------------------===// /// X86_32ABIInfo - The X86-32 ABI information. class X86_32ABIInfo : public ABIInfo { enum Class { Integer, Float }; static const unsigned MinABIStackAlignInBytes = 4; bool IsDarwinVectorABI; bool IsSmallStructInRegABI; bool IsWin32StructABI; unsigned DefaultNumRegisterParameters; static bool isRegisterSize(unsigned Size) { return (Size == 8 || Size == 16 || Size == 32 || Size == 64); } static bool shouldReturnTypeInRegister(QualType Ty, ASTContext &Context, unsigned callingConvention); /// getIndirectResult - Give a source type \arg Ty, return a suitable result /// such that the argument will be passed in memory. ABIArgInfo getIndirectResult(QualType Ty, bool ByVal, unsigned &FreeRegs) const; /// \brief Return the alignment to use for the given type on the stack. unsigned getTypeStackAlignInBytes(QualType Ty, unsigned Align) const; Class classify(QualType Ty) const; ABIArgInfo classifyReturnType(QualType RetTy, unsigned callingConvention) const; ABIArgInfo classifyArgumentType(QualType RetTy, unsigned &FreeRegs, bool IsFastCall) const; bool shouldUseInReg(QualType Ty, unsigned &FreeRegs, bool IsFastCall, bool &NeedsPadding) const; public: virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; X86_32ABIInfo(CodeGen::CodeGenTypes &CGT, bool d, bool p, bool w, unsigned r) : ABIInfo(CGT), IsDarwinVectorABI(d), IsSmallStructInRegABI(p), IsWin32StructABI(w), DefaultNumRegisterParameters(r) {} }; class X86_32TargetCodeGenInfo : public TargetCodeGenInfo { public: X86_32TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, bool d, bool p, bool w, unsigned r) :TargetCodeGenInfo(new X86_32ABIInfo(CGT, d, p, w, r)) {} static bool isStructReturnInRegABI( const llvm::Triple &Triple, const CodeGenOptions &Opts); void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const; int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const { // Darwin uses different dwarf register numbers for EH. if (CGM.getTarget().getTriple().isOSDarwin()) return 5; return 4; } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const; llvm::Type* adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, StringRef Constraint, llvm::Type* Ty) const { return X86AdjustInlineAsmType(CGF, Constraint, Ty); } llvm::Constant *getUBSanFunctionSignature(CodeGen::CodeGenModule &CGM) const { unsigned Sig = (0xeb << 0) | // jmp rel8 (0x06 << 8) | // .+0x08 ('F' << 16) | ('T' << 24); return llvm::ConstantInt::get(CGM.Int32Ty, Sig); } }; } /// shouldReturnTypeInRegister - Determine if the given type should be /// passed in a register (for the Darwin ABI). bool X86_32ABIInfo::shouldReturnTypeInRegister(QualType Ty, ASTContext &Context, unsigned callingConvention) { uint64_t Size = Context.getTypeSize(Ty); // Type must be register sized. if (!isRegisterSize(Size)) return false; if (Ty->isVectorType()) { // 64- and 128- bit vectors inside structures are not returned in // registers. if (Size == 64 || Size == 128) return false; return true; } // If this is a builtin, pointer, enum, complex type, member pointer, or // member function pointer it is ok. if (Ty->getAs<BuiltinType>() || Ty->hasPointerRepresentation() || Ty->isAnyComplexType() || Ty->isEnumeralType() || Ty->isBlockPointerType() || Ty->isMemberPointerType()) return true; // Arrays are treated like records. if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty)) return shouldReturnTypeInRegister(AT->getElementType(), Context, callingConvention); // Otherwise, it must be a record type. const RecordType *RT = Ty->getAs<RecordType>(); if (!RT) return false; // FIXME: Traverse bases here too. // For thiscall conventions, structures will never be returned in // a register. This is for compatibility with the MSVC ABI if (callingConvention == llvm::CallingConv::X86_ThisCall && RT->isStructureType()) { return false; } // Structure types are passed in register if all fields would be // passed in a register. for (RecordDecl::field_iterator i = RT->getDecl()->field_begin(), e = RT->getDecl()->field_end(); i != e; ++i) { const FieldDecl *FD = *i; // Empty fields are ignored. if (isEmptyField(Context, FD, true)) continue; // Check fields recursively. if (!shouldReturnTypeInRegister(FD->getType(), Context, callingConvention)) return false; } return true; } ABIArgInfo X86_32ABIInfo::classifyReturnType(QualType RetTy, unsigned callingConvention) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); if (const VectorType *VT = RetTy->getAs<VectorType>()) { // On Darwin, some vectors are returned in registers. if (IsDarwinVectorABI) { uint64_t Size = getContext().getTypeSize(RetTy); // 128-bit vectors are a special case; they are returned in // registers and we need to make sure to pick a type the LLVM // backend will like. if (Size == 128) return ABIArgInfo::getDirect(llvm::VectorType::get( llvm::Type::getInt64Ty(getVMContext()), 2)); // Always return in register if it fits in a general purpose // register, or if it is 64 bits and has a single element. if ((Size == 8 || Size == 16 || Size == 32) || (Size == 64 && VT->getNumElements() == 1)) return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), Size)); return ABIArgInfo::getIndirect(0); } return ABIArgInfo::getDirect(); } if (isAggregateTypeForABI(RetTy)) { if (const RecordType *RT = RetTy->getAs<RecordType>()) { if (isRecordReturnIndirect(RT, getCXXABI())) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); // Structures with flexible arrays are always indirect. if (RT->getDecl()->hasFlexibleArrayMember()) return ABIArgInfo::getIndirect(0); } // If specified, structs and unions are always indirect. if (!IsSmallStructInRegABI && !RetTy->isAnyComplexType()) return ABIArgInfo::getIndirect(0); // Small structures which are register sized are generally returned // in a register. if (X86_32ABIInfo::shouldReturnTypeInRegister(RetTy, getContext(), callingConvention)) { uint64_t Size = getContext().getTypeSize(RetTy); // As a special-case, if the struct is a "single-element" struct, and // the field is of type "float" or "double", return it in a // floating-point register. (MSVC does not apply this special case.) // We apply a similar transformation for pointer types to improve the // quality of the generated IR. if (const Type *SeltTy = isSingleElementStruct(RetTy, getContext())) if ((!IsWin32StructABI && SeltTy->isRealFloatingType()) || SeltTy->hasPointerRepresentation()) return ABIArgInfo::getDirect(CGT.ConvertType(QualType(SeltTy, 0))); // FIXME: We should be able to narrow this integer in cases with dead // padding. return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(),Size)); } return ABIArgInfo::getIndirect(0); } // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } static bool isSSEVectorType(ASTContext &Context, QualType Ty) { return Ty->getAs<VectorType>() && Context.getTypeSize(Ty) == 128; } static bool isRecordWithSSEVectorType(ASTContext &Context, QualType Ty) { const RecordType *RT = Ty->getAs<RecordType>(); if (!RT) return 0; const RecordDecl *RD = RT->getDecl(); // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) for (CXXRecordDecl::base_class_const_iterator i = CXXRD->bases_begin(), e = CXXRD->bases_end(); i != e; ++i) if (!isRecordWithSSEVectorType(Context, i->getType())) return false; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { QualType FT = i->getType(); if (isSSEVectorType(Context, FT)) return true; if (isRecordWithSSEVectorType(Context, FT)) return true; } return false; } unsigned X86_32ABIInfo::getTypeStackAlignInBytes(QualType Ty, unsigned Align) const { // Otherwise, if the alignment is less than or equal to the minimum ABI // alignment, just use the default; the backend will handle this. if (Align <= MinABIStackAlignInBytes) return 0; // Use default alignment. // On non-Darwin, the stack type alignment is always 4. if (!IsDarwinVectorABI) { // Set explicit alignment, since we may need to realign the top. return MinABIStackAlignInBytes; } // Otherwise, if the type contains an SSE vector type, the alignment is 16. if (Align >= 16 && (isSSEVectorType(getContext(), Ty) || isRecordWithSSEVectorType(getContext(), Ty))) return 16; return MinABIStackAlignInBytes; } ABIArgInfo X86_32ABIInfo::getIndirectResult(QualType Ty, bool ByVal, unsigned &FreeRegs) const { if (!ByVal) { if (FreeRegs) { --FreeRegs; // Non byval indirects just use one pointer. return ABIArgInfo::getIndirectInReg(0, false); } return ABIArgInfo::getIndirect(0, false); } // Compute the byval alignment. unsigned TypeAlign = getContext().getTypeAlign(Ty) / 8; unsigned StackAlign = getTypeStackAlignInBytes(Ty, TypeAlign); if (StackAlign == 0) return ABIArgInfo::getIndirect(4); // If the stack alignment is less than the type alignment, realign the // argument. if (StackAlign < TypeAlign) return ABIArgInfo::getIndirect(StackAlign, /*ByVal=*/true, /*Realign=*/true); return ABIArgInfo::getIndirect(StackAlign); } X86_32ABIInfo::Class X86_32ABIInfo::classify(QualType Ty) const { const Type *T = isSingleElementStruct(Ty, getContext()); if (!T) T = Ty.getTypePtr(); if (const BuiltinType *BT = T->getAs<BuiltinType>()) { BuiltinType::Kind K = BT->getKind(); if (K == BuiltinType::Float || K == BuiltinType::Double) return Float; } return Integer; } bool X86_32ABIInfo::shouldUseInReg(QualType Ty, unsigned &FreeRegs, bool IsFastCall, bool &NeedsPadding) const { NeedsPadding = false; Class C = classify(Ty); if (C == Float) return false; unsigned Size = getContext().getTypeSize(Ty); unsigned SizeInRegs = (Size + 31) / 32; if (SizeInRegs == 0) return false; if (SizeInRegs > FreeRegs) { FreeRegs = 0; return false; } FreeRegs -= SizeInRegs; if (IsFastCall) { if (Size > 32) return false; if (Ty->isIntegralOrEnumerationType()) return true; if (Ty->isPointerType()) return true; if (Ty->isReferenceType()) return true; if (FreeRegs) NeedsPadding = true; return false; } return true; } ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty, unsigned &FreeRegs, bool IsFastCall) const { // FIXME: Set alignment on indirect arguments. if (isAggregateTypeForABI(Ty)) { if (const RecordType *RT = Ty->getAs<RecordType>()) { if (IsWin32StructABI) return getIndirectResult(Ty, true, FreeRegs); if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(RT, getCXXABI())) return getIndirectResult(Ty, RAA == CGCXXABI::RAA_DirectInMemory, FreeRegs); // Structures with flexible arrays are always indirect. if (RT->getDecl()->hasFlexibleArrayMember()) return getIndirectResult(Ty, true, FreeRegs); } // Ignore empty structs/unions. if (isEmptyRecord(getContext(), Ty, true)) return ABIArgInfo::getIgnore(); llvm::LLVMContext &LLVMContext = getVMContext(); llvm::IntegerType *Int32 = llvm::Type::getInt32Ty(LLVMContext); bool NeedsPadding; if (shouldUseInReg(Ty, FreeRegs, IsFastCall, NeedsPadding)) { unsigned SizeInRegs = (getContext().getTypeSize(Ty) + 31) / 32; SmallVector<llvm::Type*, 3> Elements(SizeInRegs, Int32); llvm::Type *Result = llvm::StructType::get(LLVMContext, Elements); return ABIArgInfo::getDirectInReg(Result); } llvm::IntegerType *PaddingType = NeedsPadding ? Int32 : 0; // Expand small (<= 128-bit) record types when we know that the stack layout // of those arguments will match the struct. This is important because the // LLVM backend isn't smart enough to remove byval, which inhibits many // optimizations. if (getContext().getTypeSize(Ty) <= 4*32 && canExpandIndirectArgument(Ty, getContext())) return ABIArgInfo::getExpandWithPadding(IsFastCall, PaddingType); return getIndirectResult(Ty, true, FreeRegs); } if (const VectorType *VT = Ty->getAs<VectorType>()) { // On Darwin, some vectors are passed in memory, we handle this by passing // it as an i8/i16/i32/i64. if (IsDarwinVectorABI) { uint64_t Size = getContext().getTypeSize(Ty); if ((Size == 8 || Size == 16 || Size == 32) || (Size == 64 && VT->getNumElements() == 1)) return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), Size)); } if (IsX86_MMXType(CGT.ConvertType(Ty))) return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), 64)); return ABIArgInfo::getDirect(); } if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); bool NeedsPadding; bool InReg = shouldUseInReg(Ty, FreeRegs, IsFastCall, NeedsPadding); if (Ty->isPromotableIntegerType()) { if (InReg) return ABIArgInfo::getExtendInReg(); return ABIArgInfo::getExtend(); } if (InReg) return ABIArgInfo::getDirectInReg(); return ABIArgInfo::getDirect(); } void X86_32ABIInfo::computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType(), FI.getCallingConvention()); unsigned CC = FI.getCallingConvention(); bool IsFastCall = CC == llvm::CallingConv::X86_FastCall; unsigned FreeRegs; if (IsFastCall) FreeRegs = 2; else if (FI.getHasRegParm()) FreeRegs = FI.getRegParm(); else FreeRegs = DefaultNumRegisterParameters; // If the return value is indirect, then the hidden argument is consuming one // integer register. if (FI.getReturnInfo().isIndirect() && FreeRegs) { --FreeRegs; ABIArgInfo &Old = FI.getReturnInfo(); Old = ABIArgInfo::getIndirectInReg(Old.getIndirectAlign(), Old.getIndirectByVal(), Old.getIndirectRealign()); } for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyArgumentType(it->type, FreeRegs, IsFastCall); } llvm::Value *X86_32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { llvm::Type *BPP = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); // Compute if the address needs to be aligned unsigned Align = CGF.getContext().getTypeAlignInChars(Ty).getQuantity(); Align = getTypeStackAlignInBytes(Ty, Align); Align = std::max(Align, 4U); if (Align > 4) { // addr = (addr + align - 1) & -align; llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int32Ty, Align - 1); Addr = CGF.Builder.CreateGEP(Addr, Offset); llvm::Value *AsInt = CGF.Builder.CreatePtrToInt(Addr, CGF.Int32Ty); llvm::Value *Mask = llvm::ConstantInt::get(CGF.Int32Ty, -Align); Addr = CGF.Builder.CreateIntToPtr(CGF.Builder.CreateAnd(AsInt, Mask), Addr->getType(), "ap.cur.aligned"); } llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); llvm::Value *AddrTyped = Builder.CreateBitCast(Addr, PTy); uint64_t Offset = llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, Align); llvm::Value *NextAddr = Builder.CreateGEP(Addr, llvm::ConstantInt::get(CGF.Int32Ty, Offset), "ap.next"); Builder.CreateStore(NextAddr, VAListAddrAsBPP); return AddrTyped; } void X86_32TargetCodeGenInfo::SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { if (FD->hasAttr<X86ForceAlignArgPointerAttr>()) { // Get the LLVM function. llvm::Function *Fn = cast<llvm::Function>(GV); // Now add the 'alignstack' attribute with a value of 16. llvm::AttrBuilder B; B.addStackAlignmentAttr(16); Fn->addAttributes(llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::get(CGM.getLLVMContext(), llvm::AttributeSet::FunctionIndex, B)); } } } bool X86_32TargetCodeGenInfo::initDwarfEHRegSizeTable( CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { CodeGen::CGBuilderTy &Builder = CGF.Builder; llvm::Value *Four8 = llvm::ConstantInt::get(CGF.Int8Ty, 4); // 0-7 are the eight integer registers; the order is different // on Darwin (for EH), but the range is the same. // 8 is %eip. AssignToArrayRange(Builder, Address, Four8, 0, 8); if (CGF.CGM.getTarget().getTriple().isOSDarwin()) { // 12-16 are st(0..4). Not sure why we stop at 4. // These have size 16, which is sizeof(long double) on // platforms with 8-byte alignment for that type. llvm::Value *Sixteen8 = llvm::ConstantInt::get(CGF.Int8Ty, 16); AssignToArrayRange(Builder, Address, Sixteen8, 12, 16); } else { // 9 is %eflags, which doesn't get a size on Darwin for some // reason. Builder.CreateStore(Four8, Builder.CreateConstInBoundsGEP1_32(Address, 9)); // 11-16 are st(0..5). Not sure why we stop at 5. // These have size 12, which is sizeof(long double) on // platforms with 4-byte alignment for that type. llvm::Value *Twelve8 = llvm::ConstantInt::get(CGF.Int8Ty, 12); AssignToArrayRange(Builder, Address, Twelve8, 11, 16); } return false; } //===----------------------------------------------------------------------===// // X86-64 ABI Implementation //===----------------------------------------------------------------------===// namespace { /// X86_64ABIInfo - The X86_64 ABI information. class X86_64ABIInfo : public ABIInfo { enum Class { Integer = 0, SSE, SSEUp, X87, X87Up, ComplexX87, NoClass, Memory }; /// merge - Implement the X86_64 ABI merging algorithm. /// /// Merge an accumulating classification \arg Accum with a field /// classification \arg Field. /// /// \param Accum - The accumulating classification. This should /// always be either NoClass or the result of a previous merge /// call. In addition, this should never be Memory (the caller /// should just return Memory for the aggregate). static Class merge(Class Accum, Class Field); /// postMerge - Implement the X86_64 ABI post merging algorithm. /// /// Post merger cleanup, reduces a malformed Hi and Lo pair to /// final MEMORY or SSE classes when necessary. /// /// \param AggregateSize - The size of the current aggregate in /// the classification process. /// /// \param Lo - The classification for the parts of the type /// residing in the low word of the containing object. /// /// \param Hi - The classification for the parts of the type /// residing in the higher words of the containing object. /// void postMerge(unsigned AggregateSize, Class &Lo, Class &Hi) const; /// classify - Determine the x86_64 register classes in which the /// given type T should be passed. /// /// \param Lo - The classification for the parts of the type /// residing in the low word of the containing object. /// /// \param Hi - The classification for the parts of the type /// residing in the high word of the containing object. /// /// \param OffsetBase - The bit offset of this type in the /// containing object. Some parameters are classified different /// depending on whether they straddle an eightbyte boundary. /// /// \param isNamedArg - Whether the argument in question is a "named" /// argument, as used in AMD64-ABI 3.5.7. /// /// If a word is unused its result will be NoClass; if a type should /// be passed in Memory then at least the classification of \arg Lo /// will be Memory. /// /// The \arg Lo class will be NoClass iff the argument is ignored. /// /// If the \arg Lo class is ComplexX87, then the \arg Hi class will /// also be ComplexX87. void classify(QualType T, uint64_t OffsetBase, Class &Lo, Class &Hi, bool isNamedArg) const; llvm::Type *GetByteVectorType(QualType Ty) const; llvm::Type *GetSSETypeAtOffset(llvm::Type *IRType, unsigned IROffset, QualType SourceTy, unsigned SourceOffset) const; llvm::Type *GetINTEGERTypeAtOffset(llvm::Type *IRType, unsigned IROffset, QualType SourceTy, unsigned SourceOffset) const; /// getIndirectResult - Give a source type \arg Ty, return a suitable result /// such that the argument will be returned in memory. ABIArgInfo getIndirectReturnResult(QualType Ty) const; /// getIndirectResult - Give a source type \arg Ty, return a suitable result /// such that the argument will be passed in memory. /// /// \param freeIntRegs - The number of free integer registers remaining /// available. ABIArgInfo getIndirectResult(QualType Ty, unsigned freeIntRegs) const; ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType Ty, unsigned freeIntRegs, unsigned &neededInt, unsigned &neededSSE, bool isNamedArg) const; bool IsIllegalVectorType(QualType Ty) const; /// The 0.98 ABI revision clarified a lot of ambiguities, /// unfortunately in ways that were not always consistent with /// certain previous compilers. In particular, platforms which /// required strict binary compatibility with older versions of GCC /// may need to exempt themselves. bool honorsRevision0_98() const { return !getTarget().getTriple().isOSDarwin(); } bool HasAVX; // Some ABIs (e.g. X32 ABI and Native Client OS) use 32 bit pointers on // 64-bit hardware. bool Has64BitPointers; public: X86_64ABIInfo(CodeGen::CodeGenTypes &CGT, bool hasavx) : ABIInfo(CGT), HasAVX(hasavx), Has64BitPointers(CGT.getDataLayout().getPointerSize(0) == 8) { } bool isPassedUsingAVXType(QualType type) const { unsigned neededInt, neededSSE; // The freeIntRegs argument doesn't matter here. ABIArgInfo info = classifyArgumentType(type, 0, neededInt, neededSSE, /*isNamedArg*/true); if (info.isDirect()) { llvm::Type *ty = info.getCoerceToType(); if (llvm::VectorType *vectorTy = dyn_cast_or_null<llvm::VectorType>(ty)) return (vectorTy->getBitWidth() > 128); } return false; } virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; /// WinX86_64ABIInfo - The Windows X86_64 ABI information. class WinX86_64ABIInfo : public ABIInfo { ABIArgInfo classify(QualType Ty, bool IsReturnType) const; public: WinX86_64ABIInfo(CodeGen::CodeGenTypes &CGT) : ABIInfo(CGT) {} virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class X86_64TargetCodeGenInfo : public TargetCodeGenInfo { public: X86_64TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, bool HasAVX) : TargetCodeGenInfo(new X86_64ABIInfo(CGT, HasAVX)) {} const X86_64ABIInfo &getABIInfo() const { return static_cast<const X86_64ABIInfo&>(TargetCodeGenInfo::getABIInfo()); } int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const { return 7; } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { llvm::Value *Eight8 = llvm::ConstantInt::get(CGF.Int8Ty, 8); // 0-15 are the 16 integer registers. // 16 is %rip. AssignToArrayRange(CGF.Builder, Address, Eight8, 0, 16); return false; } llvm::Type* adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, StringRef Constraint, llvm::Type* Ty) const { return X86AdjustInlineAsmType(CGF, Constraint, Ty); } bool isNoProtoCallVariadic(const CallArgList &args, const FunctionNoProtoType *fnType) const { // The default CC on x86-64 sets %al to the number of SSA // registers used, and GCC sets this when calling an unprototyped // function, so we override the default behavior. However, don't do // that when AVX types are involved: the ABI explicitly states it is // undefined, and it doesn't work in practice because of how the ABI // defines varargs anyway. if (fnType->getCallConv() == CC_C) { bool HasAVXType = false; for (CallArgList::const_iterator it = args.begin(), ie = args.end(); it != ie; ++it) { if (getABIInfo().isPassedUsingAVXType(it->Ty)) { HasAVXType = true; break; } } if (!HasAVXType) return true; } return TargetCodeGenInfo::isNoProtoCallVariadic(args, fnType); } llvm::Constant *getUBSanFunctionSignature(CodeGen::CodeGenModule &CGM) const { unsigned Sig = (0xeb << 0) | // jmp rel8 (0x0a << 8) | // .+0x0c ('F' << 16) | ('T' << 24); return llvm::ConstantInt::get(CGM.Int32Ty, Sig); } }; static std::string qualifyWindowsLibrary(llvm::StringRef Lib) { // If the argument does not end in .lib, automatically add the suffix. This // matches the behavior of MSVC. std::string ArgStr = Lib; if (!Lib.endswith_lower(".lib")) ArgStr += ".lib"; return ArgStr; } class WinX86_32TargetCodeGenInfo : public X86_32TargetCodeGenInfo { public: WinX86_32TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, bool d, bool p, bool w, unsigned RegParms) : X86_32TargetCodeGenInfo(CGT, d, p, w, RegParms) {} void getDependentLibraryOption(llvm::StringRef Lib, llvm::SmallString<24> &Opt) const { Opt = "/DEFAULTLIB:"; Opt += qualifyWindowsLibrary(Lib); } void getDetectMismatchOption(llvm::StringRef Name, llvm::StringRef Value, llvm::SmallString<32> &Opt) const { Opt = "/FAILIFMISMATCH:\"" + Name.str() + "=" + Value.str() + "\""; } }; class WinX86_64TargetCodeGenInfo : public TargetCodeGenInfo { public: WinX86_64TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) : TargetCodeGenInfo(new WinX86_64ABIInfo(CGT)) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const { return 7; } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { llvm::Value *Eight8 = llvm::ConstantInt::get(CGF.Int8Ty, 8); // 0-15 are the 16 integer registers. // 16 is %rip. AssignToArrayRange(CGF.Builder, Address, Eight8, 0, 16); return false; } void getDependentLibraryOption(llvm::StringRef Lib, llvm::SmallString<24> &Opt) const { Opt = "/DEFAULTLIB:"; Opt += qualifyWindowsLibrary(Lib); } void getDetectMismatchOption(llvm::StringRef Name, llvm::StringRef Value, llvm::SmallString<32> &Opt) const { Opt = "/FAILIFMISMATCH:\"" + Name.str() + "=" + Value.str() + "\""; } }; } void X86_64ABIInfo::postMerge(unsigned AggregateSize, Class &Lo, Class &Hi) const { // AMD64-ABI 3.2.3p2: Rule 5. Then a post merger cleanup is done: // // (a) If one of the classes is Memory, the whole argument is passed in // memory. // // (b) If X87UP is not preceded by X87, the whole argument is passed in // memory. // // (c) If the size of the aggregate exceeds two eightbytes and the first // eightbyte isn't SSE or any other eightbyte isn't SSEUP, the whole // argument is passed in memory. NOTE: This is necessary to keep the // ABI working for processors that don't support the __m256 type. // // (d) If SSEUP is not preceded by SSE or SSEUP, it is converted to SSE. // // Some of these are enforced by the merging logic. Others can arise // only with unions; for example: // union { _Complex double; unsigned; } // // Note that clauses (b) and (c) were added in 0.98. // if (Hi == Memory) Lo = Memory; if (Hi == X87Up && Lo != X87 && honorsRevision0_98()) Lo = Memory; if (AggregateSize > 128 && (Lo != SSE || Hi != SSEUp)) Lo = Memory; if (Hi == SSEUp && Lo != SSE) Hi = SSE; } X86_64ABIInfo::Class X86_64ABIInfo::merge(Class Accum, Class Field) { // AMD64-ABI 3.2.3p2: Rule 4. Each field of an object is // classified recursively so that always two fields are // considered. The resulting class is calculated according to // the classes of the fields in the eightbyte: // // (a) If both classes are equal, this is the resulting class. // // (b) If one of the classes is NO_CLASS, the resulting class is // the other class. // // (c) If one of the classes is MEMORY, the result is the MEMORY // class. // // (d) If one of the classes is INTEGER, the result is the // INTEGER. // // (e) If one of the classes is X87, X87UP, COMPLEX_X87 class, // MEMORY is used as class. // // (f) Otherwise class SSE is used. // Accum should never be memory (we should have returned) or // ComplexX87 (because this cannot be passed in a structure). assert((Accum != Memory && Accum != ComplexX87) && "Invalid accumulated classification during merge."); if (Accum == Field || Field == NoClass) return Accum; if (Field == Memory) return Memory; if (Accum == NoClass) return Field; if (Accum == Integer || Field == Integer) return Integer; if (Field == X87 || Field == X87Up || Field == ComplexX87 || Accum == X87 || Accum == X87Up) return Memory; return SSE; } void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase, Class &Lo, Class &Hi, bool isNamedArg) const { // FIXME: This code can be simplified by introducing a simple value class for // Class pairs with appropriate constructor methods for the various // situations. // FIXME: Some of the split computations are wrong; unaligned vectors // shouldn't be passed in registers for example, so there is no chance they // can straddle an eightbyte. Verify & simplify. Lo = Hi = NoClass; Class &Current = OffsetBase < 64 ? Lo : Hi; Current = Memory; if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) { BuiltinType::Kind k = BT->getKind(); if (k == BuiltinType::Void) { Current = NoClass; } else if (k == BuiltinType::Int128 || k == BuiltinType::UInt128) { Lo = Integer; Hi = Integer; } else if (k >= BuiltinType::Bool && k <= BuiltinType::LongLong) { Current = Integer; } else if ((k == BuiltinType::Float || k == BuiltinType::Double) || (k == BuiltinType::LongDouble && getTarget().getTriple().isOSNaCl())) { Current = SSE; } else if (k == BuiltinType::LongDouble) { Lo = X87; Hi = X87Up; } // FIXME: _Decimal32 and _Decimal64 are SSE. // FIXME: _float128 and _Decimal128 are (SSE, SSEUp). return; } if (const EnumType *ET = Ty->getAs<EnumType>()) { // Classify the underlying integer type. classify(ET->getDecl()->getIntegerType(), OffsetBase, Lo, Hi, isNamedArg); return; } if (Ty->hasPointerRepresentation()) { Current = Integer; return; } if (Ty->isMemberPointerType()) { if (Ty->isMemberFunctionPointerType() && Has64BitPointers) Lo = Hi = Integer; else Current = Integer; return; } if (const VectorType *VT = Ty->getAs<VectorType>()) { uint64_t Size = getContext().getTypeSize(VT); if (Size == 32) { // gcc passes all <4 x char>, <2 x short>, <1 x int>, <1 x // float> as integer. Current = Integer; // If this type crosses an eightbyte boundary, it should be // split. uint64_t EB_Real = (OffsetBase) / 64; uint64_t EB_Imag = (OffsetBase + Size - 1) / 64; if (EB_Real != EB_Imag) Hi = Lo; } else if (Size == 64) { // gcc passes <1 x double> in memory. :( if (VT->getElementType()->isSpecificBuiltinType(BuiltinType::Double)) return; // gcc passes <1 x long long> as INTEGER. if (VT->getElementType()->isSpecificBuiltinType(BuiltinType::LongLong) || VT->getElementType()->isSpecificBuiltinType(BuiltinType::ULongLong) || VT->getElementType()->isSpecificBuiltinType(BuiltinType::Long) || VT->getElementType()->isSpecificBuiltinType(BuiltinType::ULong)) Current = Integer; else Current = SSE; // If this type crosses an eightbyte boundary, it should be // split. if (OffsetBase && OffsetBase != 64) Hi = Lo; } else if (Size == 128 || (HasAVX && isNamedArg && Size == 256)) { // Arguments of 256-bits are split into four eightbyte chunks. The // least significant one belongs to class SSE and all the others to class // SSEUP. The original Lo and Hi design considers that types can't be // greater than 128-bits, so a 64-bit split in Hi and Lo makes sense. // This design isn't correct for 256-bits, but since there're no cases // where the upper parts would need to be inspected, avoid adding // complexity and just consider Hi to match the 64-256 part. // // Note that per 3.5.7 of AMD64-ABI, 256-bit args are only passed in // registers if they are "named", i.e. not part of the "..." of a // variadic function. Lo = SSE; Hi = SSEUp; } return; } if (const ComplexType *CT = Ty->getAs<ComplexType>()) { QualType ET = getContext().getCanonicalType(CT->getElementType()); uint64_t Size = getContext().getTypeSize(Ty); if (ET->isIntegralOrEnumerationType()) { if (Size <= 64) Current = Integer; else if (Size <= 128) Lo = Hi = Integer; } else if (ET == getContext().FloatTy) Current = SSE; else if (ET == getContext().DoubleTy || (ET == getContext().LongDoubleTy && getTarget().getTriple().isOSNaCl())) Lo = Hi = SSE; else if (ET == getContext().LongDoubleTy) Current = ComplexX87; // If this complex type crosses an eightbyte boundary then it // should be split. uint64_t EB_Real = (OffsetBase) / 64; uint64_t EB_Imag = (OffsetBase + getContext().getTypeSize(ET)) / 64; if (Hi == NoClass && EB_Real != EB_Imag) Hi = Lo; return; } if (const ConstantArrayType *AT = getContext().getAsConstantArrayType(Ty)) { // Arrays are treated like structures. uint64_t Size = getContext().getTypeSize(Ty); // AMD64-ABI 3.2.3p2: Rule 1. If the size of an object is larger // than four eightbytes, ..., it has class MEMORY. if (Size > 256) return; // AMD64-ABI 3.2.3p2: Rule 1. If ..., or it contains unaligned // fields, it has class MEMORY. // // Only need to check alignment of array base. if (OffsetBase % getContext().getTypeAlign(AT->getElementType())) return; // Otherwise implement simplified merge. We could be smarter about // this, but it isn't worth it and would be harder to verify. Current = NoClass; uint64_t EltSize = getContext().getTypeSize(AT->getElementType()); uint64_t ArraySize = AT->getSize().getZExtValue(); // The only case a 256-bit wide vector could be used is when the array // contains a single 256-bit element. Since Lo and Hi logic isn't extended // to work for sizes wider than 128, early check and fallback to memory. if (Size > 128 && EltSize != 256) return; for (uint64_t i=0, Offset=OffsetBase; i<ArraySize; ++i, Offset += EltSize) { Class FieldLo, FieldHi; classify(AT->getElementType(), Offset, FieldLo, FieldHi, isNamedArg); Lo = merge(Lo, FieldLo); Hi = merge(Hi, FieldHi); if (Lo == Memory || Hi == Memory) break; } postMerge(Size, Lo, Hi); assert((Hi != SSEUp || Lo == SSE) && "Invalid SSEUp array classification."); return; } if (const RecordType *RT = Ty->getAs<RecordType>()) { uint64_t Size = getContext().getTypeSize(Ty); // AMD64-ABI 3.2.3p2: Rule 1. If the size of an object is larger // than four eightbytes, ..., it has class MEMORY. if (Size > 256) return; // AMD64-ABI 3.2.3p2: Rule 2. If a C++ object has either a non-trivial // copy constructor or a non-trivial destructor, it is passed by invisible // reference. if (getRecordArgABI(RT, getCXXABI())) return; const RecordDecl *RD = RT->getDecl(); // Assume variable sized types are passed in memory. if (RD->hasFlexibleArrayMember()) return; const ASTRecordLayout &Layout = getContext().getASTRecordLayout(RD); // Reset Lo class, this will be recomputed. Current = NoClass; // If this is a C++ record, classify the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) { for (CXXRecordDecl::base_class_const_iterator i = CXXRD->bases_begin(), e = CXXRD->bases_end(); i != e; ++i) { assert(!i->isVirtual() && !i->getType()->isDependentType() && "Unexpected base class!"); const CXXRecordDecl *Base = cast<CXXRecordDecl>(i->getType()->getAs<RecordType>()->getDecl()); // Classify this field. // // AMD64-ABI 3.2.3p2: Rule 3. If the size of the aggregate exceeds a // single eightbyte, each is classified separately. Each eightbyte gets // initialized to class NO_CLASS. Class FieldLo, FieldHi; uint64_t Offset = OffsetBase + getContext().toBits(Layout.getBaseClassOffset(Base)); classify(i->getType(), Offset, FieldLo, FieldHi, isNamedArg); Lo = merge(Lo, FieldLo); Hi = merge(Hi, FieldHi); if (Lo == Memory || Hi == Memory) break; } } // Classify the fields one at a time, merging the results. unsigned idx = 0; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i, ++idx) { uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx); bool BitField = i->isBitField(); // AMD64-ABI 3.2.3p2: Rule 1. If the size of an object is larger than // four eightbytes, or it contains unaligned fields, it has class MEMORY. // // The only case a 256-bit wide vector could be used is when the struct // contains a single 256-bit element. Since Lo and Hi logic isn't extended // to work for sizes wider than 128, early check and fallback to memory. // if (Size > 128 && getContext().getTypeSize(i->getType()) != 256) { Lo = Memory; return; } // Note, skip this test for bit-fields, see below. if (!BitField && Offset % getContext().getTypeAlign(i->getType())) { Lo = Memory; return; } // Classify this field. // // AMD64-ABI 3.2.3p2: Rule 3. If the size of the aggregate // exceeds a single eightbyte, each is classified // separately. Each eightbyte gets initialized to class // NO_CLASS. Class FieldLo, FieldHi; // Bit-fields require special handling, they do not force the // structure to be passed in memory even if unaligned, and // therefore they can straddle an eightbyte. if (BitField) { // Ignore padding bit-fields. if (i->isUnnamedBitfield()) continue; uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx); uint64_t Size = i->getBitWidthValue(getContext()); uint64_t EB_Lo = Offset / 64; uint64_t EB_Hi = (Offset + Size - 1) / 64; if (EB_Lo) { assert(EB_Hi == EB_Lo && "Invalid classification, type > 16 bytes."); FieldLo = NoClass; FieldHi = Integer; } else { FieldLo = Integer; FieldHi = EB_Hi ? Integer : NoClass; } } else classify(i->getType(), Offset, FieldLo, FieldHi, isNamedArg); Lo = merge(Lo, FieldLo); Hi = merge(Hi, FieldHi); if (Lo == Memory || Hi == Memory) break; } postMerge(Size, Lo, Hi); } } ABIArgInfo X86_64ABIInfo::getIndirectReturnResult(QualType Ty) const { // If this is a scalar LLVM value then assume LLVM will pass it in the right // place naturally. if (!isAggregateTypeForABI(Ty)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } return ABIArgInfo::getIndirect(0); } bool X86_64ABIInfo::IsIllegalVectorType(QualType Ty) const { if (const VectorType *VecTy = Ty->getAs<VectorType>()) { uint64_t Size = getContext().getTypeSize(VecTy); unsigned LargestVector = HasAVX ? 256 : 128; if (Size <= 64 || Size > LargestVector) return true; } return false; } ABIArgInfo X86_64ABIInfo::getIndirectResult(QualType Ty, unsigned freeIntRegs) const { // If this is a scalar LLVM value then assume LLVM will pass it in the right // place naturally. // // This assumption is optimistic, as there could be free registers available // when we need to pass this argument in memory, and LLVM could try to pass // the argument in the free register. This does not seem to happen currently, // but this code would be much safer if we could mark the argument with // 'onstack'. See PR12193. if (!isAggregateTypeForABI(Ty) && !IsIllegalVectorType(Ty)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); // Compute the byval alignment. We specify the alignment of the byval in all // cases so that the mid-level optimizer knows the alignment of the byval. unsigned Align = std::max(getContext().getTypeAlign(Ty) / 8, 8U); // Attempt to avoid passing indirect results using byval when possible. This // is important for good codegen. // // We do this by coercing the value into a scalar type which the backend can // handle naturally (i.e., without using byval). // // For simplicity, we currently only do this when we have exhausted all of the // free integer registers. Doing this when there are free integer registers // would require more care, as we would have to ensure that the coerced value // did not claim the unused register. That would require either reording the // arguments to the function (so that any subsequent inreg values came first), // or only doing this optimization when there were no following arguments that // might be inreg. // // We currently expect it to be rare (particularly in well written code) for // arguments to be passed on the stack when there are still free integer // registers available (this would typically imply large structs being passed // by value), so this seems like a fair tradeoff for now. // // We can revisit this if the backend grows support for 'onstack' parameter // attributes. See PR12193. if (freeIntRegs == 0) { uint64_t Size = getContext().getTypeSize(Ty); // If this type fits in an eightbyte, coerce it into the matching integral // type, which will end up on the stack (with alignment 8). if (Align == 8 && Size <= 64) return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), Size)); } return ABIArgInfo::getIndirect(Align); } /// GetByteVectorType - The ABI specifies that a value should be passed in an /// full vector XMM/YMM register. Pick an LLVM IR type that will be passed as a /// vector register. llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const { llvm::Type *IRType = CGT.ConvertType(Ty); // Wrapper structs that just contain vectors are passed just like vectors, // strip them off if present. llvm::StructType *STy = dyn_cast<llvm::StructType>(IRType); while (STy && STy->getNumElements() == 1) { IRType = STy->getElementType(0); STy = dyn_cast<llvm::StructType>(IRType); } // If the preferred type is a 16-byte vector, prefer to pass it. if (llvm::VectorType *VT = dyn_cast<llvm::VectorType>(IRType)){ llvm::Type *EltTy = VT->getElementType(); unsigned BitWidth = VT->getBitWidth(); if ((BitWidth >= 128 && BitWidth <= 256) && (EltTy->isFloatTy() || EltTy->isDoubleTy() || EltTy->isIntegerTy(8) || EltTy->isIntegerTy(16) || EltTy->isIntegerTy(32) || EltTy->isIntegerTy(64) || EltTy->isIntegerTy(128))) return VT; } return llvm::VectorType::get(llvm::Type::getDoubleTy(getVMContext()), 2); } /// BitsContainNoUserData - Return true if the specified [start,end) bit range /// is known to either be off the end of the specified type or being in /// alignment padding. The user type specified is known to be at most 128 bits /// in size, and have passed through X86_64ABIInfo::classify with a successful /// classification that put one of the two halves in the INTEGER class. /// /// It is conservatively correct to return false. static bool BitsContainNoUserData(QualType Ty, unsigned StartBit, unsigned EndBit, ASTContext &Context) { // If the bytes being queried are off the end of the type, there is no user // data hiding here. This handles analysis of builtins, vectors and other // types that don't contain interesting padding. unsigned TySize = (unsigned)Context.getTypeSize(Ty); if (TySize <= StartBit) return true; if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty)) { unsigned EltSize = (unsigned)Context.getTypeSize(AT->getElementType()); unsigned NumElts = (unsigned)AT->getSize().getZExtValue(); // Check each element to see if the element overlaps with the queried range. for (unsigned i = 0; i != NumElts; ++i) { // If the element is after the span we care about, then we're done.. unsigned EltOffset = i*EltSize; if (EltOffset >= EndBit) break; unsigned EltStart = EltOffset < StartBit ? StartBit-EltOffset :0; if (!BitsContainNoUserData(AT->getElementType(), EltStart, EndBit-EltOffset, Context)) return false; } // If it overlaps no elements, then it is safe to process as padding. return true; } if (const RecordType *RT = Ty->getAs<RecordType>()) { const RecordDecl *RD = RT->getDecl(); const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) { for (CXXRecordDecl::base_class_const_iterator i = CXXRD->bases_begin(), e = CXXRD->bases_end(); i != e; ++i) { assert(!i->isVirtual() && !i->getType()->isDependentType() && "Unexpected base class!"); const CXXRecordDecl *Base = cast<CXXRecordDecl>(i->getType()->getAs<RecordType>()->getDecl()); // If the base is after the span we care about, ignore it. unsigned BaseOffset = Context.toBits(Layout.getBaseClassOffset(Base)); if (BaseOffset >= EndBit) continue; unsigned BaseStart = BaseOffset < StartBit ? StartBit-BaseOffset :0; if (!BitsContainNoUserData(i->getType(), BaseStart, EndBit-BaseOffset, Context)) return false; } } // Verify that no field has data that overlaps the region of interest. Yes // this could be sped up a lot by being smarter about queried fields, // however we're only looking at structs up to 16 bytes, so we don't care // much. unsigned idx = 0; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i, ++idx) { unsigned FieldOffset = (unsigned)Layout.getFieldOffset(idx); // If we found a field after the region we care about, then we're done. if (FieldOffset >= EndBit) break; unsigned FieldStart = FieldOffset < StartBit ? StartBit-FieldOffset :0; if (!BitsContainNoUserData(i->getType(), FieldStart, EndBit-FieldOffset, Context)) return false; } // If nothing in this record overlapped the area of interest, then we're // clean. return true; } return false; } /// ContainsFloatAtOffset - Return true if the specified LLVM IR type has a /// float member at the specified offset. For example, {int,{float}} has a /// float at offset 4. It is conservatively correct for this routine to return /// false. static bool ContainsFloatAtOffset(llvm::Type *IRType, unsigned IROffset, const llvm::DataLayout &TD) { // Base case if we find a float. if (IROffset == 0 && IRType->isFloatTy()) return true; // If this is a struct, recurse into the field at the specified offset. if (llvm::StructType *STy = dyn_cast<llvm::StructType>(IRType)) { const llvm::StructLayout *SL = TD.getStructLayout(STy); unsigned Elt = SL->getElementContainingOffset(IROffset); IROffset -= SL->getElementOffset(Elt); return ContainsFloatAtOffset(STy->getElementType(Elt), IROffset, TD); } // If this is an array, recurse into the field at the specified offset. if (llvm::ArrayType *ATy = dyn_cast<llvm::ArrayType>(IRType)) { llvm::Type *EltTy = ATy->getElementType(); unsigned EltSize = TD.getTypeAllocSize(EltTy); IROffset -= IROffset/EltSize*EltSize; return ContainsFloatAtOffset(EltTy, IROffset, TD); } return false; } /// GetSSETypeAtOffset - Return a type that will be passed by the backend in the /// low 8 bytes of an XMM register, corresponding to the SSE class. llvm::Type *X86_64ABIInfo:: GetSSETypeAtOffset(llvm::Type *IRType, unsigned IROffset, QualType SourceTy, unsigned SourceOffset) const { // The only three choices we have are either double, <2 x float>, or float. We // pass as float if the last 4 bytes is just padding. This happens for // structs that contain 3 floats. if (BitsContainNoUserData(SourceTy, SourceOffset*8+32, SourceOffset*8+64, getContext())) return llvm::Type::getFloatTy(getVMContext()); // We want to pass as <2 x float> if the LLVM IR type contains a float at // offset+0 and offset+4. Walk the LLVM IR type to find out if this is the // case. if (ContainsFloatAtOffset(IRType, IROffset, getDataLayout()) && ContainsFloatAtOffset(IRType, IROffset+4, getDataLayout())) return llvm::VectorType::get(llvm::Type::getFloatTy(getVMContext()), 2); return llvm::Type::getDoubleTy(getVMContext()); } /// GetINTEGERTypeAtOffset - The ABI specifies that a value should be passed in /// an 8-byte GPR. This means that we either have a scalar or we are talking /// about the high or low part of an up-to-16-byte struct. This routine picks /// the best LLVM IR type to represent this, which may be i64 or may be anything /// else that the backend will pass in a GPR that works better (e.g. i8, %foo*, /// etc). /// /// PrefType is an LLVM IR type that corresponds to (part of) the IR type for /// the source type. IROffset is an offset in bytes into the LLVM IR type that /// the 8-byte value references. PrefType may be null. /// /// SourceTy is the source level type for the entire argument. SourceOffset is /// an offset into this that we're processing (which is always either 0 or 8). /// llvm::Type *X86_64ABIInfo:: GetINTEGERTypeAtOffset(llvm::Type *IRType, unsigned IROffset, QualType SourceTy, unsigned SourceOffset) const { // If we're dealing with an un-offset LLVM IR type, then it means that we're // returning an 8-byte unit starting with it. See if we can safely use it. if (IROffset == 0) { // Pointers and int64's always fill the 8-byte unit. if ((isa<llvm::PointerType>(IRType) && Has64BitPointers) || IRType->isIntegerTy(64)) return IRType; // If we have a 1/2/4-byte integer, we can use it only if the rest of the // goodness in the source type is just tail padding. This is allowed to // kick in for struct {double,int} on the int, but not on // struct{double,int,int} because we wouldn't return the second int. We // have to do this analysis on the source type because we can't depend on // unions being lowered a specific way etc. if (IRType->isIntegerTy(8) || IRType->isIntegerTy(16) || IRType->isIntegerTy(32) || (isa<llvm::PointerType>(IRType) && !Has64BitPointers)) { unsigned BitWidth = isa<llvm::PointerType>(IRType) ? 32 : cast<llvm::IntegerType>(IRType)->getBitWidth(); if (BitsContainNoUserData(SourceTy, SourceOffset*8+BitWidth, SourceOffset*8+64, getContext())) return IRType; } } if (llvm::StructType *STy = dyn_cast<llvm::StructType>(IRType)) { // If this is a struct, recurse into the field at the specified offset. const llvm::StructLayout *SL = getDataLayout().getStructLayout(STy); if (IROffset < SL->getSizeInBytes()) { unsigned FieldIdx = SL->getElementContainingOffset(IROffset); IROffset -= SL->getElementOffset(FieldIdx); return GetINTEGERTypeAtOffset(STy->getElementType(FieldIdx), IROffset, SourceTy, SourceOffset); } } if (llvm::ArrayType *ATy = dyn_cast<llvm::ArrayType>(IRType)) { llvm::Type *EltTy = ATy->getElementType(); unsigned EltSize = getDataLayout().getTypeAllocSize(EltTy); unsigned EltOffset = IROffset/EltSize*EltSize; return GetINTEGERTypeAtOffset(EltTy, IROffset-EltOffset, SourceTy, SourceOffset); } // Okay, we don't have any better idea of what to pass, so we pass this in an // integer register that isn't too big to fit the rest of the struct. unsigned TySizeInBytes = (unsigned)getContext().getTypeSizeInChars(SourceTy).getQuantity(); assert(TySizeInBytes != SourceOffset && "Empty field?"); // It is always safe to classify this as an integer type up to i64 that // isn't larger than the structure. return llvm::IntegerType::get(getVMContext(), std::min(TySizeInBytes-SourceOffset, 8U)*8); } /// GetX86_64ByValArgumentPair - Given a high and low type that can ideally /// be used as elements of a two register pair to pass or return, return a /// first class aggregate to represent them. For example, if the low part of /// a by-value argument should be passed as i32* and the high part as float, /// return {i32*, float}. static llvm::Type * GetX86_64ByValArgumentPair(llvm::Type *Lo, llvm::Type *Hi, const llvm::DataLayout &TD) { // In order to correctly satisfy the ABI, we need to the high part to start // at offset 8. If the high and low parts we inferred are both 4-byte types // (e.g. i32 and i32) then the resultant struct type ({i32,i32}) won't have // the second element at offset 8. Check for this: unsigned LoSize = (unsigned)TD.getTypeAllocSize(Lo); unsigned HiAlign = TD.getABITypeAlignment(Hi); unsigned HiStart = llvm::DataLayout::RoundUpAlignment(LoSize, HiAlign); assert(HiStart != 0 && HiStart <= 8 && "Invalid x86-64 argument pair!"); // To handle this, we have to increase the size of the low part so that the // second element will start at an 8 byte offset. We can't increase the size // of the second element because it might make us access off the end of the // struct. if (HiStart != 8) { // There are only two sorts of types the ABI generation code can produce for // the low part of a pair that aren't 8 bytes in size: float or i8/i16/i32. // Promote these to a larger type. if (Lo->isFloatTy()) Lo = llvm::Type::getDoubleTy(Lo->getContext()); else { assert(Lo->isIntegerTy() && "Invalid/unknown lo type"); Lo = llvm::Type::getInt64Ty(Lo->getContext()); } } llvm::StructType *Result = llvm::StructType::get(Lo, Hi, NULL); // Verify that the second element is at an 8-byte offset. assert(TD.getStructLayout(Result)->getElementOffset(1) == 8 && "Invalid x86-64 argument pair!"); return Result; } ABIArgInfo X86_64ABIInfo:: classifyReturnType(QualType RetTy) const { // AMD64-ABI 3.2.3p4: Rule 1. Classify the return type with the // classification algorithm. X86_64ABIInfo::Class Lo, Hi; classify(RetTy, 0, Lo, Hi, /*isNamedArg*/ true); // Check some invariants. assert((Hi != Memory || Lo == Memory) && "Invalid memory classification."); assert((Hi != SSEUp || Lo == SSE) && "Invalid SSEUp classification."); llvm::Type *ResType = 0; switch (Lo) { case NoClass: if (Hi == NoClass) return ABIArgInfo::getIgnore(); // If the low part is just padding, it takes no register, leave ResType // null. assert((Hi == SSE || Hi == Integer || Hi == X87Up) && "Unknown missing lo part"); break; case SSEUp: case X87Up: llvm_unreachable("Invalid classification for lo word."); // AMD64-ABI 3.2.3p4: Rule 2. Types of class memory are returned via // hidden argument. case Memory: return getIndirectReturnResult(RetTy); // AMD64-ABI 3.2.3p4: Rule 3. If the class is INTEGER, the next // available register of the sequence %rax, %rdx is used. case Integer: ResType = GetINTEGERTypeAtOffset(CGT.ConvertType(RetTy), 0, RetTy, 0); // If we have a sign or zero extended integer, make sure to return Extend // so that the parameter gets the right LLVM IR attributes. if (Hi == NoClass && isa<llvm::IntegerType>(ResType)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); if (RetTy->isIntegralOrEnumerationType() && RetTy->isPromotableIntegerType()) return ABIArgInfo::getExtend(); } break; // AMD64-ABI 3.2.3p4: Rule 4. If the class is SSE, the next // available SSE register of the sequence %xmm0, %xmm1 is used. case SSE: ResType = GetSSETypeAtOffset(CGT.ConvertType(RetTy), 0, RetTy, 0); break; // AMD64-ABI 3.2.3p4: Rule 6. If the class is X87, the value is // returned on the X87 stack in %st0 as 80-bit x87 number. case X87: ResType = llvm::Type::getX86_FP80Ty(getVMContext()); break; // AMD64-ABI 3.2.3p4: Rule 8. If the class is COMPLEX_X87, the real // part of the value is returned in %st0 and the imaginary part in // %st1. case ComplexX87: assert(Hi == ComplexX87 && "Unexpected ComplexX87 classification."); ResType = llvm::StructType::get(llvm::Type::getX86_FP80Ty(getVMContext()), llvm::Type::getX86_FP80Ty(getVMContext()), NULL); break; } llvm::Type *HighPart = 0; switch (Hi) { // Memory was handled previously and X87 should // never occur as a hi class. case Memory: case X87: llvm_unreachable("Invalid classification for hi word."); case ComplexX87: // Previously handled. case NoClass: break; case Integer: HighPart = GetINTEGERTypeAtOffset(CGT.ConvertType(RetTy), 8, RetTy, 8); if (Lo == NoClass) // Return HighPart at offset 8 in memory. return ABIArgInfo::getDirect(HighPart, 8); break; case SSE: HighPart = GetSSETypeAtOffset(CGT.ConvertType(RetTy), 8, RetTy, 8); if (Lo == NoClass) // Return HighPart at offset 8 in memory. return ABIArgInfo::getDirect(HighPart, 8); break; // AMD64-ABI 3.2.3p4: Rule 5. If the class is SSEUP, the eightbyte // is passed in the next available eightbyte chunk if the last used // vector register. // // SSEUP should always be preceded by SSE, just widen. case SSEUp: assert(Lo == SSE && "Unexpected SSEUp classification."); ResType = GetByteVectorType(RetTy); break; // AMD64-ABI 3.2.3p4: Rule 7. If the class is X87UP, the value is // returned together with the previous X87 value in %st0. case X87Up: // If X87Up is preceded by X87, we don't need to do // anything. However, in some cases with unions it may not be // preceded by X87. In such situations we follow gcc and pass the // extra bits in an SSE reg. if (Lo != X87) { HighPart = GetSSETypeAtOffset(CGT.ConvertType(RetTy), 8, RetTy, 8); if (Lo == NoClass) // Return HighPart at offset 8 in memory. return ABIArgInfo::getDirect(HighPart, 8); } break; } // If a high part was specified, merge it together with the low part. It is // known to pass in the high eightbyte of the result. We do this by forming a // first class struct aggregate with the high and low part: {low, high} if (HighPart) ResType = GetX86_64ByValArgumentPair(ResType, HighPart, getDataLayout()); return ABIArgInfo::getDirect(ResType); } ABIArgInfo X86_64ABIInfo::classifyArgumentType( QualType Ty, unsigned freeIntRegs, unsigned &neededInt, unsigned &neededSSE, bool isNamedArg) const { X86_64ABIInfo::Class Lo, Hi; classify(Ty, 0, Lo, Hi, isNamedArg); // Check some invariants. // FIXME: Enforce these by construction. assert((Hi != Memory || Lo == Memory) && "Invalid memory classification."); assert((Hi != SSEUp || Lo == SSE) && "Invalid SSEUp classification."); neededInt = 0; neededSSE = 0; llvm::Type *ResType = 0; switch (Lo) { case NoClass: if (Hi == NoClass) return ABIArgInfo::getIgnore(); // If the low part is just padding, it takes no register, leave ResType // null. assert((Hi == SSE || Hi == Integer || Hi == X87Up) && "Unknown missing lo part"); break; // AMD64-ABI 3.2.3p3: Rule 1. If the class is MEMORY, pass the argument // on the stack. case Memory: // AMD64-ABI 3.2.3p3: Rule 5. If the class is X87, X87UP or // COMPLEX_X87, it is passed in memory. case X87: case ComplexX87: if (getRecordArgABI(Ty, getCXXABI()) == CGCXXABI::RAA_Indirect) ++neededInt; return getIndirectResult(Ty, freeIntRegs); case SSEUp: case X87Up: llvm_unreachable("Invalid classification for lo word."); // AMD64-ABI 3.2.3p3: Rule 2. If the class is INTEGER, the next // available register of the sequence %rdi, %rsi, %rdx, %rcx, %r8 // and %r9 is used. case Integer: ++neededInt; // Pick an 8-byte type based on the preferred type. ResType = GetINTEGERTypeAtOffset(CGT.ConvertType(Ty), 0, Ty, 0); // If we have a sign or zero extended integer, make sure to return Extend // so that the parameter gets the right LLVM IR attributes. if (Hi == NoClass && isa<llvm::IntegerType>(ResType)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); if (Ty->isIntegralOrEnumerationType() && Ty->isPromotableIntegerType()) return ABIArgInfo::getExtend(); } break; // AMD64-ABI 3.2.3p3: Rule 3. If the class is SSE, the next // available SSE register is used, the registers are taken in the // order from %xmm0 to %xmm7. case SSE: { llvm::Type *IRType = CGT.ConvertType(Ty); ResType = GetSSETypeAtOffset(IRType, 0, Ty, 0); ++neededSSE; break; } } llvm::Type *HighPart = 0; switch (Hi) { // Memory was handled previously, ComplexX87 and X87 should // never occur as hi classes, and X87Up must be preceded by X87, // which is passed in memory. case Memory: case X87: case ComplexX87: llvm_unreachable("Invalid classification for hi word."); case NoClass: break; case Integer: ++neededInt; // Pick an 8-byte type based on the preferred type. HighPart = GetINTEGERTypeAtOffset(CGT.ConvertType(Ty), 8, Ty, 8); if (Lo == NoClass) // Pass HighPart at offset 8 in memory. return ABIArgInfo::getDirect(HighPart, 8); break; // X87Up generally doesn't occur here (long double is passed in // memory), except in situations involving unions. case X87Up: case SSE: HighPart = GetSSETypeAtOffset(CGT.ConvertType(Ty), 8, Ty, 8); if (Lo == NoClass) // Pass HighPart at offset 8 in memory. return ABIArgInfo::getDirect(HighPart, 8); ++neededSSE; break; // AMD64-ABI 3.2.3p3: Rule 4. If the class is SSEUP, the // eightbyte is passed in the upper half of the last used SSE // register. This only happens when 128-bit vectors are passed. case SSEUp: assert(Lo == SSE && "Unexpected SSEUp classification"); ResType = GetByteVectorType(Ty); break; } // If a high part was specified, merge it together with the low part. It is // known to pass in the high eightbyte of the result. We do this by forming a // first class struct aggregate with the high and low part: {low, high} if (HighPart) ResType = GetX86_64ByValArgumentPair(ResType, HighPart, getDataLayout()); return ABIArgInfo::getDirect(ResType); } void X86_64ABIInfo::computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); // Keep track of the number of assigned registers. unsigned freeIntRegs = 6, freeSSERegs = 8; // If the return value is indirect, then the hidden argument is consuming one // integer register. if (FI.getReturnInfo().isIndirect()) --freeIntRegs; bool isVariadic = FI.isVariadic(); unsigned numRequiredArgs = 0; if (isVariadic) numRequiredArgs = FI.getRequiredArgs().getNumRequiredArgs(); // AMD64-ABI 3.2.3p3: Once arguments are classified, the registers // get assigned (in left-to-right order) for passing as follows... for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) { bool isNamedArg = true; if (isVariadic) isNamedArg = (it - FI.arg_begin()) < static_cast<signed>(numRequiredArgs); unsigned neededInt, neededSSE; it->info = classifyArgumentType(it->type, freeIntRegs, neededInt, neededSSE, isNamedArg); // AMD64-ABI 3.2.3p3: If there are no registers available for any // eightbyte of an argument, the whole argument is passed on the // stack. If registers have already been assigned for some // eightbytes of such an argument, the assignments get reverted. if (freeIntRegs >= neededInt && freeSSERegs >= neededSSE) { freeIntRegs -= neededInt; freeSSERegs -= neededSSE; } else { it->info = getIndirectResult(it->type, freeIntRegs); } } } static llvm::Value *EmitVAArgFromMemory(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) { llvm::Value *overflow_arg_area_p = CGF.Builder.CreateStructGEP(VAListAddr, 2, "overflow_arg_area_p"); llvm::Value *overflow_arg_area = CGF.Builder.CreateLoad(overflow_arg_area_p, "overflow_arg_area"); // AMD64-ABI 3.5.7p5: Step 7. Align l->overflow_arg_area upwards to a 16 // byte boundary if alignment needed by type exceeds 8 byte boundary. // It isn't stated explicitly in the standard, but in practice we use // alignment greater than 16 where necessary. uint64_t Align = CGF.getContext().getTypeAlign(Ty) / 8; if (Align > 8) { // overflow_arg_area = (overflow_arg_area + align - 1) & -align; llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int64Ty, Align - 1); overflow_arg_area = CGF.Builder.CreateGEP(overflow_arg_area, Offset); llvm::Value *AsInt = CGF.Builder.CreatePtrToInt(overflow_arg_area, CGF.Int64Ty); llvm::Value *Mask = llvm::ConstantInt::get(CGF.Int64Ty, -(uint64_t)Align); overflow_arg_area = CGF.Builder.CreateIntToPtr(CGF.Builder.CreateAnd(AsInt, Mask), overflow_arg_area->getType(), "overflow_arg_area.align"); } // AMD64-ABI 3.5.7p5: Step 8. Fetch type from l->overflow_arg_area. llvm::Type *LTy = CGF.ConvertTypeForMem(Ty); llvm::Value *Res = CGF.Builder.CreateBitCast(overflow_arg_area, llvm::PointerType::getUnqual(LTy)); // AMD64-ABI 3.5.7p5: Step 9. Set l->overflow_arg_area to: // l->overflow_arg_area + sizeof(type). // AMD64-ABI 3.5.7p5: Step 10. Align l->overflow_arg_area upwards to // an 8 byte boundary. uint64_t SizeInBytes = (CGF.getContext().getTypeSize(Ty) + 7) / 8; llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int32Ty, (SizeInBytes + 7) & ~7); overflow_arg_area = CGF.Builder.CreateGEP(overflow_arg_area, Offset, "overflow_arg_area.next"); CGF.Builder.CreateStore(overflow_arg_area, overflow_arg_area_p); // AMD64-ABI 3.5.7p5: Step 11. Return the fetched type. return Res; } llvm::Value *X86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { // Assume that va_list type is correct; should be pointer to LLVM type: // struct { // i32 gp_offset; // i32 fp_offset; // i8* overflow_arg_area; // i8* reg_save_area; // }; unsigned neededInt, neededSSE; Ty = CGF.getContext().getCanonicalType(Ty); ABIArgInfo AI = classifyArgumentType(Ty, 0, neededInt, neededSSE, /*isNamedArg*/false); // AMD64-ABI 3.5.7p5: Step 1. Determine whether type may be passed // in the registers. If not go to step 7. if (!neededInt && !neededSSE) return EmitVAArgFromMemory(VAListAddr, Ty, CGF); // AMD64-ABI 3.5.7p5: Step 2. Compute num_gp to hold the number of // general purpose registers needed to pass type and num_fp to hold // the number of floating point registers needed. // AMD64-ABI 3.5.7p5: Step 3. Verify whether arguments fit into // registers. In the case: l->gp_offset > 48 - num_gp * 8 or // l->fp_offset > 304 - num_fp * 16 go to step 7. // // NOTE: 304 is a typo, there are (6 * 8 + 8 * 16) = 176 bytes of // register save space). llvm::Value *InRegs = 0; llvm::Value *gp_offset_p = 0, *gp_offset = 0; llvm::Value *fp_offset_p = 0, *fp_offset = 0; if (neededInt) { gp_offset_p = CGF.Builder.CreateStructGEP(VAListAddr, 0, "gp_offset_p"); gp_offset = CGF.Builder.CreateLoad(gp_offset_p, "gp_offset"); InRegs = llvm::ConstantInt::get(CGF.Int32Ty, 48 - neededInt * 8); InRegs = CGF.Builder.CreateICmpULE(gp_offset, InRegs, "fits_in_gp"); } if (neededSSE) { fp_offset_p = CGF.Builder.CreateStructGEP(VAListAddr, 1, "fp_offset_p"); fp_offset = CGF.Builder.CreateLoad(fp_offset_p, "fp_offset"); llvm::Value *FitsInFP = llvm::ConstantInt::get(CGF.Int32Ty, 176 - neededSSE * 16); FitsInFP = CGF.Builder.CreateICmpULE(fp_offset, FitsInFP, "fits_in_fp"); InRegs = InRegs ? CGF.Builder.CreateAnd(InRegs, FitsInFP) : FitsInFP; } llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg"); llvm::BasicBlock *InMemBlock = CGF.createBasicBlock("vaarg.in_mem"); llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end"); CGF.Builder.CreateCondBr(InRegs, InRegBlock, InMemBlock); // Emit code to load the value if it was passed in registers. CGF.EmitBlock(InRegBlock); // AMD64-ABI 3.5.7p5: Step 4. Fetch type from l->reg_save_area with // an offset of l->gp_offset and/or l->fp_offset. This may require // copying to a temporary location in case the parameter is passed // in different register classes or requires an alignment greater // than 8 for general purpose registers and 16 for XMM registers. // // FIXME: This really results in shameful code when we end up needing to // collect arguments from different places; often what should result in a // simple assembling of a structure from scattered addresses has many more // loads than necessary. Can we clean this up? llvm::Type *LTy = CGF.ConvertTypeForMem(Ty); llvm::Value *RegAddr = CGF.Builder.CreateLoad(CGF.Builder.CreateStructGEP(VAListAddr, 3), "reg_save_area"); if (neededInt && neededSSE) { // FIXME: Cleanup. assert(AI.isDirect() && "Unexpected ABI info for mixed regs"); llvm::StructType *ST = cast<llvm::StructType>(AI.getCoerceToType()); llvm::Value *Tmp = CGF.CreateMemTemp(Ty); Tmp = CGF.Builder.CreateBitCast(Tmp, ST->getPointerTo()); assert(ST->getNumElements() == 2 && "Unexpected ABI info for mixed regs"); llvm::Type *TyLo = ST->getElementType(0); llvm::Type *TyHi = ST->getElementType(1); assert((TyLo->isFPOrFPVectorTy() ^ TyHi->isFPOrFPVectorTy()) && "Unexpected ABI info for mixed regs"); llvm::Type *PTyLo = llvm::PointerType::getUnqual(TyLo); llvm::Type *PTyHi = llvm::PointerType::getUnqual(TyHi); llvm::Value *GPAddr = CGF.Builder.CreateGEP(RegAddr, gp_offset); llvm::Value *FPAddr = CGF.Builder.CreateGEP(RegAddr, fp_offset); llvm::Value *RegLoAddr = TyLo->isFloatingPointTy() ? FPAddr : GPAddr; llvm::Value *RegHiAddr = TyLo->isFloatingPointTy() ? GPAddr : FPAddr; llvm::Value *V = CGF.Builder.CreateLoad(CGF.Builder.CreateBitCast(RegLoAddr, PTyLo)); CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 0)); V = CGF.Builder.CreateLoad(CGF.Builder.CreateBitCast(RegHiAddr, PTyHi)); CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = CGF.Builder.CreateBitCast(Tmp, llvm::PointerType::getUnqual(LTy)); } else if (neededInt) { RegAddr = CGF.Builder.CreateGEP(RegAddr, gp_offset); RegAddr = CGF.Builder.CreateBitCast(RegAddr, llvm::PointerType::getUnqual(LTy)); // Copy to a temporary if necessary to ensure the appropriate alignment. std::pair<CharUnits, CharUnits> SizeAlign = CGF.getContext().getTypeInfoInChars(Ty); uint64_t TySize = SizeAlign.first.getQuantity(); unsigned TyAlign = SizeAlign.second.getQuantity(); if (TyAlign > 8) { llvm::Value *Tmp = CGF.CreateMemTemp(Ty); CGF.Builder.CreateMemCpy(Tmp, RegAddr, TySize, 8, false); RegAddr = Tmp; } } else if (neededSSE == 1) { RegAddr = CGF.Builder.CreateGEP(RegAddr, fp_offset); RegAddr = CGF.Builder.CreateBitCast(RegAddr, llvm::PointerType::getUnqual(LTy)); } else { assert(neededSSE == 2 && "Invalid number of needed registers!"); // SSE registers are spaced 16 bytes apart in the register save // area, we need to collect the two eightbytes together. llvm::Value *RegAddrLo = CGF.Builder.CreateGEP(RegAddr, fp_offset); llvm::Value *RegAddrHi = CGF.Builder.CreateConstGEP1_32(RegAddrLo, 16); llvm::Type *DoubleTy = CGF.DoubleTy; llvm::Type *DblPtrTy = llvm::PointerType::getUnqual(DoubleTy); llvm::StructType *ST = llvm::StructType::get(DoubleTy, DoubleTy, NULL); llvm::Value *V, *Tmp = CGF.CreateMemTemp(Ty); Tmp = CGF.Builder.CreateBitCast(Tmp, ST->getPointerTo()); V = CGF.Builder.CreateLoad(CGF.Builder.CreateBitCast(RegAddrLo, DblPtrTy)); CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 0)); V = CGF.Builder.CreateLoad(CGF.Builder.CreateBitCast(RegAddrHi, DblPtrTy)); CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = CGF.Builder.CreateBitCast(Tmp, llvm::PointerType::getUnqual(LTy)); } // AMD64-ABI 3.5.7p5: Step 5. Set: // l->gp_offset = l->gp_offset + num_gp * 8 // l->fp_offset = l->fp_offset + num_fp * 16. if (neededInt) { llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int32Ty, neededInt * 8); CGF.Builder.CreateStore(CGF.Builder.CreateAdd(gp_offset, Offset), gp_offset_p); } if (neededSSE) { llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int32Ty, neededSSE * 16); CGF.Builder.CreateStore(CGF.Builder.CreateAdd(fp_offset, Offset), fp_offset_p); } CGF.EmitBranch(ContBlock); // Emit code to load the value if it was passed in memory. CGF.EmitBlock(InMemBlock); llvm::Value *MemAddr = EmitVAArgFromMemory(VAListAddr, Ty, CGF); // Return the appropriate result. CGF.EmitBlock(ContBlock); llvm::PHINode *ResAddr = CGF.Builder.CreatePHI(RegAddr->getType(), 2, "vaarg.addr"); ResAddr->addIncoming(RegAddr, InRegBlock); ResAddr->addIncoming(MemAddr, InMemBlock); return ResAddr; } ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty, bool IsReturnType) const { if (Ty->isVoidType()) return ABIArgInfo::getIgnore(); if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); uint64_t Size = getContext().getTypeSize(Ty); if (const RecordType *RT = Ty->getAs<RecordType>()) { if (IsReturnType) { if (isRecordReturnIndirect(RT, getCXXABI())) return ABIArgInfo::getIndirect(0, false); } else { if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(RT, getCXXABI())) return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); } if (RT->getDecl()->hasFlexibleArrayMember()) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); // FIXME: mingw-w64-gcc emits 128-bit struct as i128 if (Size == 128 && getTarget().getTriple().getOS() == llvm::Triple::MinGW32) return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), Size)); // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is // not 1, 2, 4, or 8 bytes, must be passed by reference." if (Size <= 64 && (Size & (Size - 1)) == 0) return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), Size)); return ABIArgInfo::getIndirect(0, /*ByVal=*/false); } if (Ty->isPromotableIntegerType()) return ABIArgInfo::getExtend(); return ABIArgInfo::getDirect(); } void WinX86_64ABIInfo::computeInfo(CGFunctionInfo &FI) const { QualType RetTy = FI.getReturnType(); FI.getReturnInfo() = classify(RetTy, true); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classify(it->type, false); } llvm::Value *WinX86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { llvm::Type *BPP = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); llvm::Value *AddrTyped = Builder.CreateBitCast(Addr, PTy); uint64_t Offset = llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, 8); llvm::Value *NextAddr = Builder.CreateGEP(Addr, llvm::ConstantInt::get(CGF.Int32Ty, Offset), "ap.next"); Builder.CreateStore(NextAddr, VAListAddrAsBPP); return AddrTyped; } namespace { class NaClX86_64ABIInfo : public ABIInfo { public: NaClX86_64ABIInfo(CodeGen::CodeGenTypes &CGT, bool HasAVX) : ABIInfo(CGT), PInfo(CGT), NInfo(CGT, HasAVX) {} virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; private: PNaClABIInfo PInfo; // Used for generating calls with pnaclcall callingconv. X86_64ABIInfo NInfo; // Used for everything else. }; class NaClX86_64TargetCodeGenInfo : public TargetCodeGenInfo { public: NaClX86_64TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, bool HasAVX) : TargetCodeGenInfo(new NaClX86_64ABIInfo(CGT, HasAVX)) {} }; } void NaClX86_64ABIInfo::computeInfo(CGFunctionInfo &FI) const { if (FI.getASTCallingConvention() == CC_PnaclCall) PInfo.computeInfo(FI); else NInfo.computeInfo(FI); } llvm::Value *NaClX86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { // Always use the native convention; calling pnacl-style varargs functions // is unuspported. return NInfo.EmitVAArg(VAListAddr, Ty, CGF); } // PowerPC-32 namespace { class PPC32TargetCodeGenInfo : public DefaultTargetCodeGenInfo { public: PPC32TargetCodeGenInfo(CodeGenTypes &CGT) : DefaultTargetCodeGenInfo(CGT) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const { // This is recovered from gcc output. return 1; // r1 is the dedicated stack pointer } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const; }; } bool PPC32TargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { // This is calculated from the LLVM and GCC tables and verified // against gcc output. AFAIK all ABIs use the same encoding. CodeGen::CGBuilderTy &Builder = CGF.Builder; llvm::IntegerType *i8 = CGF.Int8Ty; llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4); llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8); llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16); // 0-31: r0-31, the 4-byte general-purpose registers AssignToArrayRange(Builder, Address, Four8, 0, 31); // 32-63: fp0-31, the 8-byte floating-point registers AssignToArrayRange(Builder, Address, Eight8, 32, 63); // 64-76 are various 4-byte special-purpose registers: // 64: mq // 65: lr // 66: ctr // 67: ap // 68-75 cr0-7 // 76: xer AssignToArrayRange(Builder, Address, Four8, 64, 76); // 77-108: v0-31, the 16-byte vector registers AssignToArrayRange(Builder, Address, Sixteen8, 77, 108); // 109: vrsave // 110: vscr // 111: spe_acc // 112: spefscr // 113: sfp AssignToArrayRange(Builder, Address, Four8, 109, 113); return false; } // PowerPC-64 namespace { /// PPC64_SVR4_ABIInfo - The 64-bit PowerPC ELF (SVR4) ABI information. class PPC64_SVR4_ABIInfo : public DefaultABIInfo { public: PPC64_SVR4_ABIInfo(CodeGen::CodeGenTypes &CGT) : DefaultABIInfo(CGT) {} bool isPromotableTypeForABI(QualType Ty) const; ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType Ty) const; // TODO: We can add more logic to computeInfo to improve performance. // Example: For aggregate arguments that fit in a register, we could // use getDirectInReg (as is done below for structs containing a single // floating-point value) to avoid pushing them to memory on function // entry. This would require changing the logic in PPCISelLowering // when lowering the parameters in the caller and args in the callee. virtual void computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) { // We rely on the default argument classification for the most part. // One exception: An aggregate containing a single floating-point // or vector item must be passed in a register if one is available. const Type *T = isSingleElementStruct(it->type, getContext()); if (T) { const BuiltinType *BT = T->getAs<BuiltinType>(); if (T->isVectorType() || (BT && BT->isFloatingPoint())) { QualType QT(T, 0); it->info = ABIArgInfo::getDirectInReg(CGT.ConvertType(QT)); continue; } } it->info = classifyArgumentType(it->type); } } virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class PPC64_SVR4_TargetCodeGenInfo : public TargetCodeGenInfo { public: PPC64_SVR4_TargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new PPC64_SVR4_ABIInfo(CGT)) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const { // This is recovered from gcc output. return 1; // r1 is the dedicated stack pointer } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const; }; class PPC64TargetCodeGenInfo : public DefaultTargetCodeGenInfo { public: PPC64TargetCodeGenInfo(CodeGenTypes &CGT) : DefaultTargetCodeGenInfo(CGT) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const { // This is recovered from gcc output. return 1; // r1 is the dedicated stack pointer } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const; }; } // Return true if the ABI requires Ty to be passed sign- or zero- // extended to 64 bits. bool PPC64_SVR4_ABIInfo::isPromotableTypeForABI(QualType Ty) const { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); // Promotable integer types are required to be promoted by the ABI. if (Ty->isPromotableIntegerType()) return true; // In addition to the usual promotable integer types, we also need to // extend all 32-bit types, since the ABI requires promotion to 64 bits. if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) switch (BT->getKind()) { case BuiltinType::Int: case BuiltinType::UInt: return true; default: break; } return false; } ABIArgInfo PPC64_SVR4_ABIInfo::classifyArgumentType(QualType Ty) const { if (Ty->isAnyComplexType()) return ABIArgInfo::getDirect(); if (isAggregateTypeForABI(Ty)) { if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); return ABIArgInfo::getIndirect(0); } return (isPromotableTypeForABI(Ty) ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } ABIArgInfo PPC64_SVR4_ABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); if (RetTy->isAnyComplexType()) return ABIArgInfo::getDirect(); if (isAggregateTypeForABI(RetTy)) return ABIArgInfo::getIndirect(0); return (isPromotableTypeForABI(RetTy) ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } // Based on ARMABIInfo::EmitVAArg, adjusted for 64-bit machine. llvm::Value *PPC64_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { llvm::Type *BP = CGF.Int8PtrTy; llvm::Type *BPP = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); // Update the va_list pointer. The pointer should be bumped by the // size of the object. We can trust getTypeSize() except for a complex // type whose base type is smaller than a doubleword. For these, the // size of the object is 16 bytes; see below for further explanation. unsigned SizeInBytes = CGF.getContext().getTypeSize(Ty) / 8; QualType BaseTy; unsigned CplxBaseSize = 0; if (const ComplexType *CTy = Ty->getAs<ComplexType>()) { BaseTy = CTy->getElementType(); CplxBaseSize = CGF.getContext().getTypeSize(BaseTy) / 8; if (CplxBaseSize < 8) SizeInBytes = 16; } unsigned Offset = llvm::RoundUpToAlignment(SizeInBytes, 8); llvm::Value *NextAddr = Builder.CreateGEP(Addr, llvm::ConstantInt::get(CGF.Int64Ty, Offset), "ap.next"); Builder.CreateStore(NextAddr, VAListAddrAsBPP); // If we have a complex type and the base type is smaller than 8 bytes, // the ABI calls for the real and imaginary parts to be right-adjusted // in separate doublewords. However, Clang expects us to produce a // pointer to a structure with the two parts packed tightly. So generate // loads of the real and imaginary parts relative to the va_list pointer, // and store them to a temporary structure. if (CplxBaseSize && CplxBaseSize < 8) { llvm::Value *RealAddr = Builder.CreatePtrToInt(Addr, CGF.Int64Ty); llvm::Value *ImagAddr = RealAddr; RealAddr = Builder.CreateAdd(RealAddr, Builder.getInt64(8 - CplxBaseSize)); ImagAddr = Builder.CreateAdd(ImagAddr, Builder.getInt64(16 - CplxBaseSize)); llvm::Type *PBaseTy = llvm::PointerType::getUnqual(CGF.ConvertType(BaseTy)); RealAddr = Builder.CreateIntToPtr(RealAddr, PBaseTy); ImagAddr = Builder.CreateIntToPtr(ImagAddr, PBaseTy); llvm::Value *Real = Builder.CreateLoad(RealAddr, false, ".vareal"); llvm::Value *Imag = Builder.CreateLoad(ImagAddr, false, ".vaimag"); llvm::Value *Ptr = CGF.CreateTempAlloca(CGT.ConvertTypeForMem(Ty), "vacplx"); llvm::Value *RealPtr = Builder.CreateStructGEP(Ptr, 0, ".real"); llvm::Value *ImagPtr = Builder.CreateStructGEP(Ptr, 1, ".imag"); Builder.CreateStore(Real, RealPtr, false); Builder.CreateStore(Imag, ImagPtr, false); return Ptr; } // If the argument is smaller than 8 bytes, it is right-adjusted in // its doubleword slot. Adjust the pointer to pick it up from the // correct offset. if (SizeInBytes < 8) { llvm::Value *AddrAsInt = Builder.CreatePtrToInt(Addr, CGF.Int64Ty); AddrAsInt = Builder.CreateAdd(AddrAsInt, Builder.getInt64(8 - SizeInBytes)); Addr = Builder.CreateIntToPtr(AddrAsInt, BP); } llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); return Builder.CreateBitCast(Addr, PTy); } static bool PPC64_initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) { // This is calculated from the LLVM and GCC tables and verified // against gcc output. AFAIK all ABIs use the same encoding. CodeGen::CGBuilderTy &Builder = CGF.Builder; llvm::IntegerType *i8 = CGF.Int8Ty; llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4); llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8); llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16); // 0-31: r0-31, the 8-byte general-purpose registers AssignToArrayRange(Builder, Address, Eight8, 0, 31); // 32-63: fp0-31, the 8-byte floating-point registers AssignToArrayRange(Builder, Address, Eight8, 32, 63); // 64-76 are various 4-byte special-purpose registers: // 64: mq // 65: lr // 66: ctr // 67: ap // 68-75 cr0-7 // 76: xer AssignToArrayRange(Builder, Address, Four8, 64, 76); // 77-108: v0-31, the 16-byte vector registers AssignToArrayRange(Builder, Address, Sixteen8, 77, 108); // 109: vrsave // 110: vscr // 111: spe_acc // 112: spefscr // 113: sfp AssignToArrayRange(Builder, Address, Four8, 109, 113); return false; } bool PPC64_SVR4_TargetCodeGenInfo::initDwarfEHRegSizeTable( CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { return PPC64_initDwarfEHRegSizeTable(CGF, Address); } bool PPC64TargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { return PPC64_initDwarfEHRegSizeTable(CGF, Address); } //===----------------------------------------------------------------------===// // ARM ABI Implementation //===----------------------------------------------------------------------===// namespace { class ARMABIInfo : public ABIInfo { public: enum ABIKind { APCS = 0, AAPCS = 1, AAPCS_VFP }; private: ABIKind Kind; public: ARMABIInfo(CodeGenTypes &CGT, ABIKind _Kind) : ABIInfo(CGT), Kind(_Kind) { setRuntimeCC(); } bool isEABI() const { StringRef Env = getTarget().getTriple().getEnvironmentName(); return (Env == "gnueabi" || Env == "eabi" || Env == "android" || Env == "androideabi"); } ABIKind getABIKind() const { return Kind; } private: ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType RetTy, int *VFPRegs, unsigned &AllocatedVFP, bool &IsHA) const; bool isIllegalVectorType(QualType Ty) const; virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; llvm::CallingConv::ID getLLVMDefaultCC() const; llvm::CallingConv::ID getABIDefaultCC() const; void setRuntimeCC(); }; class ARMTargetCodeGenInfo : public TargetCodeGenInfo { public: ARMTargetCodeGenInfo(CodeGenTypes &CGT, ARMABIInfo::ABIKind K) :TargetCodeGenInfo(new ARMABIInfo(CGT, K)) {} const ARMABIInfo &getABIInfo() const { return static_cast<const ARMABIInfo&>(TargetCodeGenInfo::getABIInfo()); } int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const { return 13; } StringRef getARCRetainAutoreleasedReturnValueMarker() const { return "mov\tr7, r7\t\t@ marker for objc_retainAutoreleaseReturnValue"; } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { llvm::Value *Four8 = llvm::ConstantInt::get(CGF.Int8Ty, 4); // 0-15 are the 16 integer registers. AssignToArrayRange(CGF.Builder, Address, Four8, 0, 15); return false; } unsigned getSizeOfUnwindException() const { if (getABIInfo().isEABI()) return 88; return TargetCodeGenInfo::getSizeOfUnwindException(); } void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) return; const ARMInterruptAttr *Attr = FD->getAttr<ARMInterruptAttr>(); if (!Attr) return; const char *Kind; switch (Attr->getInterrupt()) { case ARMInterruptAttr::Generic: Kind = ""; break; case ARMInterruptAttr::IRQ: Kind = "IRQ"; break; case ARMInterruptAttr::FIQ: Kind = "FIQ"; break; case ARMInterruptAttr::SWI: Kind = "SWI"; break; case ARMInterruptAttr::ABORT: Kind = "ABORT"; break; case ARMInterruptAttr::UNDEF: Kind = "UNDEF"; break; } llvm::Function *Fn = cast<llvm::Function>(GV); Fn->addFnAttr("interrupt", Kind); if (cast<ARMABIInfo>(getABIInfo()).getABIKind() == ARMABIInfo::APCS) return; // AAPCS guarantees that sp will be 8-byte aligned on any public interface, // however this is not necessarily true on taking any interrupt. Instruct // the backend to perform a realignment as part of the function prologue. llvm::AttrBuilder B; B.addStackAlignmentAttr(8); Fn->addAttributes(llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::get(CGM.getLLVMContext(), llvm::AttributeSet::FunctionIndex, B)); } }; } void ARMABIInfo::computeInfo(CGFunctionInfo &FI) const { // To correctly handle Homogeneous Aggregate, we need to keep track of the // VFP registers allocated so far. // C.1.vfp If the argument is a VFP CPRC and there are sufficient consecutive // VFP registers of the appropriate type unallocated then the argument is // allocated to the lowest-numbered sequence of such registers. // C.2.vfp If the argument is a VFP CPRC then any VFP registers that are // unallocated are marked as unavailable. unsigned AllocatedVFP = 0; int VFPRegs[16] = { 0 }; FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) { unsigned PreAllocation = AllocatedVFP; bool IsHA = false; // 6.1.2.3 There is one VFP co-processor register class using registers // s0-s15 (d0-d7) for passing arguments. const unsigned NumVFPs = 16; it->info = classifyArgumentType(it->type, VFPRegs, AllocatedVFP, IsHA); // If we do not have enough VFP registers for the HA, any VFP registers // that are unallocated are marked as unavailable. To achieve this, we add // padding of (NumVFPs - PreAllocation) floats. if (IsHA && AllocatedVFP > NumVFPs && PreAllocation < NumVFPs) { llvm::Type *PaddingTy = llvm::ArrayType::get( llvm::Type::getFloatTy(getVMContext()), NumVFPs - PreAllocation); it->info = ABIArgInfo::getExpandWithPadding(false, PaddingTy); } } // Always honor user-specified calling convention. if (FI.getCallingConvention() != llvm::CallingConv::C) return; llvm::CallingConv::ID cc = getRuntimeCC(); if (cc != llvm::CallingConv::C) FI.setEffectiveCallingConvention(cc); } /// Return the default calling convention that LLVM will use. llvm::CallingConv::ID ARMABIInfo::getLLVMDefaultCC() const { // The default calling convention that LLVM will infer. if (getTarget().getTriple().getEnvironmentName()=="gnueabihf") return llvm::CallingConv::ARM_AAPCS_VFP; else if (isEABI()) return llvm::CallingConv::ARM_AAPCS; else return llvm::CallingConv::ARM_APCS; } /// Return the calling convention that our ABI would like us to use /// as the C calling convention. llvm::CallingConv::ID ARMABIInfo::getABIDefaultCC() const { switch (getABIKind()) { case APCS: return llvm::CallingConv::ARM_APCS; case AAPCS: return llvm::CallingConv::ARM_AAPCS; case AAPCS_VFP: return llvm::CallingConv::ARM_AAPCS_VFP; } llvm_unreachable("bad ABI kind"); } void ARMABIInfo::setRuntimeCC() { assert(getRuntimeCC() == llvm::CallingConv::C); // Don't muddy up the IR with a ton of explicit annotations if // they'd just match what LLVM will infer from the triple. llvm::CallingConv::ID abiCC = getABIDefaultCC(); if (abiCC != getLLVMDefaultCC()) RuntimeCC = abiCC; } /// isHomogeneousAggregate - Return true if a type is an AAPCS-VFP homogeneous /// aggregate. If HAMembers is non-null, the number of base elements /// contained in the type is returned through it; this is used for the /// recursive calls that check aggregate component types. static bool isHomogeneousAggregate(QualType Ty, const Type *&Base, ASTContext &Context, uint64_t *HAMembers = 0) { uint64_t Members = 0; if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty)) { if (!isHomogeneousAggregate(AT->getElementType(), Base, Context, &Members)) return false; Members *= AT->getSize().getZExtValue(); } else if (const RecordType *RT = Ty->getAs<RecordType>()) { const RecordDecl *RD = RT->getDecl(); if (RD->hasFlexibleArrayMember()) return false; Members = 0; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i) { const FieldDecl *FD = *i; uint64_t FldMembers; if (!isHomogeneousAggregate(FD->getType(), Base, Context, &FldMembers)) return false; Members = (RD->isUnion() ? std::max(Members, FldMembers) : Members + FldMembers); } } else { Members = 1; if (const ComplexType *CT = Ty->getAs<ComplexType>()) { Members = 2; Ty = CT->getElementType(); } // Homogeneous aggregates for AAPCS-VFP must have base types of float, // double, or 64-bit or 128-bit vectors. if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) { if (BT->getKind() != BuiltinType::Float && BT->getKind() != BuiltinType::Double && BT->getKind() != BuiltinType::LongDouble) return false; } else if (const VectorType *VT = Ty->getAs<VectorType>()) { unsigned VecSize = Context.getTypeSize(VT); if (VecSize != 64 && VecSize != 128) return false; } else { return false; } // The base type must be the same for all members. Vector types of the // same total size are treated as being equivalent here. const Type *TyPtr = Ty.getTypePtr(); if (!Base) Base = TyPtr; if (Base != TyPtr && (!Base->isVectorType() || !TyPtr->isVectorType() || Context.getTypeSize(Base) != Context.getTypeSize(TyPtr))) return false; } // Homogeneous Aggregates can have at most 4 members of the base type. if (HAMembers) *HAMembers = Members; return (Members > 0 && Members <= 4); } /// markAllocatedVFPs - update VFPRegs according to the alignment and /// number of VFP registers (unit is S register) requested. static void markAllocatedVFPs(int *VFPRegs, unsigned &AllocatedVFP, unsigned Alignment, unsigned NumRequired) { // Early Exit. if (AllocatedVFP >= 16) return; // C.1.vfp If the argument is a VFP CPRC and there are sufficient consecutive // VFP registers of the appropriate type unallocated then the argument is // allocated to the lowest-numbered sequence of such registers. for (unsigned I = 0; I < 16; I += Alignment) { bool FoundSlot = true; for (unsigned J = I, JEnd = I + NumRequired; J < JEnd; J++) if (J >= 16 || VFPRegs[J]) { FoundSlot = false; break; } if (FoundSlot) { for (unsigned J = I, JEnd = I + NumRequired; J < JEnd; J++) VFPRegs[J] = 1; AllocatedVFP += NumRequired; return; } } // C.2.vfp If the argument is a VFP CPRC then any VFP registers that are // unallocated are marked as unavailable. for (unsigned I = 0; I < 16; I++) VFPRegs[I] = 1; AllocatedVFP = 17; // We do not have enough VFP registers. } ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty, int *VFPRegs, unsigned &AllocatedVFP, bool &IsHA) const { // We update number of allocated VFPs according to // 6.1.2.1 The following argument types are VFP CPRCs: // A single-precision floating-point type (including promoted // half-precision types); A double-precision floating-point type; // A 64-bit or 128-bit containerized vector type; Homogeneous Aggregate // with a Base Type of a single- or double-precision floating-point type, // 64-bit containerized vectors or 128-bit containerized vectors with one // to four Elements. // Handle illegal vector types here. if (isIllegalVectorType(Ty)) { uint64_t Size = getContext().getTypeSize(Ty); if (Size <= 32) { llvm::Type *ResType = llvm::Type::getInt32Ty(getVMContext()); return ABIArgInfo::getDirect(ResType); } if (Size == 64) { llvm::Type *ResType = llvm::VectorType::get( llvm::Type::getInt32Ty(getVMContext()), 2); markAllocatedVFPs(VFPRegs, AllocatedVFP, 2, 2); return ABIArgInfo::getDirect(ResType); } if (Size == 128) { llvm::Type *ResType = llvm::VectorType::get( llvm::Type::getInt32Ty(getVMContext()), 4); markAllocatedVFPs(VFPRegs, AllocatedVFP, 4, 4); return ABIArgInfo::getDirect(ResType); } return ABIArgInfo::getIndirect(0, /*ByVal=*/false); } // Update VFPRegs for legal vector types. if (const VectorType *VT = Ty->getAs<VectorType>()) { uint64_t Size = getContext().getTypeSize(VT); // Size of a legal vector should be power of 2 and above 64. markAllocatedVFPs(VFPRegs, AllocatedVFP, Size >= 128 ? 4 : 2, Size / 32); } // Update VFPRegs for floating point types. if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) { if (BT->getKind() == BuiltinType::Half || BT->getKind() == BuiltinType::Float) markAllocatedVFPs(VFPRegs, AllocatedVFP, 1, 1); if (BT->getKind() == BuiltinType::Double || BT->getKind() == BuiltinType::LongDouble) markAllocatedVFPs(VFPRegs, AllocatedVFP, 2, 2); } if (!isAggregateTypeForABI(Ty)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); // Ignore empty records. if (isEmptyRecord(getContext(), Ty, true)) return ABIArgInfo::getIgnore(); if (getABIKind() == ARMABIInfo::AAPCS_VFP) { // Homogeneous Aggregates need to be expanded when we can fit the aggregate // into VFP registers. const Type *Base = 0; uint64_t Members = 0; if (isHomogeneousAggregate(Ty, Base, getContext(), &Members)) { assert(Base && "Base class should be set for homogeneous aggregate"); // Base can be a floating-point or a vector. if (Base->isVectorType()) { // ElementSize is in number of floats. unsigned ElementSize = getContext().getTypeSize(Base) == 64 ? 2 : 4; markAllocatedVFPs(VFPRegs, AllocatedVFP, ElementSize, Members * ElementSize); } else if (Base->isSpecificBuiltinType(BuiltinType::Float)) markAllocatedVFPs(VFPRegs, AllocatedVFP, 1, Members); else { assert(Base->isSpecificBuiltinType(BuiltinType::Double) || Base->isSpecificBuiltinType(BuiltinType::LongDouble)); markAllocatedVFPs(VFPRegs, AllocatedVFP, 2, Members * 2); } IsHA = true; return ABIArgInfo::getExpand(); } } // Support byval for ARM. // The ABI alignment for APCS is 4-byte and for AAPCS at least 4-byte and at // most 8-byte. We realign the indirect argument if type alignment is bigger // than ABI alignment. uint64_t ABIAlign = 4; uint64_t TyAlign = getContext().getTypeAlign(Ty) / 8; if (getABIKind() == ARMABIInfo::AAPCS_VFP || getABIKind() == ARMABIInfo::AAPCS) ABIAlign = std::min(std::max(TyAlign, (uint64_t)4), (uint64_t)8); if (getContext().getTypeSizeInChars(Ty) > CharUnits::fromQuantity(64)) { return ABIArgInfo::getIndirect(0, /*ByVal=*/true, /*Realign=*/TyAlign > ABIAlign); } // Otherwise, pass by coercing to a structure of the appropriate size. llvm::Type* ElemTy; unsigned SizeRegs; // FIXME: Try to match the types of the arguments more accurately where // we can. if (getContext().getTypeAlign(Ty) <= 32) { ElemTy = llvm::Type::getInt32Ty(getVMContext()); SizeRegs = (getContext().getTypeSize(Ty) + 31) / 32; } else { ElemTy = llvm::Type::getInt64Ty(getVMContext()); SizeRegs = (getContext().getTypeSize(Ty) + 63) / 64; } llvm::Type *STy = llvm::StructType::get(llvm::ArrayType::get(ElemTy, SizeRegs), NULL); return ABIArgInfo::getDirect(STy); } static bool isIntegerLikeType(QualType Ty, ASTContext &Context, llvm::LLVMContext &VMContext) { // APCS, C Language Calling Conventions, Non-Simple Return Values: A structure // is called integer-like if its size is less than or equal to one word, and // the offset of each of its addressable sub-fields is zero. uint64_t Size = Context.getTypeSize(Ty); // Check that the type fits in a word. if (Size > 32) return false; // FIXME: Handle vector types! if (Ty->isVectorType()) return false; // Float types are never treated as "integer like". if (Ty->isRealFloatingType()) return false; // If this is a builtin or pointer type then it is ok. if (Ty->getAs<BuiltinType>() || Ty->isPointerType()) return true; // Small complex integer types are "integer like". if (const ComplexType *CT = Ty->getAs<ComplexType>()) return isIntegerLikeType(CT->getElementType(), Context, VMContext); // Single element and zero sized arrays should be allowed, by the definition // above, but they are not. // Otherwise, it must be a record type. const RecordType *RT = Ty->getAs<RecordType>(); if (!RT) return false; // Ignore records with flexible arrays. const RecordDecl *RD = RT->getDecl(); if (RD->hasFlexibleArrayMember()) return false; // Check that all sub-fields are at offset 0, and are themselves "integer // like". const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); bool HadField = false; unsigned idx = 0; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i, ++idx) { const FieldDecl *FD = *i; // Bit-fields are not addressable, we only need to verify they are "integer // like". We still have to disallow a subsequent non-bitfield, for example: // struct { int : 0; int x } // is non-integer like according to gcc. if (FD->isBitField()) { if (!RD->isUnion()) HadField = true; if (!isIntegerLikeType(FD->getType(), Context, VMContext)) return false; continue; } // Check if this field is at offset 0. if (Layout.getFieldOffset(idx) != 0) return false; if (!isIntegerLikeType(FD->getType(), Context, VMContext)) return false; // Only allow at most one field in a structure. This doesn't match the // wording above, but follows gcc in situations with a field following an // empty structure. if (!RD->isUnion()) { if (HadField) return false; HadField = true; } } return true; } ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); // Large vector types should be returned via memory. if (RetTy->isVectorType() && getContext().getTypeSize(RetTy) > 128) return ABIArgInfo::getIndirect(0); if (!isAggregateTypeForABI(RetTy)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } // Structures with either a non-trivial destructor or a non-trivial // copy constructor are always indirect. if (isRecordReturnIndirect(RetTy, getCXXABI())) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); // Are we following APCS? if (getABIKind() == APCS) { if (isEmptyRecord(getContext(), RetTy, false)) return ABIArgInfo::getIgnore(); // Complex types are all returned as packed integers. // // FIXME: Consider using 2 x vector types if the back end handles them // correctly. if (RetTy->isAnyComplexType()) return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), getContext().getTypeSize(RetTy))); // Integer like structures are returned in r0. if (isIntegerLikeType(RetTy, getContext(), getVMContext())) { // Return in the smallest viable integer type. uint64_t Size = getContext().getTypeSize(RetTy); if (Size <= 8) return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext())); if (Size <= 16) return ABIArgInfo::getDirect(llvm::Type::getInt16Ty(getVMContext())); return ABIArgInfo::getDirect(llvm::Type::getInt32Ty(getVMContext())); } // Otherwise return in memory. return ABIArgInfo::getIndirect(0); } // Otherwise this is an AAPCS variant. if (isEmptyRecord(getContext(), RetTy, true)) return ABIArgInfo::getIgnore(); // Check for homogeneous aggregates with AAPCS-VFP. if (getABIKind() == AAPCS_VFP) { const Type *Base = 0; if (isHomogeneousAggregate(RetTy, Base, getContext())) { assert(Base && "Base class should be set for homogeneous aggregate"); // Homogeneous Aggregates are returned directly. return ABIArgInfo::getDirect(); } } // Aggregates <= 4 bytes are returned in r0; other aggregates // are returned indirectly. uint64_t Size = getContext().getTypeSize(RetTy); if (Size <= 32) { // Return in the smallest viable integer type. if (Size <= 8) return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext())); if (Size <= 16) return ABIArgInfo::getDirect(llvm::Type::getInt16Ty(getVMContext())); return ABIArgInfo::getDirect(llvm::Type::getInt32Ty(getVMContext())); } return ABIArgInfo::getIndirect(0); } /// isIllegalVector - check whether Ty is an illegal vector type. bool ARMABIInfo::isIllegalVectorType(QualType Ty) const { if (const VectorType *VT = Ty->getAs<VectorType>()) { // Check whether VT is legal. unsigned NumElements = VT->getNumElements(); uint64_t Size = getContext().getTypeSize(VT); // NumElements should be power of 2. if ((NumElements & (NumElements - 1)) != 0) return true; // Size should be greater than 32 bits. return Size <= 32; } return false; } llvm::Value *ARMABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { llvm::Type *BP = CGF.Int8PtrTy; llvm::Type *BPP = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); if (isEmptyRecord(getContext(), Ty, true)) { // These are ignored for parameter passing purposes. llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); return Builder.CreateBitCast(Addr, PTy); } uint64_t Size = CGF.getContext().getTypeSize(Ty) / 8; uint64_t TyAlign = CGF.getContext().getTypeAlign(Ty) / 8; bool IsIndirect = false; // The ABI alignment for 64-bit or 128-bit vectors is 8 for AAPCS and 4 for // APCS. For AAPCS, the ABI alignment is at least 4-byte and at most 8-byte. if (getABIKind() == ARMABIInfo::AAPCS_VFP || getABIKind() == ARMABIInfo::AAPCS) TyAlign = std::min(std::max(TyAlign, (uint64_t)4), (uint64_t)8); else TyAlign = 4; // Use indirect if size of the illegal vector is bigger than 16 bytes. if (isIllegalVectorType(Ty) && Size > 16) { IsIndirect = true; Size = 4; TyAlign = 4; } // Handle address alignment for ABI alignment > 4 bytes. if (TyAlign > 4) { assert((TyAlign & (TyAlign - 1)) == 0 && "Alignment is not power of 2!"); llvm::Value *AddrAsInt = Builder.CreatePtrToInt(Addr, CGF.Int32Ty); AddrAsInt = Builder.CreateAdd(AddrAsInt, Builder.getInt32(TyAlign - 1)); AddrAsInt = Builder.CreateAnd(AddrAsInt, Builder.getInt32(~(TyAlign - 1))); Addr = Builder.CreateIntToPtr(AddrAsInt, BP, "ap.align"); } uint64_t Offset = llvm::RoundUpToAlignment(Size, 4); llvm::Value *NextAddr = Builder.CreateGEP(Addr, llvm::ConstantInt::get(CGF.Int32Ty, Offset), "ap.next"); Builder.CreateStore(NextAddr, VAListAddrAsBPP); if (IsIndirect) Addr = Builder.CreateLoad(Builder.CreateBitCast(Addr, BPP)); else if (TyAlign < CGF.getContext().getTypeAlign(Ty) / 8) { // We can't directly cast ap.cur to pointer to a vector type, since ap.cur // may not be correctly aligned for the vector type. We create an aligned // temporary space and copy the content over from ap.cur to the temporary // space. This is necessary if the natural alignment of the type is greater // than the ABI alignment. llvm::Type *I8PtrTy = Builder.getInt8PtrTy(); CharUnits CharSize = getContext().getTypeSizeInChars(Ty); llvm::Value *AlignedTemp = CGF.CreateTempAlloca(CGF.ConvertType(Ty), "var.align"); llvm::Value *Dst = Builder.CreateBitCast(AlignedTemp, I8PtrTy); llvm::Value *Src = Builder.CreateBitCast(Addr, I8PtrTy); Builder.CreateMemCpy(Dst, Src, llvm::ConstantInt::get(CGF.IntPtrTy, CharSize.getQuantity()), TyAlign, false); Addr = AlignedTemp; //The content is in aligned location. } llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); llvm::Value *AddrTyped = Builder.CreateBitCast(Addr, PTy); return AddrTyped; } namespace { class NaClARMABIInfo : public ABIInfo { public: NaClARMABIInfo(CodeGen::CodeGenTypes &CGT, ARMABIInfo::ABIKind Kind) : ABIInfo(CGT), PInfo(CGT), NInfo(CGT, Kind) {} virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; private: PNaClABIInfo PInfo; // Used for generating calls with pnaclcall callingconv. ARMABIInfo NInfo; // Used for everything else. }; class NaClARMTargetCodeGenInfo : public TargetCodeGenInfo { public: NaClARMTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, ARMABIInfo::ABIKind Kind) : TargetCodeGenInfo(new NaClARMABIInfo(CGT, Kind)) {} }; } void NaClARMABIInfo::computeInfo(CGFunctionInfo &FI) const { if (FI.getASTCallingConvention() == CC_PnaclCall) PInfo.computeInfo(FI); else static_cast<const ABIInfo&>(NInfo).computeInfo(FI); } llvm::Value *NaClARMABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { // Always use the native convention; calling pnacl-style varargs functions // is unsupported. return static_cast<const ABIInfo&>(NInfo).EmitVAArg(VAListAddr, Ty, CGF); } //===----------------------------------------------------------------------===// // AArch64 ABI Implementation //===----------------------------------------------------------------------===// namespace { class AArch64ABIInfo : public ABIInfo { public: AArch64ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {} private: // The AArch64 PCS is explicit about return types and argument types being // handled identically, so we don't need to draw a distinction between // Argument and Return classification. ABIArgInfo classifyGenericType(QualType Ty, int &FreeIntRegs, int &FreeVFPRegs) const; ABIArgInfo tryUseRegs(QualType Ty, int &FreeRegs, int RegsNeeded, bool IsInt, llvm::Type *DirectTy = 0) const; virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class AArch64TargetCodeGenInfo : public TargetCodeGenInfo { public: AArch64TargetCodeGenInfo(CodeGenTypes &CGT) :TargetCodeGenInfo(new AArch64ABIInfo(CGT)) {} const AArch64ABIInfo &getABIInfo() const { return static_cast<const AArch64ABIInfo&>(TargetCodeGenInfo::getABIInfo()); } int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const { return 31; } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { // 0-31 are x0-x30 and sp: 8 bytes each llvm::Value *Eight8 = llvm::ConstantInt::get(CGF.Int8Ty, 8); AssignToArrayRange(CGF.Builder, Address, Eight8, 0, 31); // 64-95 are v0-v31: 16 bytes each llvm::Value *Sixteen8 = llvm::ConstantInt::get(CGF.Int8Ty, 16); AssignToArrayRange(CGF.Builder, Address, Sixteen8, 64, 95); return false; } }; } void AArch64ABIInfo::computeInfo(CGFunctionInfo &FI) const { int FreeIntRegs = 8, FreeVFPRegs = 8; FI.getReturnInfo() = classifyGenericType(FI.getReturnType(), FreeIntRegs, FreeVFPRegs); FreeIntRegs = FreeVFPRegs = 8; for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) { it->info = classifyGenericType(it->type, FreeIntRegs, FreeVFPRegs); } } ABIArgInfo AArch64ABIInfo::tryUseRegs(QualType Ty, int &FreeRegs, int RegsNeeded, bool IsInt, llvm::Type *DirectTy) const { if (FreeRegs >= RegsNeeded) { FreeRegs -= RegsNeeded; return ABIArgInfo::getDirect(DirectTy); } llvm::Type *Padding = 0; // We need padding so that later arguments don't get filled in anyway. That // wouldn't happen if only ByVal arguments followed in the same category, but // a large structure will simply seem to be a pointer as far as LLVM is // concerned. if (FreeRegs > 0) { if (IsInt) Padding = llvm::Type::getInt64Ty(getVMContext()); else Padding = llvm::Type::getFloatTy(getVMContext()); // Either [N x i64] or [N x float]. Padding = llvm::ArrayType::get(Padding, FreeRegs); FreeRegs = 0; } return ABIArgInfo::getIndirect(getContext().getTypeAlign(Ty) / 8, /*IsByVal=*/ true, /*Realign=*/ false, Padding); } ABIArgInfo AArch64ABIInfo::classifyGenericType(QualType Ty, int &FreeIntRegs, int &FreeVFPRegs) const { // Can only occurs for return, but harmless otherwise. if (Ty->isVoidType()) return ABIArgInfo::getIgnore(); // Large vector types should be returned via memory. There's no such concept // in the ABI, but they'd be over 16 bytes anyway so no matter how they're // classified they'd go into memory (see B.3). if (Ty->isVectorType() && getContext().getTypeSize(Ty) > 128) { if (FreeIntRegs > 0) --FreeIntRegs; return ABIArgInfo::getIndirect(0, /*ByVal=*/false); } // All non-aggregate LLVM types have a concrete ABI representation so they can // be passed directly. After this block we're guaranteed to be in a // complicated case. if (!isAggregateTypeForABI(Ty)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); if (Ty->isFloatingType() || Ty->isVectorType()) return tryUseRegs(Ty, FreeVFPRegs, /*RegsNeeded=*/ 1, /*IsInt=*/ false); assert(getContext().getTypeSize(Ty) <= 128 && "unexpectedly large scalar type"); int RegsNeeded = getContext().getTypeSize(Ty) > 64 ? 2 : 1; // If the type may need padding registers to ensure "alignment", we must be // careful when this is accounted for. Increasing the effective size covers // all cases. if (getContext().getTypeAlign(Ty) == 128) RegsNeeded += FreeIntRegs % 2 != 0; return tryUseRegs(Ty, FreeIntRegs, RegsNeeded, /*IsInt=*/ true); } if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) { if (FreeIntRegs > 0 && RAA == CGCXXABI::RAA_Indirect) --FreeIntRegs; return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); } if (isEmptyRecord(getContext(), Ty, true)) { if (!getContext().getLangOpts().CPlusPlus) { // Empty structs outside C++ mode are a GNU extension, so no ABI can // possibly tell us what to do. It turns out (I believe) that GCC ignores // the object for parameter-passsing purposes. return ABIArgInfo::getIgnore(); } // The combination of C++98 9p5 (sizeof(struct) != 0) and the pseudocode // description of va_arg in the PCS require that an empty struct does // actually occupy space for parameter-passing. I'm hoping for a // clarification giving an explicit paragraph to point to in future. return tryUseRegs(Ty, FreeIntRegs, /*RegsNeeded=*/ 1, /*IsInt=*/ true, llvm::Type::getInt8Ty(getVMContext())); } // Homogeneous vector aggregates get passed in registers or on the stack. const Type *Base = 0; uint64_t NumMembers = 0; if (isHomogeneousAggregate(Ty, Base, getContext(), &NumMembers)) { assert(Base && "Base class should be set for homogeneous aggregate"); // Homogeneous aggregates are passed and returned directly. return tryUseRegs(Ty, FreeVFPRegs, /*RegsNeeded=*/ NumMembers, /*IsInt=*/ false); } uint64_t Size = getContext().getTypeSize(Ty); if (Size <= 128) { // Small structs can use the same direct type whether they're in registers // or on the stack. llvm::Type *BaseTy; unsigned NumBases; int SizeInRegs = (Size + 63) / 64; if (getContext().getTypeAlign(Ty) == 128) { BaseTy = llvm::Type::getIntNTy(getVMContext(), 128); NumBases = 1; // If the type may need padding registers to ensure "alignment", we must // be careful when this is accounted for. Increasing the effective size // covers all cases. SizeInRegs += FreeIntRegs % 2 != 0; } else { BaseTy = llvm::Type::getInt64Ty(getVMContext()); NumBases = SizeInRegs; } llvm::Type *DirectTy = llvm::ArrayType::get(BaseTy, NumBases); return tryUseRegs(Ty, FreeIntRegs, /*RegsNeeded=*/ SizeInRegs, /*IsInt=*/ true, DirectTy); } // If the aggregate is > 16 bytes, it's passed and returned indirectly. In // LLVM terms the return uses an "sret" pointer, but that's handled elsewhere. --FreeIntRegs; return ABIArgInfo::getIndirect(0, /* byVal = */ false); } llvm::Value *AArch64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { // The AArch64 va_list type and handling is specified in the Procedure Call // Standard, section B.4: // // struct { // void *__stack; // void *__gr_top; // void *__vr_top; // int __gr_offs; // int __vr_offs; // }; assert(!CGF.CGM.getDataLayout().isBigEndian() && "va_arg not implemented for big-endian AArch64"); int FreeIntRegs = 8, FreeVFPRegs = 8; Ty = CGF.getContext().getCanonicalType(Ty); ABIArgInfo AI = classifyGenericType(Ty, FreeIntRegs, FreeVFPRegs); llvm::BasicBlock *MaybeRegBlock = CGF.createBasicBlock("vaarg.maybe_reg"); llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg"); llvm::BasicBlock *OnStackBlock = CGF.createBasicBlock("vaarg.on_stack"); llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end"); llvm::Value *reg_offs_p = 0, *reg_offs = 0; int reg_top_index; int RegSize; if (FreeIntRegs < 8) { assert(FreeVFPRegs == 8 && "Arguments never split between int & VFP regs"); // 3 is the field number of __gr_offs reg_offs_p = CGF.Builder.CreateStructGEP(VAListAddr, 3, "gr_offs_p"); reg_offs = CGF.Builder.CreateLoad(reg_offs_p, "gr_offs"); reg_top_index = 1; // field number for __gr_top RegSize = 8 * (8 - FreeIntRegs); } else { assert(FreeVFPRegs < 8 && "Argument must go in VFP or int regs"); // 4 is the field number of __vr_offs. reg_offs_p = CGF.Builder.CreateStructGEP(VAListAddr, 4, "vr_offs_p"); reg_offs = CGF.Builder.CreateLoad(reg_offs_p, "vr_offs"); reg_top_index = 2; // field number for __vr_top RegSize = 16 * (8 - FreeVFPRegs); } //======================================= // Find out where argument was passed //======================================= // If reg_offs >= 0 we're already using the stack for this type of // argument. We don't want to keep updating reg_offs (in case it overflows, // though anyone passing 2GB of arguments, each at most 16 bytes, deserves // whatever they get). llvm::Value *UsingStack = 0; UsingStack = CGF.Builder.CreateICmpSGE(reg_offs, llvm::ConstantInt::get(CGF.Int32Ty, 0)); CGF.Builder.CreateCondBr(UsingStack, OnStackBlock, MaybeRegBlock); // Otherwise, at least some kind of argument could go in these registers, the // quesiton is whether this particular type is too big. CGF.EmitBlock(MaybeRegBlock); // Integer arguments may need to correct register alignment (for example a // "struct { __int128 a; };" gets passed in x_2N, x_{2N+1}). In this case we // align __gr_offs to calculate the potential address. if (FreeIntRegs < 8 && AI.isDirect() && getContext().getTypeAlign(Ty) > 64) { int Align = getContext().getTypeAlign(Ty) / 8; reg_offs = CGF.Builder.CreateAdd(reg_offs, llvm::ConstantInt::get(CGF.Int32Ty, Align - 1), "align_regoffs"); reg_offs = CGF.Builder.CreateAnd(reg_offs, llvm::ConstantInt::get(CGF.Int32Ty, -Align), "aligned_regoffs"); } // Update the gr_offs/vr_offs pointer for next call to va_arg on this va_list. llvm::Value *NewOffset = 0; NewOffset = CGF.Builder.CreateAdd(reg_offs, llvm::ConstantInt::get(CGF.Int32Ty, RegSize), "new_reg_offs"); CGF.Builder.CreateStore(NewOffset, reg_offs_p); // Now we're in a position to decide whether this argument really was in // registers or not. llvm::Value *InRegs = 0; InRegs = CGF.Builder.CreateICmpSLE(NewOffset, llvm::ConstantInt::get(CGF.Int32Ty, 0), "inreg"); CGF.Builder.CreateCondBr(InRegs, InRegBlock, OnStackBlock); //======================================= // Argument was in registers //======================================= // Now we emit the code for if the argument was originally passed in // registers. First start the appropriate block: CGF.EmitBlock(InRegBlock); llvm::Value *reg_top_p = 0, *reg_top = 0; reg_top_p = CGF.Builder.CreateStructGEP(VAListAddr, reg_top_index, "reg_top_p"); reg_top = CGF.Builder.CreateLoad(reg_top_p, "reg_top"); llvm::Value *BaseAddr = CGF.Builder.CreateGEP(reg_top, reg_offs); llvm::Value *RegAddr = 0; llvm::Type *MemTy = llvm::PointerType::getUnqual(CGF.ConvertTypeForMem(Ty)); if (!AI.isDirect()) { // If it's been passed indirectly (actually a struct), whatever we find from // stored registers or on the stack will actually be a struct **. MemTy = llvm::PointerType::getUnqual(MemTy); } const Type *Base = 0; uint64_t NumMembers; if (isHomogeneousAggregate(Ty, Base, getContext(), &NumMembers) && NumMembers > 1) { // Homogeneous aggregates passed in registers will have their elements split // and stored 16-bytes apart regardless of size (they're notionally in qN, // qN+1, ...). We reload and store into a temporary local variable // contiguously. assert(AI.isDirect() && "Homogeneous aggregates should be passed directly"); llvm::Type *BaseTy = CGF.ConvertType(QualType(Base, 0)); llvm::Type *HFATy = llvm::ArrayType::get(BaseTy, NumMembers); llvm::Value *Tmp = CGF.CreateTempAlloca(HFATy); for (unsigned i = 0; i < NumMembers; ++i) { llvm::Value *BaseOffset = llvm::ConstantInt::get(CGF.Int32Ty, 16 * i); llvm::Value *LoadAddr = CGF.Builder.CreateGEP(BaseAddr, BaseOffset); LoadAddr = CGF.Builder.CreateBitCast(LoadAddr, llvm::PointerType::getUnqual(BaseTy)); llvm::Value *StoreAddr = CGF.Builder.CreateStructGEP(Tmp, i); llvm::Value *Elem = CGF.Builder.CreateLoad(LoadAddr); CGF.Builder.CreateStore(Elem, StoreAddr); } RegAddr = CGF.Builder.CreateBitCast(Tmp, MemTy); } else { // Otherwise the object is contiguous in memory RegAddr = CGF.Builder.CreateBitCast(BaseAddr, MemTy); } CGF.EmitBranch(ContBlock); //======================================= // Argument was on the stack //======================================= CGF.EmitBlock(OnStackBlock); llvm::Value *stack_p = 0, *OnStackAddr = 0; stack_p = CGF.Builder.CreateStructGEP(VAListAddr, 0, "stack_p"); OnStackAddr = CGF.Builder.CreateLoad(stack_p, "stack"); // Again, stack arguments may need realigmnent. In this case both integer and // floating-point ones might be affected. if (AI.isDirect() && getContext().getTypeAlign(Ty) > 64) { int Align = getContext().getTypeAlign(Ty) / 8; OnStackAddr = CGF.Builder.CreatePtrToInt(OnStackAddr, CGF.Int64Ty); OnStackAddr = CGF.Builder.CreateAdd(OnStackAddr, llvm::ConstantInt::get(CGF.Int64Ty, Align - 1), "align_stack"); OnStackAddr = CGF.Builder.CreateAnd(OnStackAddr, llvm::ConstantInt::get(CGF.Int64Ty, -Align), "align_stack"); OnStackAddr = CGF.Builder.CreateIntToPtr(OnStackAddr, CGF.Int8PtrTy); } uint64_t StackSize; if (AI.isDirect()) StackSize = getContext().getTypeSize(Ty) / 8; else StackSize = 8; // All stack slots are 8 bytes StackSize = llvm::RoundUpToAlignment(StackSize, 8); llvm::Value *StackSizeC = llvm::ConstantInt::get(CGF.Int32Ty, StackSize); llvm::Value *NewStack = CGF.Builder.CreateGEP(OnStackAddr, StackSizeC, "new_stack"); // Write the new value of __stack for the next call to va_arg CGF.Builder.CreateStore(NewStack, stack_p); OnStackAddr = CGF.Builder.CreateBitCast(OnStackAddr, MemTy); CGF.EmitBranch(ContBlock); //======================================= // Tidy up //======================================= CGF.EmitBlock(ContBlock); llvm::PHINode *ResAddr = CGF.Builder.CreatePHI(MemTy, 2, "vaarg.addr"); ResAddr->addIncoming(RegAddr, InRegBlock); ResAddr->addIncoming(OnStackAddr, OnStackBlock); if (AI.isDirect()) return ResAddr; return CGF.Builder.CreateLoad(ResAddr, "vaarg.addr"); } //===----------------------------------------------------------------------===// // NVPTX ABI Implementation //===----------------------------------------------------------------------===// namespace { class NVPTXABIInfo : public ABIInfo { public: NVPTXABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {} ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType Ty) const; virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CFG) const; }; class NVPTXTargetCodeGenInfo : public TargetCodeGenInfo { public: NVPTXTargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new NVPTXABIInfo(CGT)) {} virtual void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const; private: static void addKernelMetadata(llvm::Function *F); }; ABIArgInfo NVPTXABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); // note: this is different from default ABI if (!RetTy->isScalarType()) return ABIArgInfo::getDirect(); // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } ABIArgInfo NVPTXABIInfo::classifyArgumentType(QualType Ty) const { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } void NVPTXABIInfo::computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyArgumentType(it->type); // Always honor user-specified calling convention. if (FI.getCallingConvention() != llvm::CallingConv::C) return; FI.setEffectiveCallingConvention(getRuntimeCC()); } llvm::Value *NVPTXABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CFG) const { llvm_unreachable("NVPTX does not support varargs"); } void NVPTXTargetCodeGenInfo:: SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const{ const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) return; llvm::Function *F = cast<llvm::Function>(GV); // Perform special handling in OpenCL mode if (M.getLangOpts().OpenCL) { // Use OpenCL function attributes to check for kernel functions // By default, all functions are device functions if (FD->hasAttr<OpenCLKernelAttr>()) { // OpenCL __kernel functions get kernel metadata addKernelMetadata(F); // And kernel functions are not subject to inlining F->addFnAttr(llvm::Attribute::NoInline); } } // Perform special handling in CUDA mode. if (M.getLangOpts().CUDA) { // CUDA __global__ functions get a kernel metadata entry. Since // __global__ functions cannot be called from the device, we do not // need to set the noinline attribute. if (FD->getAttr<CUDAGlobalAttr>()) addKernelMetadata(F); } } void NVPTXTargetCodeGenInfo::addKernelMetadata(llvm::Function *F) { llvm::Module *M = F->getParent(); llvm::LLVMContext &Ctx = M->getContext(); // Get "nvvm.annotations" metadata node llvm::NamedMDNode *MD = M->getOrInsertNamedMetadata("nvvm.annotations"); // Create !{<func-ref>, metadata !"kernel", i32 1} node llvm::SmallVector<llvm::Value *, 3> MDVals; MDVals.push_back(F); MDVals.push_back(llvm::MDString::get(Ctx, "kernel")); MDVals.push_back(llvm::ConstantInt::get(llvm::Type::getInt32Ty(Ctx), 1)); // Append metadata to nvvm.annotations MD->addOperand(llvm::MDNode::get(Ctx, MDVals)); } } //===----------------------------------------------------------------------===// // SystemZ ABI Implementation //===----------------------------------------------------------------------===// namespace { class SystemZABIInfo : public ABIInfo { public: SystemZABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {} bool isPromotableIntegerType(QualType Ty) const; bool isCompoundType(QualType Ty) const; bool isFPArgumentType(QualType Ty) const; ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType ArgTy) const; virtual void computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyArgumentType(it->type); } virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class SystemZTargetCodeGenInfo : public TargetCodeGenInfo { public: SystemZTargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new SystemZABIInfo(CGT)) {} }; } bool SystemZABIInfo::isPromotableIntegerType(QualType Ty) const { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); // Promotable integer types are required to be promoted by the ABI. if (Ty->isPromotableIntegerType()) return true; // 32-bit values must also be promoted. if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) switch (BT->getKind()) { case BuiltinType::Int: case BuiltinType::UInt: return true; default: return false; } return false; } bool SystemZABIInfo::isCompoundType(QualType Ty) const { return Ty->isAnyComplexType() || isAggregateTypeForABI(Ty); } bool SystemZABIInfo::isFPArgumentType(QualType Ty) const { if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) switch (BT->getKind()) { case BuiltinType::Float: case BuiltinType::Double: return true; default: return false; } if (const RecordType *RT = Ty->getAsStructureType()) { const RecordDecl *RD = RT->getDecl(); bool Found = false; // If this is a C++ record, check the bases first. if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) for (CXXRecordDecl::base_class_const_iterator I = CXXRD->bases_begin(), E = CXXRD->bases_end(); I != E; ++I) { QualType Base = I->getType(); // Empty bases don't affect things either way. if (isEmptyRecord(getContext(), Base, true)) continue; if (Found) return false; Found = isFPArgumentType(Base); if (!Found) return false; } // Check the fields. for (RecordDecl::field_iterator I = RD->field_begin(), E = RD->field_end(); I != E; ++I) { const FieldDecl *FD = *I; // Empty bitfields don't affect things either way. // Unlike isSingleElementStruct(), empty structure and array fields // do count. So do anonymous bitfields that aren't zero-sized. if (FD->isBitField() && FD->getBitWidthValue(getContext()) == 0) return true; // Unlike isSingleElementStruct(), arrays do not count. // Nested isFPArgumentType structures still do though. if (Found) return false; Found = isFPArgumentType(FD->getType()); if (!Found) return false; } // Unlike isSingleElementStruct(), trailing padding is allowed. // An 8-byte aligned struct s { float f; } is passed as a double. return Found; } return false; } llvm::Value *SystemZABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { // Assume that va_list type is correct; should be pointer to LLVM type: // struct { // i64 __gpr; // i64 __fpr; // i8 *__overflow_arg_area; // i8 *__reg_save_area; // }; // Every argument occupies 8 bytes and is passed by preference in either // GPRs or FPRs. Ty = CGF.getContext().getCanonicalType(Ty); ABIArgInfo AI = classifyArgumentType(Ty); bool InFPRs = isFPArgumentType(Ty); llvm::Type *APTy = llvm::PointerType::getUnqual(CGF.ConvertTypeForMem(Ty)); bool IsIndirect = AI.isIndirect(); unsigned UnpaddedBitSize; if (IsIndirect) { APTy = llvm::PointerType::getUnqual(APTy); UnpaddedBitSize = 64; } else UnpaddedBitSize = getContext().getTypeSize(Ty); unsigned PaddedBitSize = 64; assert((UnpaddedBitSize <= PaddedBitSize) && "Invalid argument size."); unsigned PaddedSize = PaddedBitSize / 8; unsigned Padding = (PaddedBitSize - UnpaddedBitSize) / 8; unsigned MaxRegs, RegCountField, RegSaveIndex, RegPadding; if (InFPRs) { MaxRegs = 4; // Maximum of 4 FPR arguments RegCountField = 1; // __fpr RegSaveIndex = 16; // save offset for f0 RegPadding = 0; // floats are passed in the high bits of an FPR } else { MaxRegs = 5; // Maximum of 5 GPR arguments RegCountField = 0; // __gpr RegSaveIndex = 2; // save offset for r2 RegPadding = Padding; // values are passed in the low bits of a GPR } llvm::Value *RegCountPtr = CGF.Builder.CreateStructGEP(VAListAddr, RegCountField, "reg_count_ptr"); llvm::Value *RegCount = CGF.Builder.CreateLoad(RegCountPtr, "reg_count"); llvm::Type *IndexTy = RegCount->getType(); llvm::Value *MaxRegsV = llvm::ConstantInt::get(IndexTy, MaxRegs); llvm::Value *InRegs = CGF.Builder.CreateICmpULT(RegCount, MaxRegsV, "fits_in_regs"); llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg"); llvm::BasicBlock *InMemBlock = CGF.createBasicBlock("vaarg.in_mem"); llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end"); CGF.Builder.CreateCondBr(InRegs, InRegBlock, InMemBlock); // Emit code to load the value if it was passed in registers. CGF.EmitBlock(InRegBlock); // Work out the address of an argument register. llvm::Value *PaddedSizeV = llvm::ConstantInt::get(IndexTy, PaddedSize); llvm::Value *ScaledRegCount = CGF.Builder.CreateMul(RegCount, PaddedSizeV, "scaled_reg_count"); llvm::Value *RegBase = llvm::ConstantInt::get(IndexTy, RegSaveIndex * PaddedSize + RegPadding); llvm::Value *RegOffset = CGF.Builder.CreateAdd(ScaledRegCount, RegBase, "reg_offset"); llvm::Value *RegSaveAreaPtr = CGF.Builder.CreateStructGEP(VAListAddr, 3, "reg_save_area_ptr"); llvm::Value *RegSaveArea = CGF.Builder.CreateLoad(RegSaveAreaPtr, "reg_save_area"); llvm::Value *RawRegAddr = CGF.Builder.CreateGEP(RegSaveArea, RegOffset, "raw_reg_addr"); llvm::Value *RegAddr = CGF.Builder.CreateBitCast(RawRegAddr, APTy, "reg_addr"); // Update the register count llvm::Value *One = llvm::ConstantInt::get(IndexTy, 1); llvm::Value *NewRegCount = CGF.Builder.CreateAdd(RegCount, One, "reg_count"); CGF.Builder.CreateStore(NewRegCount, RegCountPtr); CGF.EmitBranch(ContBlock); // Emit code to load the value if it was passed in memory. CGF.EmitBlock(InMemBlock); // Work out the address of a stack argument. llvm::Value *OverflowArgAreaPtr = CGF.Builder.CreateStructGEP(VAListAddr, 2, "overflow_arg_area_ptr"); llvm::Value *OverflowArgArea = CGF.Builder.CreateLoad(OverflowArgAreaPtr, "overflow_arg_area"); llvm::Value *PaddingV = llvm::ConstantInt::get(IndexTy, Padding); llvm::Value *RawMemAddr = CGF.Builder.CreateGEP(OverflowArgArea, PaddingV, "raw_mem_addr"); llvm::Value *MemAddr = CGF.Builder.CreateBitCast(RawMemAddr, APTy, "mem_addr"); // Update overflow_arg_area_ptr pointer llvm::Value *NewOverflowArgArea = CGF.Builder.CreateGEP(OverflowArgArea, PaddedSizeV, "overflow_arg_area"); CGF.Builder.CreateStore(NewOverflowArgArea, OverflowArgAreaPtr); CGF.EmitBranch(ContBlock); // Return the appropriate result. CGF.EmitBlock(ContBlock); llvm::PHINode *ResAddr = CGF.Builder.CreatePHI(APTy, 2, "va_arg.addr"); ResAddr->addIncoming(RegAddr, InRegBlock); ResAddr->addIncoming(MemAddr, InMemBlock); if (IsIndirect) return CGF.Builder.CreateLoad(ResAddr, "indirect_arg"); return ResAddr; } bool X86_32TargetCodeGenInfo::isStructReturnInRegABI( const llvm::Triple &Triple, const CodeGenOptions &Opts) { assert(Triple.getArch() == llvm::Triple::x86); switch (Opts.getStructReturnConvention()) { case CodeGenOptions::SRCK_Default: break; case CodeGenOptions::SRCK_OnStack: // -fpcc-struct-return return false; case CodeGenOptions::SRCK_InRegs: // -freg-struct-return return true; } if (Triple.isOSDarwin()) return true; switch (Triple.getOS()) { case llvm::Triple::Cygwin: case llvm::Triple::MinGW32: case llvm::Triple::AuroraUX: case llvm::Triple::DragonFly: case llvm::Triple::FreeBSD: case llvm::Triple::OpenBSD: case llvm::Triple::Bitrig: case llvm::Triple::Win32: return true; default: return false; } } ABIArgInfo SystemZABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); if (isCompoundType(RetTy) || getContext().getTypeSize(RetTy) > 64) return ABIArgInfo::getIndirect(0); return (isPromotableIntegerType(RetTy) ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const { // Handle the generic C++ ABI. if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); // Integers and enums are extended to full register width. if (isPromotableIntegerType(Ty)) return ABIArgInfo::getExtend(); // Values that are not 1, 2, 4 or 8 bytes in size are passed indirectly. uint64_t Size = getContext().getTypeSize(Ty); if (Size != 8 && Size != 16 && Size != 32 && Size != 64) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); // Handle small structures. if (const RecordType *RT = Ty->getAs<RecordType>()) { // Structures with flexible arrays have variable length, so really // fail the size test above. const RecordDecl *RD = RT->getDecl(); if (RD->hasFlexibleArrayMember()) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); // The structure is passed as an unextended integer, a float, or a double. llvm::Type *PassTy; if (isFPArgumentType(Ty)) { assert(Size == 32 || Size == 64); if (Size == 32) PassTy = llvm::Type::getFloatTy(getVMContext()); else PassTy = llvm::Type::getDoubleTy(getVMContext()); } else PassTy = llvm::IntegerType::get(getVMContext(), Size); return ABIArgInfo::getDirect(PassTy); } // Non-structure compounds are passed indirectly. if (isCompoundType(Ty)) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); return ABIArgInfo::getDirect(0); } //===----------------------------------------------------------------------===// // MSP430 ABI Implementation //===----------------------------------------------------------------------===// namespace { class MSP430TargetCodeGenInfo : public TargetCodeGenInfo { public: MSP430TargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new DefaultABIInfo(CGT)) {} void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const; }; } void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { if (const MSP430InterruptAttr *attr = FD->getAttr<MSP430InterruptAttr>()) { // Handle 'interrupt' attribute: llvm::Function *F = cast<llvm::Function>(GV); // Step 1: Set ISR calling convention. F->setCallingConv(llvm::CallingConv::MSP430_INTR); // Step 2: Add attributes goodness. F->addFnAttr(llvm::Attribute::NoInline); // Step 3: Emit ISR vector alias. unsigned Num = attr->getNumber() / 2; new llvm::GlobalAlias(GV->getType(), llvm::Function::ExternalLinkage, "__isr_" + Twine(Num), GV, &M.getModule()); } } } //===----------------------------------------------------------------------===// // MIPS ABI Implementation. This works for both little-endian and // big-endian variants. //===----------------------------------------------------------------------===// namespace { class MipsABIInfo : public ABIInfo { bool IsO32; unsigned MinABIStackAlignInBytes, StackAlignInBytes; void CoerceToIntArgs(uint64_t TySize, SmallVectorImpl<llvm::Type *> &ArgList) const; llvm::Type* HandleAggregates(QualType Ty, uint64_t TySize) const; llvm::Type* returnAggregateInRegs(QualType RetTy, uint64_t Size) const; llvm::Type* getPaddingType(uint64_t Align, uint64_t Offset) const; public: MipsABIInfo(CodeGenTypes &CGT, bool _IsO32) : ABIInfo(CGT), IsO32(_IsO32), MinABIStackAlignInBytes(IsO32 ? 4 : 8), StackAlignInBytes(IsO32 ? 8 : 16) {} ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType RetTy, uint64_t &Offset) const; virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class MIPSTargetCodeGenInfo : public TargetCodeGenInfo { unsigned SizeOfUnwindException; public: MIPSTargetCodeGenInfo(CodeGenTypes &CGT, bool IsO32) : TargetCodeGenInfo(new MipsABIInfo(CGT, IsO32)), SizeOfUnwindException(IsO32 ? 24 : 32) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const { return 29; } void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) return; llvm::Function *Fn = cast<llvm::Function>(GV); if (FD->hasAttr<Mips16Attr>()) { Fn->addFnAttr("mips16"); } else if (FD->hasAttr<NoMips16Attr>()) { Fn->addFnAttr("nomips16"); } } bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const; unsigned getSizeOfUnwindException() const { return SizeOfUnwindException; } }; } void MipsABIInfo::CoerceToIntArgs(uint64_t TySize, SmallVectorImpl<llvm::Type *> &ArgList) const { llvm::IntegerType *IntTy = llvm::IntegerType::get(getVMContext(), MinABIStackAlignInBytes * 8); // Add (TySize / MinABIStackAlignInBytes) args of IntTy. for (unsigned N = TySize / (MinABIStackAlignInBytes * 8); N; --N) ArgList.push_back(IntTy); // If necessary, add one more integer type to ArgList. unsigned R = TySize % (MinABIStackAlignInBytes * 8); if (R) ArgList.push_back(llvm::IntegerType::get(getVMContext(), R)); } // In N32/64, an aligned double precision floating point field is passed in // a register. llvm::Type* MipsABIInfo::HandleAggregates(QualType Ty, uint64_t TySize) const { SmallVector<llvm::Type*, 8> ArgList, IntArgList; if (IsO32) { CoerceToIntArgs(TySize, ArgList); return llvm::StructType::get(getVMContext(), ArgList); } if (Ty->isComplexType()) return CGT.ConvertType(Ty); const RecordType *RT = Ty->getAs<RecordType>(); // Unions/vectors are passed in integer registers. if (!RT || !RT->isStructureOrClassType()) { CoerceToIntArgs(TySize, ArgList); return llvm::StructType::get(getVMContext(), ArgList); } const RecordDecl *RD = RT->getDecl(); const ASTRecordLayout &Layout = getContext().getASTRecordLayout(RD); assert(!(TySize % 8) && "Size of structure must be multiple of 8."); uint64_t LastOffset = 0; unsigned idx = 0; llvm::IntegerType *I64 = llvm::IntegerType::get(getVMContext(), 64); // Iterate over fields in the struct/class and check if there are any aligned // double fields. for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i, ++idx) { const QualType Ty = i->getType(); const BuiltinType *BT = Ty->getAs<BuiltinType>(); if (!BT || BT->getKind() != BuiltinType::Double) continue; uint64_t Offset = Layout.getFieldOffset(idx); if (Offset % 64) // Ignore doubles that are not aligned. continue; // Add ((Offset - LastOffset) / 64) args of type i64. for (unsigned j = (Offset - LastOffset) / 64; j > 0; --j) ArgList.push_back(I64); // Add double type. ArgList.push_back(llvm::Type::getDoubleTy(getVMContext())); LastOffset = Offset + 64; } CoerceToIntArgs(TySize - LastOffset, IntArgList); ArgList.append(IntArgList.begin(), IntArgList.end()); return llvm::StructType::get(getVMContext(), ArgList); } llvm::Type *MipsABIInfo::getPaddingType(uint64_t OrigOffset, uint64_t Offset) const { if (OrigOffset + MinABIStackAlignInBytes > Offset) return 0; return llvm::IntegerType::get(getVMContext(), (Offset - OrigOffset) * 8); } ABIArgInfo MipsABIInfo::classifyArgumentType(QualType Ty, uint64_t &Offset) const { uint64_t OrigOffset = Offset; uint64_t TySize = getContext().getTypeSize(Ty); uint64_t Align = getContext().getTypeAlign(Ty) / 8; Align = std::min(std::max(Align, (uint64_t)MinABIStackAlignInBytes), (uint64_t)StackAlignInBytes); unsigned CurrOffset = llvm::RoundUpToAlignment(Offset, Align); Offset = CurrOffset + llvm::RoundUpToAlignment(TySize, Align * 8) / 8; if (isAggregateTypeForABI(Ty) || Ty->isVectorType()) { // Ignore empty aggregates. if (TySize == 0) return ABIArgInfo::getIgnore(); if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) { Offset = OrigOffset + MinABIStackAlignInBytes; return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); } // If we have reached here, aggregates are passed directly by coercing to // another structure type. Padding is inserted if the offset of the // aggregate is unaligned. return ABIArgInfo::getDirect(HandleAggregates(Ty, TySize), 0, getPaddingType(OrigOffset, CurrOffset)); } // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); if (Ty->isPromotableIntegerType()) return ABIArgInfo::getExtend(); return ABIArgInfo::getDirect( 0, 0, IsO32 ? 0 : getPaddingType(OrigOffset, CurrOffset)); } llvm::Type* MipsABIInfo::returnAggregateInRegs(QualType RetTy, uint64_t Size) const { const RecordType *RT = RetTy->getAs<RecordType>(); SmallVector<llvm::Type*, 8> RTList; if (RT && RT->isStructureOrClassType()) { const RecordDecl *RD = RT->getDecl(); const ASTRecordLayout &Layout = getContext().getASTRecordLayout(RD); unsigned FieldCnt = Layout.getFieldCount(); // N32/64 returns struct/classes in floating point registers if the // following conditions are met: // 1. The size of the struct/class is no larger than 128-bit. // 2. The struct/class has one or two fields all of which are floating // point types. // 3. The offset of the first field is zero (this follows what gcc does). // // Any other composite results are returned in integer registers. // if (FieldCnt && (FieldCnt <= 2) && !Layout.getFieldOffset(0)) { RecordDecl::field_iterator b = RD->field_begin(), e = RD->field_end(); for (; b != e; ++b) { const BuiltinType *BT = b->getType()->getAs<BuiltinType>(); if (!BT || !BT->isFloatingPoint()) break; RTList.push_back(CGT.ConvertType(b->getType())); } if (b == e) return llvm::StructType::get(getVMContext(), RTList, RD->hasAttr<PackedAttr>()); RTList.clear(); } } CoerceToIntArgs(Size, RTList); return llvm::StructType::get(getVMContext(), RTList); } ABIArgInfo MipsABIInfo::classifyReturnType(QualType RetTy) const { uint64_t Size = getContext().getTypeSize(RetTy); if (RetTy->isVoidType() || Size == 0) return ABIArgInfo::getIgnore(); if (isAggregateTypeForABI(RetTy) || RetTy->isVectorType()) { if (isRecordReturnIndirect(RetTy, getCXXABI())) return ABIArgInfo::getIndirect(0); if (Size <= 128) { if (RetTy->isAnyComplexType()) return ABIArgInfo::getDirect(); // O32 returns integer vectors in registers. if (IsO32 && RetTy->isVectorType() && !RetTy->hasFloatingRepresentation()) return ABIArgInfo::getDirect(returnAggregateInRegs(RetTy, Size)); if (!IsO32) return ABIArgInfo::getDirect(returnAggregateInRegs(RetTy, Size)); } return ABIArgInfo::getIndirect(0); } // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } void MipsABIInfo::computeInfo(CGFunctionInfo &FI) const { ABIArgInfo &RetInfo = FI.getReturnInfo(); RetInfo = classifyReturnType(FI.getReturnType()); // Check if a pointer to an aggregate is passed as a hidden argument. uint64_t Offset = RetInfo.isIndirect() ? MinABIStackAlignInBytes : 0; for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyArgumentType(it->type, Offset); } llvm::Value* MipsABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { llvm::Type *BP = CGF.Int8PtrTy; llvm::Type *BPP = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); int64_t TypeAlign = getContext().getTypeAlign(Ty) / 8; llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); llvm::Value *AddrTyped; unsigned PtrWidth = getTarget().getPointerWidth(0); llvm::IntegerType *IntTy = (PtrWidth == 32) ? CGF.Int32Ty : CGF.Int64Ty; if (TypeAlign > MinABIStackAlignInBytes) { llvm::Value *AddrAsInt = CGF.Builder.CreatePtrToInt(Addr, IntTy); llvm::Value *Inc = llvm::ConstantInt::get(IntTy, TypeAlign - 1); llvm::Value *Mask = llvm::ConstantInt::get(IntTy, -TypeAlign); llvm::Value *Add = CGF.Builder.CreateAdd(AddrAsInt, Inc); llvm::Value *And = CGF.Builder.CreateAnd(Add, Mask); AddrTyped = CGF.Builder.CreateIntToPtr(And, PTy); } else AddrTyped = Builder.CreateBitCast(Addr, PTy); llvm::Value *AlignedAddr = Builder.CreateBitCast(AddrTyped, BP); TypeAlign = std::max((unsigned)TypeAlign, MinABIStackAlignInBytes); uint64_t Offset = llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, TypeAlign); llvm::Value *NextAddr = Builder.CreateGEP(AlignedAddr, llvm::ConstantInt::get(IntTy, Offset), "ap.next"); Builder.CreateStore(NextAddr, VAListAddrAsBPP); return AddrTyped; } bool MIPSTargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const { // This information comes from gcc's implementation, which seems to // as canonical as it gets. // Everything on MIPS is 4 bytes. Double-precision FP registers // are aliased to pairs of single-precision FP registers. llvm::Value *Four8 = llvm::ConstantInt::get(CGF.Int8Ty, 4); // 0-31 are the general purpose registers, $0 - $31. // 32-63 are the floating-point registers, $f0 - $f31. // 64 and 65 are the multiply/divide registers, $hi and $lo. // 66 is the (notional, I think) register for signal-handler return. AssignToArrayRange(CGF.Builder, Address, Four8, 0, 65); // 67-74 are the floating-point status registers, $fcc0 - $fcc7. // They are one bit wide and ignored here. // 80-111 are the coprocessor 0 registers, $c0r0 - $c0r31. // (coprocessor 1 is the FP unit) // 112-143 are the coprocessor 2 registers, $c2r0 - $c2r31. // 144-175 are the coprocessor 3 registers, $c3r0 - $c3r31. // 176-181 are the DSP accumulator registers. AssignToArrayRange(CGF.Builder, Address, Four8, 80, 181); return false; } //===----------------------------------------------------------------------===// // TCE ABI Implementation (see http://tce.cs.tut.fi). Uses mostly the defaults. // Currently subclassed only to implement custom OpenCL C function attribute // handling. //===----------------------------------------------------------------------===// namespace { class TCETargetCodeGenInfo : public DefaultTargetCodeGenInfo { public: TCETargetCodeGenInfo(CodeGenTypes &CGT) : DefaultTargetCodeGenInfo(CGT) {} virtual void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const; }; void TCETargetCodeGenInfo::SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); if (!FD) return; llvm::Function *F = cast<llvm::Function>(GV); if (M.getLangOpts().OpenCL) { if (FD->hasAttr<OpenCLKernelAttr>()) { // OpenCL C Kernel functions are not subject to inlining F->addFnAttr(llvm::Attribute::NoInline); if (FD->hasAttr<ReqdWorkGroupSizeAttr>()) { // Convert the reqd_work_group_size() attributes to metadata. llvm::LLVMContext &Context = F->getContext(); llvm::NamedMDNode *OpenCLMetadata = M.getModule().getOrInsertNamedMetadata("opencl.kernel_wg_size_info"); SmallVector<llvm::Value*, 5> Operands; Operands.push_back(F); Operands.push_back(llvm::Constant::getIntegerValue(M.Int32Ty, llvm::APInt(32, FD->getAttr<ReqdWorkGroupSizeAttr>()->getXDim()))); Operands.push_back(llvm::Constant::getIntegerValue(M.Int32Ty, llvm::APInt(32, FD->getAttr<ReqdWorkGroupSizeAttr>()->getYDim()))); Operands.push_back(llvm::Constant::getIntegerValue(M.Int32Ty, llvm::APInt(32, FD->getAttr<ReqdWorkGroupSizeAttr>()->getZDim()))); // Add a boolean constant operand for "required" (true) or "hint" (false) // for implementing the work_group_size_hint attr later. Currently // always true as the hint is not yet implemented. Operands.push_back(llvm::ConstantInt::getTrue(Context)); OpenCLMetadata->addOperand(llvm::MDNode::get(Context, Operands)); } } } } } //===----------------------------------------------------------------------===// // Hexagon ABI Implementation //===----------------------------------------------------------------------===// namespace { class HexagonABIInfo : public ABIInfo { public: HexagonABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {} private: ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType RetTy) const; virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class HexagonTargetCodeGenInfo : public TargetCodeGenInfo { public: HexagonTargetCodeGenInfo(CodeGenTypes &CGT) :TargetCodeGenInfo(new HexagonABIInfo(CGT)) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const { return 29; } }; } void HexagonABIInfo::computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyArgumentType(it->type); } ABIArgInfo HexagonABIInfo::classifyArgumentType(QualType Ty) const { if (!isAggregateTypeForABI(Ty)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } // Ignore empty records. if (isEmptyRecord(getContext(), Ty, true)) return ABIArgInfo::getIgnore(); if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); uint64_t Size = getContext().getTypeSize(Ty); if (Size > 64) return ABIArgInfo::getIndirect(0, /*ByVal=*/true); // Pass in the smallest viable integer type. else if (Size > 32) return ABIArgInfo::getDirect(llvm::Type::getInt64Ty(getVMContext())); else if (Size > 16) return ABIArgInfo::getDirect(llvm::Type::getInt32Ty(getVMContext())); else if (Size > 8) return ABIArgInfo::getDirect(llvm::Type::getInt16Ty(getVMContext())); else return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext())); } ABIArgInfo HexagonABIInfo::classifyReturnType(QualType RetTy) const { if (RetTy->isVoidType()) return ABIArgInfo::getIgnore(); // Large vector types should be returned via memory. if (RetTy->isVectorType() && getContext().getTypeSize(RetTy) > 64) return ABIArgInfo::getIndirect(0); if (!isAggregateTypeForABI(RetTy)) { // Treat an enum type as its underlying type. if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); } // Structures with either a non-trivial destructor or a non-trivial // copy constructor are always indirect. if (isRecordReturnIndirect(RetTy, getCXXABI())) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); if (isEmptyRecord(getContext(), RetTy, true)) return ABIArgInfo::getIgnore(); // Aggregates <= 8 bytes are returned in r0; other aggregates // are returned indirectly. uint64_t Size = getContext().getTypeSize(RetTy); if (Size <= 64) { // Return in the smallest viable integer type. if (Size <= 8) return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext())); if (Size <= 16) return ABIArgInfo::getDirect(llvm::Type::getInt16Ty(getVMContext())); if (Size <= 32) return ABIArgInfo::getDirect(llvm::Type::getInt32Ty(getVMContext())); return ABIArgInfo::getDirect(llvm::Type::getInt64Ty(getVMContext())); } return ABIArgInfo::getIndirect(0, /*ByVal=*/true); } llvm::Value *HexagonABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { // FIXME: Need to handle alignment llvm::Type *BPP = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty)); llvm::Value *AddrTyped = Builder.CreateBitCast(Addr, PTy); uint64_t Offset = llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, 4); llvm::Value *NextAddr = Builder.CreateGEP(Addr, llvm::ConstantInt::get(CGF.Int32Ty, Offset), "ap.next"); Builder.CreateStore(NextAddr, VAListAddrAsBPP); return AddrTyped; } //===----------------------------------------------------------------------===// // SPARC v9 ABI Implementation. // Based on the SPARC Compliance Definition version 2.4.1. // // Function arguments a mapped to a nominal "parameter array" and promoted to // registers depending on their type. Each argument occupies 8 or 16 bytes in // the array, structs larger than 16 bytes are passed indirectly. // // One case requires special care: // // struct mixed { // int i; // float f; // }; // // When a struct mixed is passed by value, it only occupies 8 bytes in the // parameter array, but the int is passed in an integer register, and the float // is passed in a floating point register. This is represented as two arguments // with the LLVM IR inreg attribute: // // declare void f(i32 inreg %i, float inreg %f) // // The code generator will only allocate 4 bytes from the parameter array for // the inreg arguments. All other arguments are allocated a multiple of 8 // bytes. // namespace { class SparcV9ABIInfo : public ABIInfo { public: SparcV9ABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {} private: ABIArgInfo classifyType(QualType RetTy, unsigned SizeLimit) const; virtual void computeInfo(CGFunctionInfo &FI) const; virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; // Coercion type builder for structs passed in registers. The coercion type // serves two purposes: // // 1. Pad structs to a multiple of 64 bits, so they are passed 'left-aligned' // in registers. // 2. Expose aligned floating point elements as first-level elements, so the // code generator knows to pass them in floating point registers. // // We also compute the InReg flag which indicates that the struct contains // aligned 32-bit floats. // struct CoerceBuilder { llvm::LLVMContext &Context; const llvm::DataLayout &DL; SmallVector<llvm::Type*, 8> Elems; uint64_t Size; bool InReg; CoerceBuilder(llvm::LLVMContext &c, const llvm::DataLayout &dl) : Context(c), DL(dl), Size(0), InReg(false) {} // Pad Elems with integers until Size is ToSize. void pad(uint64_t ToSize) { assert(ToSize >= Size && "Cannot remove elements"); if (ToSize == Size) return; // Finish the current 64-bit word. uint64_t Aligned = llvm::RoundUpToAlignment(Size, 64); if (Aligned > Size && Aligned <= ToSize) { Elems.push_back(llvm::IntegerType::get(Context, Aligned - Size)); Size = Aligned; } // Add whole 64-bit words. while (Size + 64 <= ToSize) { Elems.push_back(llvm::Type::getInt64Ty(Context)); Size += 64; } // Final in-word padding. if (Size < ToSize) { Elems.push_back(llvm::IntegerType::get(Context, ToSize - Size)); Size = ToSize; } } // Add a floating point element at Offset. void addFloat(uint64_t Offset, llvm::Type *Ty, unsigned Bits) { // Unaligned floats are treated as integers. if (Offset % Bits) return; // The InReg flag is only required if there are any floats < 64 bits. if (Bits < 64) InReg = true; pad(Offset); Elems.push_back(Ty); Size = Offset + Bits; } // Add a struct type to the coercion type, starting at Offset (in bits). void addStruct(uint64_t Offset, llvm::StructType *StrTy) { const llvm::StructLayout *Layout = DL.getStructLayout(StrTy); for (unsigned i = 0, e = StrTy->getNumElements(); i != e; ++i) { llvm::Type *ElemTy = StrTy->getElementType(i); uint64_t ElemOffset = Offset + Layout->getElementOffsetInBits(i); switch (ElemTy->getTypeID()) { case llvm::Type::StructTyID: addStruct(ElemOffset, cast<llvm::StructType>(ElemTy)); break; case llvm::Type::FloatTyID: addFloat(ElemOffset, ElemTy, 32); break; case llvm::Type::DoubleTyID: addFloat(ElemOffset, ElemTy, 64); break; case llvm::Type::FP128TyID: addFloat(ElemOffset, ElemTy, 128); break; case llvm::Type::PointerTyID: if (ElemOffset % 64 == 0) { pad(ElemOffset); Elems.push_back(ElemTy); Size += 64; } break; default: break; } } } // Check if Ty is a usable substitute for the coercion type. bool isUsableType(llvm::StructType *Ty) const { if (Ty->getNumElements() != Elems.size()) return false; for (unsigned i = 0, e = Elems.size(); i != e; ++i) if (Elems[i] != Ty->getElementType(i)) return false; return true; } // Get the coercion type as a literal struct type. llvm::Type *getType() const { if (Elems.size() == 1) return Elems.front(); else return llvm::StructType::get(Context, Elems); } }; }; } // end anonymous namespace ABIArgInfo SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit) const { if (Ty->isVoidType()) return ABIArgInfo::getIgnore(); uint64_t Size = getContext().getTypeSize(Ty); // Anything too big to fit in registers is passed with an explicit indirect // pointer / sret pointer. if (Size > SizeLimit) return ABIArgInfo::getIndirect(0, /*ByVal=*/false); // Treat an enum type as its underlying type. if (const EnumType *EnumTy = Ty->getAs<EnumType>()) Ty = EnumTy->getDecl()->getIntegerType(); // Integer types smaller than a register are extended. if (Size < 64 && Ty->isIntegerType()) return ABIArgInfo::getExtend(); // Other non-aggregates go in registers. if (!isAggregateTypeForABI(Ty)) return ABIArgInfo::getDirect(); // This is a small aggregate type that should be passed in registers. // Build a coercion type from the LLVM struct type. llvm::StructType *StrTy = dyn_cast<llvm::StructType>(CGT.ConvertType(Ty)); if (!StrTy) return ABIArgInfo::getDirect(); CoerceBuilder CB(getVMContext(), getDataLayout()); CB.addStruct(0, StrTy); CB.pad(llvm::RoundUpToAlignment(CB.DL.getTypeSizeInBits(StrTy), 64)); // Try to use the original type for coercion. llvm::Type *CoerceTy = CB.isUsableType(StrTy) ? StrTy : CB.getType(); if (CB.InReg) return ABIArgInfo::getDirectInReg(CoerceTy); else return ABIArgInfo::getDirect(CoerceTy); } llvm::Value *SparcV9ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { ABIArgInfo AI = classifyType(Ty, 16 * 8); llvm::Type *ArgTy = CGT.ConvertType(Ty); if (AI.canHaveCoerceToType() && !AI.getCoerceToType()) AI.setCoerceToType(ArgTy); llvm::Type *BPP = CGF.Int8PtrPtrTy; CGBuilderTy &Builder = CGF.Builder; llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); llvm::Type *ArgPtrTy = llvm::PointerType::getUnqual(ArgTy); llvm::Value *ArgAddr; unsigned Stride; switch (AI.getKind()) { case ABIArgInfo::Expand: llvm_unreachable("Unsupported ABI kind for va_arg"); case ABIArgInfo::Extend: Stride = 8; ArgAddr = Builder .CreateConstGEP1_32(Addr, 8 - getDataLayout().getTypeAllocSize(ArgTy), "extend"); break; case ABIArgInfo::Direct: Stride = getDataLayout().getTypeAllocSize(AI.getCoerceToType()); ArgAddr = Addr; break; case ABIArgInfo::Indirect: Stride = 8; ArgAddr = Builder.CreateBitCast(Addr, llvm::PointerType::getUnqual(ArgPtrTy), "indirect"); ArgAddr = Builder.CreateLoad(ArgAddr, "indirect.arg"); break; case ABIArgInfo::Ignore: return llvm::UndefValue::get(ArgPtrTy); } // Update VAList. Addr = Builder.CreateConstGEP1_32(Addr, Stride, "ap.next"); Builder.CreateStore(Addr, VAListAddrAsBPP); return Builder.CreatePointerCast(ArgAddr, ArgPtrTy, "arg.addr"); } void SparcV9ABIInfo::computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyType(FI.getReturnType(), 32 * 8); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) it->info = classifyType(it->type, 16 * 8); } namespace { class SparcV9TargetCodeGenInfo : public TargetCodeGenInfo { public: SparcV9TargetCodeGenInfo(CodeGenTypes &CGT) : TargetCodeGenInfo(new SparcV9ABIInfo(CGT)) {} }; } // end anonymous namespace //===----------------------------------------------------------------------===// // Xcore ABI Implementation //===----------------------------------------------------------------------===// namespace { class XCoreABIInfo : public DefaultABIInfo { public: XCoreABIInfo(CodeGen::CodeGenTypes &CGT) : DefaultABIInfo(CGT) {} virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const; }; class XcoreTargetCodeGenInfo : public TargetCodeGenInfo { public: XcoreTargetCodeGenInfo(CodeGenTypes &CGT) :TargetCodeGenInfo(new XCoreABIInfo(CGT)) {} }; } // End anonymous namespace. llvm::Value *XCoreABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGenFunction &CGF) const { CGBuilderTy &Builder = CGF.Builder; // Get the VAList. llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, CGF.Int8PtrPtrTy); llvm::Value *AP = Builder.CreateLoad(VAListAddrAsBPP); // Handle the argument. ABIArgInfo AI = classifyArgumentType(Ty); llvm::Type *ArgTy = CGT.ConvertType(Ty); if (AI.canHaveCoerceToType() && !AI.getCoerceToType()) AI.setCoerceToType(ArgTy); llvm::Type *ArgPtrTy = llvm::PointerType::getUnqual(ArgTy); llvm::Value *Val; uint64_t ArgSize = 0; switch (AI.getKind()) { case ABIArgInfo::Expand: llvm_unreachable("Unsupported ABI kind for va_arg"); case ABIArgInfo::Ignore: Val = llvm::UndefValue::get(ArgPtrTy); ArgSize = 0; break; case ABIArgInfo::Extend: case ABIArgInfo::Direct: Val = Builder.CreatePointerCast(AP, ArgPtrTy); ArgSize = getDataLayout().getTypeAllocSize(AI.getCoerceToType()); if (ArgSize < 4) ArgSize = 4; break; case ABIArgInfo::Indirect: llvm::Value *ArgAddr; ArgAddr = Builder.CreateBitCast(AP, llvm::PointerType::getUnqual(ArgPtrTy)); ArgAddr = Builder.CreateLoad(ArgAddr); Val = Builder.CreatePointerCast(ArgAddr, ArgPtrTy); ArgSize = 4; break; } // Increment the VAList. if (ArgSize) { llvm::Value *APN = Builder.CreateConstGEP1_32(AP, ArgSize); Builder.CreateStore(APN, VAListAddrAsBPP); } return Val; } //===----------------------------------------------------------------------===// // Driver code //===----------------------------------------------------------------------===// const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() { if (TheTargetCodeGenInfo) return *TheTargetCodeGenInfo; const llvm::Triple &Triple = getTarget().getTriple(); switch (Triple.getArch()) { default: return *(TheTargetCodeGenInfo = new DefaultTargetCodeGenInfo(Types)); case llvm::Triple::le32: return *(TheTargetCodeGenInfo = new PNaClTargetCodeGenInfo(Types)); case llvm::Triple::mips: case llvm::Triple::mipsel: return *(TheTargetCodeGenInfo = new MIPSTargetCodeGenInfo(Types, true)); case llvm::Triple::mips64: case llvm::Triple::mips64el: return *(TheTargetCodeGenInfo = new MIPSTargetCodeGenInfo(Types, false)); case llvm::Triple::aarch64: return *(TheTargetCodeGenInfo = new AArch64TargetCodeGenInfo(Types)); case llvm::Triple::arm: case llvm::Triple::thumb: { ARMABIInfo::ABIKind Kind = ARMABIInfo::AAPCS; if (strcmp(getTarget().getABI(), "apcs-gnu") == 0) Kind = ARMABIInfo::APCS; else if (CodeGenOpts.FloatABI == "hard" || (CodeGenOpts.FloatABI != "soft" && Triple.getEnvironment() == llvm::Triple::GNUEABIHF)) Kind = ARMABIInfo::AAPCS_VFP; switch (Triple.getOS()) { case llvm::Triple::NaCl: return *(TheTargetCodeGenInfo = new NaClARMTargetCodeGenInfo(Types, Kind)); default: return *(TheTargetCodeGenInfo = new ARMTargetCodeGenInfo(Types, Kind)); } } case llvm::Triple::ppc: return *(TheTargetCodeGenInfo = new PPC32TargetCodeGenInfo(Types)); case llvm::Triple::ppc64: if (Triple.isOSBinFormatELF()) return *(TheTargetCodeGenInfo = new PPC64_SVR4_TargetCodeGenInfo(Types)); else return *(TheTargetCodeGenInfo = new PPC64TargetCodeGenInfo(Types)); case llvm::Triple::ppc64le: assert(Triple.isOSBinFormatELF() && "PPC64 LE non-ELF not supported!"); return *(TheTargetCodeGenInfo = new PPC64_SVR4_TargetCodeGenInfo(Types)); case llvm::Triple::nvptx: case llvm::Triple::nvptx64: return *(TheTargetCodeGenInfo = new NVPTXTargetCodeGenInfo(Types)); case llvm::Triple::msp430: return *(TheTargetCodeGenInfo = new MSP430TargetCodeGenInfo(Types)); case llvm::Triple::systemz: return *(TheTargetCodeGenInfo = new SystemZTargetCodeGenInfo(Types)); case llvm::Triple::tce: return *(TheTargetCodeGenInfo = new TCETargetCodeGenInfo(Types)); case llvm::Triple::x86: { bool IsDarwinVectorABI = Triple.isOSDarwin(); bool IsSmallStructInRegABI = X86_32TargetCodeGenInfo::isStructReturnInRegABI(Triple, CodeGenOpts); bool IsWin32FloatStructABI = (Triple.getOS() == llvm::Triple::Win32); if (Triple.getOS() == llvm::Triple::Win32) { return *(TheTargetCodeGenInfo = new WinX86_32TargetCodeGenInfo(Types, IsDarwinVectorABI, IsSmallStructInRegABI, IsWin32FloatStructABI, CodeGenOpts.NumRegisterParameters)); } else { return *(TheTargetCodeGenInfo = new X86_32TargetCodeGenInfo(Types, IsDarwinVectorABI, IsSmallStructInRegABI, IsWin32FloatStructABI, CodeGenOpts.NumRegisterParameters)); } } case llvm::Triple::x86_64: { bool HasAVX = strcmp(getTarget().getABI(), "avx") == 0; switch (Triple.getOS()) { case llvm::Triple::Win32: case llvm::Triple::MinGW32: case llvm::Triple::Cygwin: return *(TheTargetCodeGenInfo = new WinX86_64TargetCodeGenInfo(Types)); case llvm::Triple::NaCl: return *(TheTargetCodeGenInfo = new NaClX86_64TargetCodeGenInfo(Types, HasAVX)); default: return *(TheTargetCodeGenInfo = new X86_64TargetCodeGenInfo(Types, HasAVX)); } } case llvm::Triple::hexagon: return *(TheTargetCodeGenInfo = new HexagonTargetCodeGenInfo(Types)); case llvm::Triple::sparcv9: return *(TheTargetCodeGenInfo = new SparcV9TargetCodeGenInfo(Types)); case llvm::Triple::xcore: return *(TheTargetCodeGenInfo = new XcoreTargetCodeGenInfo(Types)); } }
santoshn/softboundcets-34
softboundcets-llvm-clang34/tools/clang/lib/CodeGen/TargetInfo.cpp
C++
bsd-3-clause
205,682