ocelot/ocelot/executive/implementation/CooperativeThreadArray.cpp
ir::PTXU16 executive::CooperativeThreadArray::getRegAsU16(int threadID, 
	ir::PTXOperand::RegisterType reg) {
	ir::PTXU16 r = *( (ir::PTXU16*)(
		&functionCallStack.registerFilePointer(threadID)[reg]));
	#if REPORT_NTH_THREAD_ONLY == 1
	if (threadID == NTH_THREAD) {
		reportE(REPORT_REGISTER_READS, "   thread " << threadID 
			<< " reg " << reg << " <= " << r);
	}
	#else
	reportE(REPORT_REGISTER_READS, "   thread " << threadID 
		<< " reg " << reg << " <= " << r);
	#endif
	return r;
}
/*!
	Gets a register value 

	\param threadID ID of the active thread
	\reg register index
*/
Gets a register value
\param threadID ID of the active thread
\reg register index
Gets a register value \ param threadID ID of the active thread \ reg register index
ir::PTXU16 executive::CooperativeThreadArray::getRegAsU16(int threadID, 
	ir::PTXOperand::RegisterType reg) {
	ir::PTXU16 r = *( (ir::PTXU16*)(
		&functionCallStack.registerFilePointer(threadID)[reg]));
	#if REPORT_NTH_THREAD_ONLY == 1
	if (threadID == NTH_THREAD) {
		reportE(REPORT_REGISTER_READS, "   thread " << threadID 
			<< " reg " << reg << " <= " << r);
	}
	#else
	reportE(REPORT_REGISTER_READS, "   thread " << threadID 
		<< " reg " << reg << " <= " << r);
	#endif
	return r;
}
ir :: PTXU16 executive :: CooperativeThreadArray :: getRegAsU16 ( int threadID , ir :: PTXOperand :: RegisterType reg ) { ir :: PTXU16 r = * ( ( ir :: PTXU16 * ) ( & functionCallStack . registerFilePointer ( threadID ) [ reg ] ) ) ; #if REPORT_NTH_THREAD_ONLY == 1 if ( threadID == NTH_THREAD ) { reportE ( REPORT_REGISTER_READS , " " << threadID << " " << reg << " " << r ) ; } #else reportE ( REPORT_REGISTER_READS , " " << threadID << " " << reg << " " << r ) ; #endif return r ; }
Gets a register value
\param threadID ID of the active thread
\reg register index
Gets a register value \ param threadID ID of the active thread \ reg register index